1 /* 2 * Copyright (C) 2016 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 // Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. 18 19 /* 20 * rs_allocation_create.rsh: Allocation Creation Functions 21 * 22 * The functions below can be used to create Allocations from a Script. 23 * 24 * These functions can be called directly or indirectly from an invokable 25 * function. If some control-flow path can result in a call to these functions 26 * from a RenderScript kernel function, a compiler error will be generated. 27 */ 28 29 #ifndef RENDERSCRIPT_RS_ALLOCATION_CREATE_RSH 30 #define RENDERSCRIPT_RS_ALLOCATION_CREATE_RSH 31 32 /* 33 * rsCreateElement: Creates an rs_element object of the specified data type 34 * 35 * Creates an rs_element object of the specified data type. The data kind of 36 * the Element will be set to RS_KIND_USER and vector_width will be set to 1, 37 * indicating non-vector. 38 * 39 * Parameters: 40 * data_type: Data type of the Element 41 */ 42 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 43 extern rs_element __attribute__((overloadable)) 44 rsCreateElement(rs_data_type data_type); 45 #endif 46 47 /* 48 * rsCreateVectorElement: Creates an rs_element object of the specified data type and vector width 49 * 50 * Creates an rs_element object of the specified data type and vector width. 51 * Value of vector_width must be 2, 3 or 4. The data kind of the Element will 52 * be set to RS_KIND_USER. 53 * 54 * Parameters: 55 * data_type: Data type of the Element 56 * vector_width: Vector width (either 2, 3, or 4) 57 */ 58 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 59 extern rs_element __attribute__((overloadable)) 60 rsCreateVectorElement(rs_data_type data_type, uint32_t vector_width); 61 #endif 62 63 /* 64 * rsCreatePixelElement: Creates an rs_element object of the specified data type and data kind 65 * 66 * Creates an rs_element object of the specified data type and data kind. The 67 * vector_width of the Element will be set to 1, indicating non-vector. 68 * 69 * Parameters: 70 * data_type: Data type of the Element 71 * data_kind: Data kind of the Element 72 */ 73 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 74 extern rs_element __attribute__((overloadable)) 75 rsCreatePixelElement(rs_data_type data_type, rs_data_kind data_kind); 76 #endif 77 78 /* 79 * rsCreateType: Creates an rs_type object with the specified Element and shape attributes 80 * 81 * Creates an rs_type object with the specified Element and shape attributes. 82 * 83 * dimX specifies the size of the X dimension. 84 * 85 * dimY, if present and non-zero, indicates that the Y dimension is present and 86 * indicates its size. 87 * 88 * dimZ, if present and non-zero, indicates that the Z dimension is present and 89 * indicates its size. 90 * 91 * mipmaps indicates the presence of level of detail (LOD). 92 * 93 * faces indicates the presence of cubemap faces. 94 * 95 * yuv_format indicates the associated YUV format (or RS_YUV_NONE). 96 * 97 * Parameters: 98 * element: Element to be associated with the Type 99 * dimX: Size along the X dimension 100 * dimY: Size along the Y dimension 101 * dimZ: Size along the Z dimension 102 * mipmaps: Flag indicating if the Type has a mipmap chain 103 * faces: Flag indicating if the Type is a cubemap 104 * yuv_format: YUV layout for the Type 105 */ 106 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 107 extern rs_type __attribute__((overloadable)) 108 rsCreateType(rs_element element, uint32_t dimX, uint32_t dimY, uint32_t dimZ, bool mipmaps, 109 bool faces, rs_yuv_format yuv_format); 110 #endif 111 112 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 113 extern rs_type __attribute__((overloadable)) 114 rsCreateType(rs_element element, uint32_t dimX, uint32_t dimY, uint32_t dimZ); 115 #endif 116 117 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 118 extern rs_type __attribute__((overloadable)) 119 rsCreateType(rs_element element, uint32_t dimX, uint32_t dimY); 120 #endif 121 122 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 123 extern rs_type __attribute__((overloadable)) 124 rsCreateType(rs_element element, uint32_t dimX); 125 #endif 126 127 /* 128 * rsCreateAllocation: Create an rs_allocation object of given Type. 129 * 130 * Creates an rs_allocation object of the given Type and usage. 131 * 132 * RS_ALLOCATION_USAGE_SCRIPT and RS_ALLOCATION_USAGE_GRAPHICS_TEXTURE are the 133 * only supported usage flags for Allocations created from within a RenderScript 134 * Script. 135 * 136 * You can also use rsCreateAllocation_ wrapper functions to directly 137 * create Allocations of scalar and vector numerical types without creating 138 * intermediate rs_element or rs_type objects. 139 * 140 * E.g. rsCreateAllocation_int4() returns an Allocation of int4 data type of 141 * specified dimensions. 142 * 143 * Parameters: 144 * type: Type of the Allocation 145 * usage: Usage flag for the allocation 146 */ 147 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 148 extern rs_allocation __attribute__((overloadable)) 149 rsCreateAllocation(rs_type type, uint32_t usage); 150 #endif 151 152 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 153 extern rs_allocation __attribute__((overloadable)) 154 rsCreateAllocation(rs_type type); 155 #endif 156 157 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 158 static inline rs_allocation __attribute__((overloadable)) 159 rsCreateAllocation_half(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 160 rs_element e = rsCreateElement(RS_TYPE_FLOAT_16); 161 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 162 return rsCreateAllocation(t); 163 } 164 #endif 165 166 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 167 static inline rs_allocation __attribute__((overloadable)) 168 rsCreateAllocation_float(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 169 rs_element e = rsCreateElement(RS_TYPE_FLOAT_32); 170 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 171 return rsCreateAllocation(t); 172 } 173 #endif 174 175 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 176 static inline rs_allocation __attribute__((overloadable)) 177 rsCreateAllocation_double(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 178 rs_element e = rsCreateElement(RS_TYPE_FLOAT_64); 179 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 180 return rsCreateAllocation(t); 181 } 182 #endif 183 184 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 185 static inline rs_allocation __attribute__((overloadable)) 186 rsCreateAllocation_char(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 187 rs_element e = rsCreateElement(RS_TYPE_SIGNED_8); 188 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 189 return rsCreateAllocation(t); 190 } 191 #endif 192 193 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 194 static inline rs_allocation __attribute__((overloadable)) 195 rsCreateAllocation_uchar(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 196 rs_element e = rsCreateElement(RS_TYPE_UNSIGNED_8); 197 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 198 return rsCreateAllocation(t); 199 } 200 #endif 201 202 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 203 static inline rs_allocation __attribute__((overloadable)) 204 rsCreateAllocation_short(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 205 rs_element e = rsCreateElement(RS_TYPE_SIGNED_16); 206 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 207 return rsCreateAllocation(t); 208 } 209 #endif 210 211 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 212 static inline rs_allocation __attribute__((overloadable)) 213 rsCreateAllocation_ushort(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 214 rs_element e = rsCreateElement(RS_TYPE_UNSIGNED_16); 215 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 216 return rsCreateAllocation(t); 217 } 218 #endif 219 220 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 221 static inline rs_allocation __attribute__((overloadable)) 222 rsCreateAllocation_int(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 223 rs_element e = rsCreateElement(RS_TYPE_SIGNED_32); 224 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 225 return rsCreateAllocation(t); 226 } 227 #endif 228 229 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 230 static inline rs_allocation __attribute__((overloadable)) 231 rsCreateAllocation_uint(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 232 rs_element e = rsCreateElement(RS_TYPE_UNSIGNED_32); 233 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 234 return rsCreateAllocation(t); 235 } 236 #endif 237 238 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 239 static inline rs_allocation __attribute__((overloadable)) 240 rsCreateAllocation_long(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 241 rs_element e = rsCreateElement(RS_TYPE_SIGNED_64); 242 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 243 return rsCreateAllocation(t); 244 } 245 #endif 246 247 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 248 static inline rs_allocation __attribute__((overloadable)) 249 rsCreateAllocation_ulong(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 250 rs_element e = rsCreateElement(RS_TYPE_UNSIGNED_64); 251 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 252 return rsCreateAllocation(t); 253 } 254 #endif 255 256 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 257 static inline rs_allocation __attribute__((overloadable)) 258 rsCreateAllocation_half2(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 259 rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_16, 2); 260 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 261 return rsCreateAllocation(t); 262 } 263 #endif 264 265 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 266 static inline rs_allocation __attribute__((overloadable)) 267 rsCreateAllocation_half3(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 268 rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_16, 3); 269 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 270 return rsCreateAllocation(t); 271 } 272 #endif 273 274 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 275 static inline rs_allocation __attribute__((overloadable)) 276 rsCreateAllocation_half4(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 277 rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_16, 4); 278 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 279 return rsCreateAllocation(t); 280 } 281 #endif 282 283 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 284 static inline rs_allocation __attribute__((overloadable)) 285 rsCreateAllocation_float2(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 286 rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_32, 2); 287 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 288 return rsCreateAllocation(t); 289 } 290 #endif 291 292 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 293 static inline rs_allocation __attribute__((overloadable)) 294 rsCreateAllocation_float3(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 295 rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_32, 3); 296 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 297 return rsCreateAllocation(t); 298 } 299 #endif 300 301 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 302 static inline rs_allocation __attribute__((overloadable)) 303 rsCreateAllocation_float4(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 304 rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_32, 4); 305 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 306 return rsCreateAllocation(t); 307 } 308 #endif 309 310 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 311 static inline rs_allocation __attribute__((overloadable)) 312 rsCreateAllocation_double2(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 313 rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_64, 2); 314 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 315 return rsCreateAllocation(t); 316 } 317 #endif 318 319 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 320 static inline rs_allocation __attribute__((overloadable)) 321 rsCreateAllocation_double3(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 322 rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_64, 3); 323 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 324 return rsCreateAllocation(t); 325 } 326 #endif 327 328 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 329 static inline rs_allocation __attribute__((overloadable)) 330 rsCreateAllocation_double4(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 331 rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_64, 4); 332 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 333 return rsCreateAllocation(t); 334 } 335 #endif 336 337 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 338 static inline rs_allocation __attribute__((overloadable)) 339 rsCreateAllocation_char2(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 340 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_8, 2); 341 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 342 return rsCreateAllocation(t); 343 } 344 #endif 345 346 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 347 static inline rs_allocation __attribute__((overloadable)) 348 rsCreateAllocation_char3(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 349 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_8, 3); 350 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 351 return rsCreateAllocation(t); 352 } 353 #endif 354 355 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 356 static inline rs_allocation __attribute__((overloadable)) 357 rsCreateAllocation_char4(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 358 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_8, 4); 359 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 360 return rsCreateAllocation(t); 361 } 362 #endif 363 364 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 365 static inline rs_allocation __attribute__((overloadable)) 366 rsCreateAllocation_uchar2(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 367 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_8, 2); 368 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 369 return rsCreateAllocation(t); 370 } 371 #endif 372 373 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 374 static inline rs_allocation __attribute__((overloadable)) 375 rsCreateAllocation_uchar3(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 376 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_8, 3); 377 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 378 return rsCreateAllocation(t); 379 } 380 #endif 381 382 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 383 static inline rs_allocation __attribute__((overloadable)) 384 rsCreateAllocation_uchar4(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 385 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_8, 4); 386 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 387 return rsCreateAllocation(t); 388 } 389 #endif 390 391 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 392 static inline rs_allocation __attribute__((overloadable)) 393 rsCreateAllocation_short2(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 394 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_16, 2); 395 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 396 return rsCreateAllocation(t); 397 } 398 #endif 399 400 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 401 static inline rs_allocation __attribute__((overloadable)) 402 rsCreateAllocation_short3(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 403 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_16, 3); 404 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 405 return rsCreateAllocation(t); 406 } 407 #endif 408 409 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 410 static inline rs_allocation __attribute__((overloadable)) 411 rsCreateAllocation_short4(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 412 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_16, 4); 413 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 414 return rsCreateAllocation(t); 415 } 416 #endif 417 418 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 419 static inline rs_allocation __attribute__((overloadable)) 420 rsCreateAllocation_ushort2(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 421 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_16, 2); 422 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 423 return rsCreateAllocation(t); 424 } 425 #endif 426 427 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 428 static inline rs_allocation __attribute__((overloadable)) 429 rsCreateAllocation_ushort3(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 430 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_16, 3); 431 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 432 return rsCreateAllocation(t); 433 } 434 #endif 435 436 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 437 static inline rs_allocation __attribute__((overloadable)) 438 rsCreateAllocation_ushort4(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 439 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_16, 4); 440 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 441 return rsCreateAllocation(t); 442 } 443 #endif 444 445 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 446 static inline rs_allocation __attribute__((overloadable)) 447 rsCreateAllocation_int2(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 448 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_32, 2); 449 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 450 return rsCreateAllocation(t); 451 } 452 #endif 453 454 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 455 static inline rs_allocation __attribute__((overloadable)) 456 rsCreateAllocation_int3(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 457 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_32, 3); 458 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 459 return rsCreateAllocation(t); 460 } 461 #endif 462 463 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 464 static inline rs_allocation __attribute__((overloadable)) 465 rsCreateAllocation_int4(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 466 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_32, 4); 467 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 468 return rsCreateAllocation(t); 469 } 470 #endif 471 472 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 473 static inline rs_allocation __attribute__((overloadable)) 474 rsCreateAllocation_uint2(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 475 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_32, 2); 476 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 477 return rsCreateAllocation(t); 478 } 479 #endif 480 481 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 482 static inline rs_allocation __attribute__((overloadable)) 483 rsCreateAllocation_uint3(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 484 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_32, 3); 485 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 486 return rsCreateAllocation(t); 487 } 488 #endif 489 490 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 491 static inline rs_allocation __attribute__((overloadable)) 492 rsCreateAllocation_uint4(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 493 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_32, 4); 494 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 495 return rsCreateAllocation(t); 496 } 497 #endif 498 499 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 500 static inline rs_allocation __attribute__((overloadable)) 501 rsCreateAllocation_long2(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 502 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_64, 2); 503 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 504 return rsCreateAllocation(t); 505 } 506 #endif 507 508 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 509 static inline rs_allocation __attribute__((overloadable)) 510 rsCreateAllocation_long3(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 511 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_64, 3); 512 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 513 return rsCreateAllocation(t); 514 } 515 #endif 516 517 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 518 static inline rs_allocation __attribute__((overloadable)) 519 rsCreateAllocation_long4(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 520 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_64, 4); 521 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 522 return rsCreateAllocation(t); 523 } 524 #endif 525 526 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 527 static inline rs_allocation __attribute__((overloadable)) 528 rsCreateAllocation_ulong2(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 529 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_64, 2); 530 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 531 return rsCreateAllocation(t); 532 } 533 #endif 534 535 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 536 static inline rs_allocation __attribute__((overloadable)) 537 rsCreateAllocation_ulong3(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 538 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_64, 3); 539 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 540 return rsCreateAllocation(t); 541 } 542 #endif 543 544 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 545 static inline rs_allocation __attribute__((overloadable)) 546 rsCreateAllocation_ulong4(uint32_t dimX, uint32_t dimY, uint32_t dimZ) { 547 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_64, 4); 548 rs_type t = rsCreateType(e, dimX, dimY, dimZ); 549 return rsCreateAllocation(t); 550 } 551 #endif 552 553 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 554 static inline rs_allocation __attribute__((overloadable)) 555 rsCreateAllocation_half(uint32_t dimX, uint32_t dimY) { 556 rs_element e = rsCreateElement(RS_TYPE_FLOAT_16); 557 rs_type t = rsCreateType(e, dimX, dimY); 558 return rsCreateAllocation(t); 559 } 560 #endif 561 562 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 563 static inline rs_allocation __attribute__((overloadable)) 564 rsCreateAllocation_float(uint32_t dimX, uint32_t dimY) { 565 rs_element e = rsCreateElement(RS_TYPE_FLOAT_32); 566 rs_type t = rsCreateType(e, dimX, dimY); 567 return rsCreateAllocation(t); 568 } 569 #endif 570 571 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 572 static inline rs_allocation __attribute__((overloadable)) 573 rsCreateAllocation_double(uint32_t dimX, uint32_t dimY) { 574 rs_element e = rsCreateElement(RS_TYPE_FLOAT_64); 575 rs_type t = rsCreateType(e, dimX, dimY); 576 return rsCreateAllocation(t); 577 } 578 #endif 579 580 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 581 static inline rs_allocation __attribute__((overloadable)) 582 rsCreateAllocation_char(uint32_t dimX, uint32_t dimY) { 583 rs_element e = rsCreateElement(RS_TYPE_SIGNED_8); 584 rs_type t = rsCreateType(e, dimX, dimY); 585 return rsCreateAllocation(t); 586 } 587 #endif 588 589 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 590 static inline rs_allocation __attribute__((overloadable)) 591 rsCreateAllocation_uchar(uint32_t dimX, uint32_t dimY) { 592 rs_element e = rsCreateElement(RS_TYPE_UNSIGNED_8); 593 rs_type t = rsCreateType(e, dimX, dimY); 594 return rsCreateAllocation(t); 595 } 596 #endif 597 598 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 599 static inline rs_allocation __attribute__((overloadable)) 600 rsCreateAllocation_short(uint32_t dimX, uint32_t dimY) { 601 rs_element e = rsCreateElement(RS_TYPE_SIGNED_16); 602 rs_type t = rsCreateType(e, dimX, dimY); 603 return rsCreateAllocation(t); 604 } 605 #endif 606 607 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 608 static inline rs_allocation __attribute__((overloadable)) 609 rsCreateAllocation_ushort(uint32_t dimX, uint32_t dimY) { 610 rs_element e = rsCreateElement(RS_TYPE_UNSIGNED_16); 611 rs_type t = rsCreateType(e, dimX, dimY); 612 return rsCreateAllocation(t); 613 } 614 #endif 615 616 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 617 static inline rs_allocation __attribute__((overloadable)) 618 rsCreateAllocation_int(uint32_t dimX, uint32_t dimY) { 619 rs_element e = rsCreateElement(RS_TYPE_SIGNED_32); 620 rs_type t = rsCreateType(e, dimX, dimY); 621 return rsCreateAllocation(t); 622 } 623 #endif 624 625 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 626 static inline rs_allocation __attribute__((overloadable)) 627 rsCreateAllocation_uint(uint32_t dimX, uint32_t dimY) { 628 rs_element e = rsCreateElement(RS_TYPE_UNSIGNED_32); 629 rs_type t = rsCreateType(e, dimX, dimY); 630 return rsCreateAllocation(t); 631 } 632 #endif 633 634 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 635 static inline rs_allocation __attribute__((overloadable)) 636 rsCreateAllocation_long(uint32_t dimX, uint32_t dimY) { 637 rs_element e = rsCreateElement(RS_TYPE_SIGNED_64); 638 rs_type t = rsCreateType(e, dimX, dimY); 639 return rsCreateAllocation(t); 640 } 641 #endif 642 643 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 644 static inline rs_allocation __attribute__((overloadable)) 645 rsCreateAllocation_ulong(uint32_t dimX, uint32_t dimY) { 646 rs_element e = rsCreateElement(RS_TYPE_UNSIGNED_64); 647 rs_type t = rsCreateType(e, dimX, dimY); 648 return rsCreateAllocation(t); 649 } 650 #endif 651 652 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 653 static inline rs_allocation __attribute__((overloadable)) 654 rsCreateAllocation_half2(uint32_t dimX, uint32_t dimY) { 655 rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_16, 2); 656 rs_type t = rsCreateType(e, dimX, dimY); 657 return rsCreateAllocation(t); 658 } 659 #endif 660 661 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 662 static inline rs_allocation __attribute__((overloadable)) 663 rsCreateAllocation_half3(uint32_t dimX, uint32_t dimY) { 664 rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_16, 3); 665 rs_type t = rsCreateType(e, dimX, dimY); 666 return rsCreateAllocation(t); 667 } 668 #endif 669 670 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 671 static inline rs_allocation __attribute__((overloadable)) 672 rsCreateAllocation_half4(uint32_t dimX, uint32_t dimY) { 673 rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_16, 4); 674 rs_type t = rsCreateType(e, dimX, dimY); 675 return rsCreateAllocation(t); 676 } 677 #endif 678 679 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 680 static inline rs_allocation __attribute__((overloadable)) 681 rsCreateAllocation_float2(uint32_t dimX, uint32_t dimY) { 682 rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_32, 2); 683 rs_type t = rsCreateType(e, dimX, dimY); 684 return rsCreateAllocation(t); 685 } 686 #endif 687 688 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 689 static inline rs_allocation __attribute__((overloadable)) 690 rsCreateAllocation_float3(uint32_t dimX, uint32_t dimY) { 691 rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_32, 3); 692 rs_type t = rsCreateType(e, dimX, dimY); 693 return rsCreateAllocation(t); 694 } 695 #endif 696 697 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 698 static inline rs_allocation __attribute__((overloadable)) 699 rsCreateAllocation_float4(uint32_t dimX, uint32_t dimY) { 700 rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_32, 4); 701 rs_type t = rsCreateType(e, dimX, dimY); 702 return rsCreateAllocation(t); 703 } 704 #endif 705 706 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 707 static inline rs_allocation __attribute__((overloadable)) 708 rsCreateAllocation_double2(uint32_t dimX, uint32_t dimY) { 709 rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_64, 2); 710 rs_type t = rsCreateType(e, dimX, dimY); 711 return rsCreateAllocation(t); 712 } 713 #endif 714 715 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 716 static inline rs_allocation __attribute__((overloadable)) 717 rsCreateAllocation_double3(uint32_t dimX, uint32_t dimY) { 718 rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_64, 3); 719 rs_type t = rsCreateType(e, dimX, dimY); 720 return rsCreateAllocation(t); 721 } 722 #endif 723 724 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 725 static inline rs_allocation __attribute__((overloadable)) 726 rsCreateAllocation_double4(uint32_t dimX, uint32_t dimY) { 727 rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_64, 4); 728 rs_type t = rsCreateType(e, dimX, dimY); 729 return rsCreateAllocation(t); 730 } 731 #endif 732 733 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 734 static inline rs_allocation __attribute__((overloadable)) 735 rsCreateAllocation_char2(uint32_t dimX, uint32_t dimY) { 736 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_8, 2); 737 rs_type t = rsCreateType(e, dimX, dimY); 738 return rsCreateAllocation(t); 739 } 740 #endif 741 742 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 743 static inline rs_allocation __attribute__((overloadable)) 744 rsCreateAllocation_char3(uint32_t dimX, uint32_t dimY) { 745 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_8, 3); 746 rs_type t = rsCreateType(e, dimX, dimY); 747 return rsCreateAllocation(t); 748 } 749 #endif 750 751 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 752 static inline rs_allocation __attribute__((overloadable)) 753 rsCreateAllocation_char4(uint32_t dimX, uint32_t dimY) { 754 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_8, 4); 755 rs_type t = rsCreateType(e, dimX, dimY); 756 return rsCreateAllocation(t); 757 } 758 #endif 759 760 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 761 static inline rs_allocation __attribute__((overloadable)) 762 rsCreateAllocation_uchar2(uint32_t dimX, uint32_t dimY) { 763 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_8, 2); 764 rs_type t = rsCreateType(e, dimX, dimY); 765 return rsCreateAllocation(t); 766 } 767 #endif 768 769 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 770 static inline rs_allocation __attribute__((overloadable)) 771 rsCreateAllocation_uchar3(uint32_t dimX, uint32_t dimY) { 772 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_8, 3); 773 rs_type t = rsCreateType(e, dimX, dimY); 774 return rsCreateAllocation(t); 775 } 776 #endif 777 778 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 779 static inline rs_allocation __attribute__((overloadable)) 780 rsCreateAllocation_uchar4(uint32_t dimX, uint32_t dimY) { 781 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_8, 4); 782 rs_type t = rsCreateType(e, dimX, dimY); 783 return rsCreateAllocation(t); 784 } 785 #endif 786 787 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 788 static inline rs_allocation __attribute__((overloadable)) 789 rsCreateAllocation_short2(uint32_t dimX, uint32_t dimY) { 790 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_16, 2); 791 rs_type t = rsCreateType(e, dimX, dimY); 792 return rsCreateAllocation(t); 793 } 794 #endif 795 796 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 797 static inline rs_allocation __attribute__((overloadable)) 798 rsCreateAllocation_short3(uint32_t dimX, uint32_t dimY) { 799 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_16, 3); 800 rs_type t = rsCreateType(e, dimX, dimY); 801 return rsCreateAllocation(t); 802 } 803 #endif 804 805 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 806 static inline rs_allocation __attribute__((overloadable)) 807 rsCreateAllocation_short4(uint32_t dimX, uint32_t dimY) { 808 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_16, 4); 809 rs_type t = rsCreateType(e, dimX, dimY); 810 return rsCreateAllocation(t); 811 } 812 #endif 813 814 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 815 static inline rs_allocation __attribute__((overloadable)) 816 rsCreateAllocation_ushort2(uint32_t dimX, uint32_t dimY) { 817 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_16, 2); 818 rs_type t = rsCreateType(e, dimX, dimY); 819 return rsCreateAllocation(t); 820 } 821 #endif 822 823 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 824 static inline rs_allocation __attribute__((overloadable)) 825 rsCreateAllocation_ushort3(uint32_t dimX, uint32_t dimY) { 826 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_16, 3); 827 rs_type t = rsCreateType(e, dimX, dimY); 828 return rsCreateAllocation(t); 829 } 830 #endif 831 832 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 833 static inline rs_allocation __attribute__((overloadable)) 834 rsCreateAllocation_ushort4(uint32_t dimX, uint32_t dimY) { 835 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_16, 4); 836 rs_type t = rsCreateType(e, dimX, dimY); 837 return rsCreateAllocation(t); 838 } 839 #endif 840 841 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 842 static inline rs_allocation __attribute__((overloadable)) 843 rsCreateAllocation_int2(uint32_t dimX, uint32_t dimY) { 844 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_32, 2); 845 rs_type t = rsCreateType(e, dimX, dimY); 846 return rsCreateAllocation(t); 847 } 848 #endif 849 850 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 851 static inline rs_allocation __attribute__((overloadable)) 852 rsCreateAllocation_int3(uint32_t dimX, uint32_t dimY) { 853 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_32, 3); 854 rs_type t = rsCreateType(e, dimX, dimY); 855 return rsCreateAllocation(t); 856 } 857 #endif 858 859 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 860 static inline rs_allocation __attribute__((overloadable)) 861 rsCreateAllocation_int4(uint32_t dimX, uint32_t dimY) { 862 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_32, 4); 863 rs_type t = rsCreateType(e, dimX, dimY); 864 return rsCreateAllocation(t); 865 } 866 #endif 867 868 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 869 static inline rs_allocation __attribute__((overloadable)) 870 rsCreateAllocation_uint2(uint32_t dimX, uint32_t dimY) { 871 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_32, 2); 872 rs_type t = rsCreateType(e, dimX, dimY); 873 return rsCreateAllocation(t); 874 } 875 #endif 876 877 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 878 static inline rs_allocation __attribute__((overloadable)) 879 rsCreateAllocation_uint3(uint32_t dimX, uint32_t dimY) { 880 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_32, 3); 881 rs_type t = rsCreateType(e, dimX, dimY); 882 return rsCreateAllocation(t); 883 } 884 #endif 885 886 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 887 static inline rs_allocation __attribute__((overloadable)) 888 rsCreateAllocation_uint4(uint32_t dimX, uint32_t dimY) { 889 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_32, 4); 890 rs_type t = rsCreateType(e, dimX, dimY); 891 return rsCreateAllocation(t); 892 } 893 #endif 894 895 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 896 static inline rs_allocation __attribute__((overloadable)) 897 rsCreateAllocation_long2(uint32_t dimX, uint32_t dimY) { 898 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_64, 2); 899 rs_type t = rsCreateType(e, dimX, dimY); 900 return rsCreateAllocation(t); 901 } 902 #endif 903 904 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 905 static inline rs_allocation __attribute__((overloadable)) 906 rsCreateAllocation_long3(uint32_t dimX, uint32_t dimY) { 907 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_64, 3); 908 rs_type t = rsCreateType(e, dimX, dimY); 909 return rsCreateAllocation(t); 910 } 911 #endif 912 913 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 914 static inline rs_allocation __attribute__((overloadable)) 915 rsCreateAllocation_long4(uint32_t dimX, uint32_t dimY) { 916 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_64, 4); 917 rs_type t = rsCreateType(e, dimX, dimY); 918 return rsCreateAllocation(t); 919 } 920 #endif 921 922 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 923 static inline rs_allocation __attribute__((overloadable)) 924 rsCreateAllocation_ulong2(uint32_t dimX, uint32_t dimY) { 925 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_64, 2); 926 rs_type t = rsCreateType(e, dimX, dimY); 927 return rsCreateAllocation(t); 928 } 929 #endif 930 931 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 932 static inline rs_allocation __attribute__((overloadable)) 933 rsCreateAllocation_ulong3(uint32_t dimX, uint32_t dimY) { 934 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_64, 3); 935 rs_type t = rsCreateType(e, dimX, dimY); 936 return rsCreateAllocation(t); 937 } 938 #endif 939 940 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 941 static inline rs_allocation __attribute__((overloadable)) 942 rsCreateAllocation_ulong4(uint32_t dimX, uint32_t dimY) { 943 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_64, 4); 944 rs_type t = rsCreateType(e, dimX, dimY); 945 return rsCreateAllocation(t); 946 } 947 #endif 948 949 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 950 static inline rs_allocation __attribute__((overloadable)) 951 rsCreateAllocation_half(uint32_t dimX) { 952 rs_element e = rsCreateElement(RS_TYPE_FLOAT_16); 953 rs_type t = rsCreateType(e, dimX); 954 return rsCreateAllocation(t); 955 } 956 #endif 957 958 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 959 static inline rs_allocation __attribute__((overloadable)) 960 rsCreateAllocation_float(uint32_t dimX) { 961 rs_element e = rsCreateElement(RS_TYPE_FLOAT_32); 962 rs_type t = rsCreateType(e, dimX); 963 return rsCreateAllocation(t); 964 } 965 #endif 966 967 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 968 static inline rs_allocation __attribute__((overloadable)) 969 rsCreateAllocation_double(uint32_t dimX) { 970 rs_element e = rsCreateElement(RS_TYPE_FLOAT_64); 971 rs_type t = rsCreateType(e, dimX); 972 return rsCreateAllocation(t); 973 } 974 #endif 975 976 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 977 static inline rs_allocation __attribute__((overloadable)) 978 rsCreateAllocation_char(uint32_t dimX) { 979 rs_element e = rsCreateElement(RS_TYPE_SIGNED_8); 980 rs_type t = rsCreateType(e, dimX); 981 return rsCreateAllocation(t); 982 } 983 #endif 984 985 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 986 static inline rs_allocation __attribute__((overloadable)) 987 rsCreateAllocation_uchar(uint32_t dimX) { 988 rs_element e = rsCreateElement(RS_TYPE_UNSIGNED_8); 989 rs_type t = rsCreateType(e, dimX); 990 return rsCreateAllocation(t); 991 } 992 #endif 993 994 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 995 static inline rs_allocation __attribute__((overloadable)) 996 rsCreateAllocation_short(uint32_t dimX) { 997 rs_element e = rsCreateElement(RS_TYPE_SIGNED_16); 998 rs_type t = rsCreateType(e, dimX); 999 return rsCreateAllocation(t); 1000 } 1001 #endif 1002 1003 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1004 static inline rs_allocation __attribute__((overloadable)) 1005 rsCreateAllocation_ushort(uint32_t dimX) { 1006 rs_element e = rsCreateElement(RS_TYPE_UNSIGNED_16); 1007 rs_type t = rsCreateType(e, dimX); 1008 return rsCreateAllocation(t); 1009 } 1010 #endif 1011 1012 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1013 static inline rs_allocation __attribute__((overloadable)) 1014 rsCreateAllocation_int(uint32_t dimX) { 1015 rs_element e = rsCreateElement(RS_TYPE_SIGNED_32); 1016 rs_type t = rsCreateType(e, dimX); 1017 return rsCreateAllocation(t); 1018 } 1019 #endif 1020 1021 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1022 static inline rs_allocation __attribute__((overloadable)) 1023 rsCreateAllocation_uint(uint32_t dimX) { 1024 rs_element e = rsCreateElement(RS_TYPE_UNSIGNED_32); 1025 rs_type t = rsCreateType(e, dimX); 1026 return rsCreateAllocation(t); 1027 } 1028 #endif 1029 1030 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1031 static inline rs_allocation __attribute__((overloadable)) 1032 rsCreateAllocation_long(uint32_t dimX) { 1033 rs_element e = rsCreateElement(RS_TYPE_SIGNED_64); 1034 rs_type t = rsCreateType(e, dimX); 1035 return rsCreateAllocation(t); 1036 } 1037 #endif 1038 1039 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1040 static inline rs_allocation __attribute__((overloadable)) 1041 rsCreateAllocation_ulong(uint32_t dimX) { 1042 rs_element e = rsCreateElement(RS_TYPE_UNSIGNED_64); 1043 rs_type t = rsCreateType(e, dimX); 1044 return rsCreateAllocation(t); 1045 } 1046 #endif 1047 1048 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1049 static inline rs_allocation __attribute__((overloadable)) 1050 rsCreateAllocation_half2(uint32_t dimX) { 1051 rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_16, 2); 1052 rs_type t = rsCreateType(e, dimX); 1053 return rsCreateAllocation(t); 1054 } 1055 #endif 1056 1057 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1058 static inline rs_allocation __attribute__((overloadable)) 1059 rsCreateAllocation_half3(uint32_t dimX) { 1060 rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_16, 3); 1061 rs_type t = rsCreateType(e, dimX); 1062 return rsCreateAllocation(t); 1063 } 1064 #endif 1065 1066 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1067 static inline rs_allocation __attribute__((overloadable)) 1068 rsCreateAllocation_half4(uint32_t dimX) { 1069 rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_16, 4); 1070 rs_type t = rsCreateType(e, dimX); 1071 return rsCreateAllocation(t); 1072 } 1073 #endif 1074 1075 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1076 static inline rs_allocation __attribute__((overloadable)) 1077 rsCreateAllocation_float2(uint32_t dimX) { 1078 rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_32, 2); 1079 rs_type t = rsCreateType(e, dimX); 1080 return rsCreateAllocation(t); 1081 } 1082 #endif 1083 1084 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1085 static inline rs_allocation __attribute__((overloadable)) 1086 rsCreateAllocation_float3(uint32_t dimX) { 1087 rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_32, 3); 1088 rs_type t = rsCreateType(e, dimX); 1089 return rsCreateAllocation(t); 1090 } 1091 #endif 1092 1093 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1094 static inline rs_allocation __attribute__((overloadable)) 1095 rsCreateAllocation_float4(uint32_t dimX) { 1096 rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_32, 4); 1097 rs_type t = rsCreateType(e, dimX); 1098 return rsCreateAllocation(t); 1099 } 1100 #endif 1101 1102 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1103 static inline rs_allocation __attribute__((overloadable)) 1104 rsCreateAllocation_double2(uint32_t dimX) { 1105 rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_64, 2); 1106 rs_type t = rsCreateType(e, dimX); 1107 return rsCreateAllocation(t); 1108 } 1109 #endif 1110 1111 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1112 static inline rs_allocation __attribute__((overloadable)) 1113 rsCreateAllocation_double3(uint32_t dimX) { 1114 rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_64, 3); 1115 rs_type t = rsCreateType(e, dimX); 1116 return rsCreateAllocation(t); 1117 } 1118 #endif 1119 1120 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1121 static inline rs_allocation __attribute__((overloadable)) 1122 rsCreateAllocation_double4(uint32_t dimX) { 1123 rs_element e = rsCreateVectorElement(RS_TYPE_FLOAT_64, 4); 1124 rs_type t = rsCreateType(e, dimX); 1125 return rsCreateAllocation(t); 1126 } 1127 #endif 1128 1129 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1130 static inline rs_allocation __attribute__((overloadable)) 1131 rsCreateAllocation_char2(uint32_t dimX) { 1132 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_8, 2); 1133 rs_type t = rsCreateType(e, dimX); 1134 return rsCreateAllocation(t); 1135 } 1136 #endif 1137 1138 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1139 static inline rs_allocation __attribute__((overloadable)) 1140 rsCreateAllocation_char3(uint32_t dimX) { 1141 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_8, 3); 1142 rs_type t = rsCreateType(e, dimX); 1143 return rsCreateAllocation(t); 1144 } 1145 #endif 1146 1147 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1148 static inline rs_allocation __attribute__((overloadable)) 1149 rsCreateAllocation_char4(uint32_t dimX) { 1150 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_8, 4); 1151 rs_type t = rsCreateType(e, dimX); 1152 return rsCreateAllocation(t); 1153 } 1154 #endif 1155 1156 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1157 static inline rs_allocation __attribute__((overloadable)) 1158 rsCreateAllocation_uchar2(uint32_t dimX) { 1159 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_8, 2); 1160 rs_type t = rsCreateType(e, dimX); 1161 return rsCreateAllocation(t); 1162 } 1163 #endif 1164 1165 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1166 static inline rs_allocation __attribute__((overloadable)) 1167 rsCreateAllocation_uchar3(uint32_t dimX) { 1168 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_8, 3); 1169 rs_type t = rsCreateType(e, dimX); 1170 return rsCreateAllocation(t); 1171 } 1172 #endif 1173 1174 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1175 static inline rs_allocation __attribute__((overloadable)) 1176 rsCreateAllocation_uchar4(uint32_t dimX) { 1177 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_8, 4); 1178 rs_type t = rsCreateType(e, dimX); 1179 return rsCreateAllocation(t); 1180 } 1181 #endif 1182 1183 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1184 static inline rs_allocation __attribute__((overloadable)) 1185 rsCreateAllocation_short2(uint32_t dimX) { 1186 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_16, 2); 1187 rs_type t = rsCreateType(e, dimX); 1188 return rsCreateAllocation(t); 1189 } 1190 #endif 1191 1192 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1193 static inline rs_allocation __attribute__((overloadable)) 1194 rsCreateAllocation_short3(uint32_t dimX) { 1195 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_16, 3); 1196 rs_type t = rsCreateType(e, dimX); 1197 return rsCreateAllocation(t); 1198 } 1199 #endif 1200 1201 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1202 static inline rs_allocation __attribute__((overloadable)) 1203 rsCreateAllocation_short4(uint32_t dimX) { 1204 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_16, 4); 1205 rs_type t = rsCreateType(e, dimX); 1206 return rsCreateAllocation(t); 1207 } 1208 #endif 1209 1210 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1211 static inline rs_allocation __attribute__((overloadable)) 1212 rsCreateAllocation_ushort2(uint32_t dimX) { 1213 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_16, 2); 1214 rs_type t = rsCreateType(e, dimX); 1215 return rsCreateAllocation(t); 1216 } 1217 #endif 1218 1219 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1220 static inline rs_allocation __attribute__((overloadable)) 1221 rsCreateAllocation_ushort3(uint32_t dimX) { 1222 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_16, 3); 1223 rs_type t = rsCreateType(e, dimX); 1224 return rsCreateAllocation(t); 1225 } 1226 #endif 1227 1228 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1229 static inline rs_allocation __attribute__((overloadable)) 1230 rsCreateAllocation_ushort4(uint32_t dimX) { 1231 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_16, 4); 1232 rs_type t = rsCreateType(e, dimX); 1233 return rsCreateAllocation(t); 1234 } 1235 #endif 1236 1237 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1238 static inline rs_allocation __attribute__((overloadable)) 1239 rsCreateAllocation_int2(uint32_t dimX) { 1240 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_32, 2); 1241 rs_type t = rsCreateType(e, dimX); 1242 return rsCreateAllocation(t); 1243 } 1244 #endif 1245 1246 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1247 static inline rs_allocation __attribute__((overloadable)) 1248 rsCreateAllocation_int3(uint32_t dimX) { 1249 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_32, 3); 1250 rs_type t = rsCreateType(e, dimX); 1251 return rsCreateAllocation(t); 1252 } 1253 #endif 1254 1255 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1256 static inline rs_allocation __attribute__((overloadable)) 1257 rsCreateAllocation_int4(uint32_t dimX) { 1258 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_32, 4); 1259 rs_type t = rsCreateType(e, dimX); 1260 return rsCreateAllocation(t); 1261 } 1262 #endif 1263 1264 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1265 static inline rs_allocation __attribute__((overloadable)) 1266 rsCreateAllocation_uint2(uint32_t dimX) { 1267 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_32, 2); 1268 rs_type t = rsCreateType(e, dimX); 1269 return rsCreateAllocation(t); 1270 } 1271 #endif 1272 1273 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1274 static inline rs_allocation __attribute__((overloadable)) 1275 rsCreateAllocation_uint3(uint32_t dimX) { 1276 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_32, 3); 1277 rs_type t = rsCreateType(e, dimX); 1278 return rsCreateAllocation(t); 1279 } 1280 #endif 1281 1282 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1283 static inline rs_allocation __attribute__((overloadable)) 1284 rsCreateAllocation_uint4(uint32_t dimX) { 1285 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_32, 4); 1286 rs_type t = rsCreateType(e, dimX); 1287 return rsCreateAllocation(t); 1288 } 1289 #endif 1290 1291 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1292 static inline rs_allocation __attribute__((overloadable)) 1293 rsCreateAllocation_long2(uint32_t dimX) { 1294 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_64, 2); 1295 rs_type t = rsCreateType(e, dimX); 1296 return rsCreateAllocation(t); 1297 } 1298 #endif 1299 1300 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1301 static inline rs_allocation __attribute__((overloadable)) 1302 rsCreateAllocation_long3(uint32_t dimX) { 1303 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_64, 3); 1304 rs_type t = rsCreateType(e, dimX); 1305 return rsCreateAllocation(t); 1306 } 1307 #endif 1308 1309 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1310 static inline rs_allocation __attribute__((overloadable)) 1311 rsCreateAllocation_long4(uint32_t dimX) { 1312 rs_element e = rsCreateVectorElement(RS_TYPE_SIGNED_64, 4); 1313 rs_type t = rsCreateType(e, dimX); 1314 return rsCreateAllocation(t); 1315 } 1316 #endif 1317 1318 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1319 static inline rs_allocation __attribute__((overloadable)) 1320 rsCreateAllocation_ulong2(uint32_t dimX) { 1321 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_64, 2); 1322 rs_type t = rsCreateType(e, dimX); 1323 return rsCreateAllocation(t); 1324 } 1325 #endif 1326 1327 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1328 static inline rs_allocation __attribute__((overloadable)) 1329 rsCreateAllocation_ulong3(uint32_t dimX) { 1330 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_64, 3); 1331 rs_type t = rsCreateType(e, dimX); 1332 return rsCreateAllocation(t); 1333 } 1334 #endif 1335 1336 #if (defined(RS_VERSION) && (RS_VERSION >= 24)) 1337 static inline rs_allocation __attribute__((overloadable)) 1338 rsCreateAllocation_ulong4(uint32_t dimX) { 1339 rs_element e = rsCreateVectorElement(RS_TYPE_UNSIGNED_64, 4); 1340 rs_type t = rsCreateType(e, dimX); 1341 return rsCreateAllocation(t); 1342 } 1343 #endif 1344 1345 #endif // RENDERSCRIPT_RS_ALLOCATION_CREATE_RSH 1346