Jean-Luc Brouillet | be21638 | 2015-03-22 12:44:27 -0700 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (C) 2015 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/gen_runtime. |
| 18 | |
| 19 | /* |
| 20 | * rs_value_types.rsh: Standard RenderScript types |
| 21 | * |
| 22 | * Integers: |
| 23 | * 8 bit: char, int8_t |
| 24 | * 16 bit: short, int16_t |
| 25 | * 32 bit: int, in32_t |
| 26 | * 64 bit: long, long long, int64_t |
| 27 | * |
| 28 | * Unsigned integers: |
| 29 | * 8 bit: uchar, uint8_t |
| 30 | * 16 bit: ushort, uint16_t |
| 31 | * 32 bit: uint, uint32_t |
| 32 | * 64 bit: ulong, uint64_t |
| 33 | * |
| 34 | * Floating point: |
| 35 | * 32 bit: float |
| 36 | * 64 bit: double |
| 37 | * |
| 38 | * Vectors of length 2, 3, and 4 are supported for all the types above. |
| 39 | */ |
| 40 | #ifndef RENDERSCRIPT_RS_VALUE_TYPES_RSH |
| 41 | #define RENDERSCRIPT_RS_VALUE_TYPES_RSH |
| 42 | |
| 43 | /* |
| 44 | * int8_t: 8 bit signed integer |
| 45 | * |
| 46 | * 8 bit integer type |
| 47 | */ |
| 48 | typedef char int8_t; |
| 49 | |
| 50 | /* |
| 51 | * int16_t: 16 bit signed integer |
| 52 | * |
| 53 | * 16 bit integer type |
| 54 | */ |
| 55 | typedef short int16_t; |
| 56 | |
| 57 | /* |
| 58 | * int32_t: 32 bit signed integer |
| 59 | * |
| 60 | * 32 bit integer type |
| 61 | */ |
| 62 | typedef int int32_t; |
| 63 | |
| 64 | /* |
| 65 | * int64_t: 64 bit signed integer |
| 66 | * |
| 67 | * 64 bit integer type |
| 68 | */ |
| 69 | #if !defined(RS_VERSION) || (RS_VERSION <= 20) |
| 70 | typedef long long int64_t; |
| 71 | #endif |
| 72 | |
| 73 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 74 | typedef long int64_t; |
| 75 | #endif |
| 76 | |
| 77 | /* |
| 78 | * uint8_t: 8 bit unsigned integer |
| 79 | * |
| 80 | * 8 bit unsigned integer type |
| 81 | */ |
| 82 | typedef unsigned char uint8_t; |
| 83 | |
| 84 | /* |
| 85 | * uint16_t: 16 bit unsigned integer |
| 86 | * |
| 87 | * 16 bit unsigned integer type |
| 88 | */ |
| 89 | typedef unsigned short uint16_t; |
| 90 | |
| 91 | /* |
| 92 | * uint32_t: 32 bit unsigned integer |
| 93 | * |
| 94 | * 32 bit unsigned integer type |
| 95 | */ |
| 96 | typedef unsigned int uint32_t; |
| 97 | |
| 98 | /* |
| 99 | * uint64_t: 64 bit unsigned integer |
| 100 | * |
| 101 | * 64 bit unsigned integer type |
| 102 | */ |
| 103 | #if !defined(RS_VERSION) || (RS_VERSION <= 20) |
| 104 | typedef unsigned long long uint64_t; |
| 105 | #endif |
| 106 | |
| 107 | #if (defined(RS_VERSION) && (RS_VERSION >= 21)) |
| 108 | typedef unsigned long uint64_t; |
| 109 | #endif |
| 110 | |
| 111 | /* |
| 112 | * uchar: 8 bit unsigned integer |
| 113 | * |
| 114 | * 8 bit unsigned integer type |
| 115 | */ |
| 116 | typedef uint8_t uchar; |
| 117 | |
| 118 | /* |
| 119 | * ushort: 16 bit unsigned integer |
| 120 | * |
| 121 | * 16 bit unsigned integer type |
| 122 | */ |
| 123 | typedef uint16_t ushort; |
| 124 | |
| 125 | /* |
| 126 | * uint: 32 bit unsigned integer |
| 127 | * |
| 128 | * 32 bit unsigned integer type |
| 129 | */ |
| 130 | typedef uint32_t uint; |
| 131 | |
| 132 | /* |
| 133 | * ulong: 64 bit unsigned integer |
| 134 | * |
| 135 | * Typedef for unsigned long (use for 64-bit unsigned integers) |
| 136 | */ |
| 137 | typedef uint64_t ulong; |
| 138 | |
| 139 | /* |
| 140 | * size_t: Unsigned size type |
| 141 | * |
| 142 | * Typedef for size_t |
| 143 | */ |
| 144 | #ifdef __LP64__ |
| 145 | typedef uint64_t size_t; |
| 146 | #endif |
| 147 | |
| 148 | #ifndef __LP64__ |
| 149 | typedef uint32_t size_t; |
| 150 | #endif |
| 151 | |
| 152 | /* |
| 153 | * ssize_t: Signed size type |
| 154 | * |
| 155 | * Typedef for ssize_t |
| 156 | */ |
| 157 | #ifdef __LP64__ |
| 158 | typedef int64_t ssize_t; |
| 159 | #endif |
| 160 | |
| 161 | #ifndef __LP64__ |
| 162 | typedef int32_t ssize_t; |
| 163 | #endif |
| 164 | |
| 165 | /* |
| 166 | * float2: Two 32 bit floats |
| 167 | * |
| 168 | * Vector version of the basic float type. |
| 169 | * Provides two float fields packed into a single 64 bit field with 64 bit alignment. |
| 170 | */ |
| 171 | typedef float __attribute__((ext_vector_type(2))) float2; |
| 172 | |
| 173 | /* |
| 174 | * float3: Three 32 bit floats |
| 175 | * |
| 176 | * Vector version of the basic float type. |
| 177 | * Provides three float fields packed into a single 128 bit field with 128 bit alignment. |
| 178 | */ |
| 179 | typedef float __attribute__((ext_vector_type(3))) float3; |
| 180 | |
| 181 | /* |
| 182 | * float4: Four 32 bit floats |
| 183 | * |
| 184 | * Vector version of the basic float type. |
| 185 | * Provides four float fields packed into a single 128 bit field with 128 bit alignment. |
| 186 | */ |
| 187 | typedef float __attribute__((ext_vector_type(4))) float4; |
| 188 | |
| 189 | /* |
| 190 | * double2: Two 64 bit floats |
| 191 | * |
| 192 | * Vector version of the basic double type. Provides two double fields packed |
| 193 | * into a single 128 bit field with 128 bit alignment. |
| 194 | */ |
| 195 | typedef double __attribute__((ext_vector_type(2))) double2; |
| 196 | |
| 197 | /* |
| 198 | * double3: Three 64 bit floats |
| 199 | * |
| 200 | * Vector version of the basic double type. Provides three double fields packed |
| 201 | * into a single 256 bit field with 256 bit alignment. |
| 202 | */ |
| 203 | typedef double __attribute__((ext_vector_type(3))) double3; |
| 204 | |
| 205 | /* |
| 206 | * double4: Four 64 bit floats |
| 207 | * |
| 208 | * Vector version of the basic double type. Provides four double fields packed |
| 209 | * into a single 256 bit field with 256 bit alignment. |
| 210 | */ |
| 211 | typedef double __attribute__((ext_vector_type(4))) double4; |
| 212 | |
| 213 | /* |
| 214 | * uchar2: Two 8 bit unsigned integers |
| 215 | * |
| 216 | * Vector version of the basic uchar type. Provides two uchar fields packed |
| 217 | * into a single 16 bit field with 16 bit alignment. |
| 218 | */ |
| 219 | typedef uchar __attribute__((ext_vector_type(2))) uchar2; |
| 220 | |
| 221 | /* |
| 222 | * uchar3: Three 8 bit unsigned integers |
| 223 | * |
| 224 | * Vector version of the basic uchar type. Provides three uchar fields packed |
| 225 | * into a single 32 bit field with 32 bit alignment. |
| 226 | */ |
| 227 | typedef uchar __attribute__((ext_vector_type(3))) uchar3; |
| 228 | |
| 229 | /* |
| 230 | * uchar4: Four 8 bit unsigned integers |
| 231 | * |
| 232 | * Vector version of the basic uchar type. Provides four uchar fields packed |
| 233 | * into a single 32 bit field with 32 bit alignment. |
| 234 | */ |
| 235 | typedef uchar __attribute__((ext_vector_type(4))) uchar4; |
| 236 | |
| 237 | /* |
| 238 | * ushort2: Two 16 bit unsigned integers |
| 239 | * |
| 240 | * Vector version of the basic ushort type. Provides two ushort fields packed |
| 241 | * into a single 32 bit field with 32 bit alignment. |
| 242 | */ |
| 243 | typedef ushort __attribute__((ext_vector_type(2))) ushort2; |
| 244 | |
| 245 | /* |
| 246 | * ushort3: Three 16 bit unsigned integers |
| 247 | * |
| 248 | * Vector version of the basic ushort type. Provides three ushort fields packed |
| 249 | * into a single 64 bit field with 64 bit alignment. |
| 250 | */ |
| 251 | typedef ushort __attribute__((ext_vector_type(3))) ushort3; |
| 252 | |
| 253 | /* |
| 254 | * ushort4: Four 16 bit unsigned integers |
| 255 | * |
| 256 | * Vector version of the basic ushort type. Provides four ushort fields packed |
| 257 | * into a single 64 bit field with 64 bit alignment. |
| 258 | */ |
| 259 | typedef ushort __attribute__((ext_vector_type(4))) ushort4; |
| 260 | |
| 261 | /* |
| 262 | * uint2: Two 32 bit unsigned integers |
| 263 | * |
| 264 | * Vector version of the basic uint type. Provides two uint fields packed into a |
| 265 | * single 64 bit field with 64 bit alignment. |
| 266 | */ |
| 267 | typedef uint __attribute__((ext_vector_type(2))) uint2; |
| 268 | |
| 269 | /* |
| 270 | * uint3: Three 32 bit unsigned integers |
| 271 | * |
| 272 | * Vector version of the basic uint type. Provides three uint fields packed into |
| 273 | * a single 128 bit field with 128 bit alignment. |
| 274 | */ |
| 275 | typedef uint __attribute__((ext_vector_type(3))) uint3; |
| 276 | |
| 277 | /* |
| 278 | * uint4: Four 32 bit unsigned integers |
| 279 | * |
| 280 | * Vector version of the basic uint type. Provides four uint fields packed into |
| 281 | * a single 128 bit field with 128 bit alignment. |
| 282 | */ |
| 283 | typedef uint __attribute__((ext_vector_type(4))) uint4; |
| 284 | |
| 285 | /* |
| 286 | * ulong2: Two 64 bit unsigned integers |
| 287 | * |
| 288 | * Vector version of the basic ulong type. Provides two ulong fields packed into |
| 289 | * a single 128 bit field with 128 bit alignment. |
| 290 | */ |
| 291 | typedef ulong __attribute__((ext_vector_type(2))) ulong2; |
| 292 | |
| 293 | /* |
| 294 | * ulong3: Three 64 bit unsigned integers |
| 295 | * |
| 296 | * Vector version of the basic ulong type. Provides three ulong fields packed |
| 297 | * into a single 256 bit field with 256 bit alignment. |
| 298 | */ |
| 299 | typedef ulong __attribute__((ext_vector_type(3))) ulong3; |
| 300 | |
| 301 | /* |
| 302 | * ulong4: Four 64 bit unsigned integers |
| 303 | * |
| 304 | * Vector version of the basic ulong type. Provides four ulong fields packed |
| 305 | * into a single 256 bit field with 256 bit alignment. |
| 306 | */ |
| 307 | typedef ulong __attribute__((ext_vector_type(4))) ulong4; |
| 308 | |
| 309 | /* |
| 310 | * char2: Two 8 bit signed integers |
| 311 | * |
| 312 | * Vector version of the basic char type. Provides two char fields packed into a |
| 313 | * single 16 bit field with 16 bit alignment. |
| 314 | */ |
| 315 | typedef char __attribute__((ext_vector_type(2))) char2; |
| 316 | |
| 317 | /* |
| 318 | * char3: Three 8 bit signed integers |
| 319 | * |
| 320 | * Vector version of the basic char type. Provides three char fields packed into |
| 321 | * a single 32 bit field with 32 bit alignment. |
| 322 | */ |
| 323 | typedef char __attribute__((ext_vector_type(3))) char3; |
| 324 | |
| 325 | /* |
| 326 | * char4: Four 8 bit signed integers |
| 327 | * |
| 328 | * Vector version of the basic char type. Provides four char fields packed into |
| 329 | * a single 32 bit field with 32 bit alignment. |
| 330 | */ |
| 331 | typedef char __attribute__((ext_vector_type(4))) char4; |
| 332 | |
| 333 | /* |
| 334 | * short2: Two 16 bit signed integers |
| 335 | * |
| 336 | * Vector version of the basic short type. Provides two short fields packed into |
| 337 | * a single 32 bit field with 32 bit alignment. |
| 338 | */ |
| 339 | typedef short __attribute__((ext_vector_type(2))) short2; |
| 340 | |
| 341 | /* |
| 342 | * short3: Three 16 bit signed integers |
| 343 | * |
| 344 | * Vector version of the basic short type. Provides three short fields packed |
| 345 | * into a single 64 bit field with 64 bit alignment. |
| 346 | */ |
| 347 | typedef short __attribute__((ext_vector_type(3))) short3; |
| 348 | |
| 349 | /* |
| 350 | * short4: Four 16 bit signed integers |
| 351 | * |
| 352 | * Vector version of the basic short type. Provides four short fields packed |
| 353 | * into a single 64 bit field with 64 bit alignment. |
| 354 | */ |
| 355 | typedef short __attribute__((ext_vector_type(4))) short4; |
| 356 | |
| 357 | /* |
| 358 | * int2: Two 32 bit signed integers |
| 359 | * |
| 360 | * Vector version of the basic int type. Provides two int fields packed into a |
| 361 | * single 64 bit field with 64 bit alignment. |
| 362 | */ |
| 363 | typedef int __attribute__((ext_vector_type(2))) int2; |
| 364 | |
| 365 | /* |
| 366 | * int3: Three 32 bit signed integers |
| 367 | * |
| 368 | * Vector version of the basic int type. Provides three int fields packed into a |
| 369 | * single 128 bit field with 128 bit alignment. |
| 370 | */ |
| 371 | typedef int __attribute__((ext_vector_type(3))) int3; |
| 372 | |
| 373 | /* |
| 374 | * int4: Four 32 bit signed integers |
| 375 | * |
| 376 | * Vector version of the basic int type. Provides two four fields packed into a |
| 377 | * single 128 bit field with 128 bit alignment. |
| 378 | */ |
| 379 | typedef int __attribute__((ext_vector_type(4))) int4; |
| 380 | |
| 381 | /* |
| 382 | * long2: Two 64 bit signed integers |
| 383 | * |
| 384 | * Vector version of the basic long type. Provides two long fields packed into a |
| 385 | * single 128 bit field with 128 bit alignment. |
| 386 | */ |
| 387 | typedef long __attribute__((ext_vector_type(2))) long2; |
| 388 | |
| 389 | /* |
| 390 | * long3: Three 64 bit signed integers |
| 391 | * |
| 392 | * Vector version of the basic long type. Provides three long fields packed into |
| 393 | * a single 256 bit field with 256 bit alignment. |
| 394 | */ |
| 395 | typedef long __attribute__((ext_vector_type(3))) long3; |
| 396 | |
| 397 | /* |
| 398 | * long4: Four 64 bit signed integers |
| 399 | * |
| 400 | * Vector version of the basic long type. Provides four long fields packed into |
| 401 | * a single 256 bit field with 256 bit alignment. |
| 402 | */ |
| 403 | typedef long __attribute__((ext_vector_type(4))) long4; |
| 404 | |
| 405 | #endif // RENDERSCRIPT_RS_VALUE_TYPES_RSH |