diff options
| author | Jason Sams <rjsams@android.com> | 2010-05-11 14:03:58 -0700 |
|---|---|---|
| committer | Jason Sams <rjsams@android.com> | 2010-05-11 14:03:58 -0700 |
| commit | 4d3399337d18ef04116bc8a2e5799274655d0c30 (patch) | |
| tree | a264ecb82632516adb510a2ca49d3cac750d54d0 /libs/rs/rsUtils.h | |
| parent | 810f5ccb99a8a05a6d1617b19a4efb2399450318 (diff) | |
| download | frameworks_base-4d3399337d18ef04116bc8a2e5799274655d0c30.zip frameworks_base-4d3399337d18ef04116bc8a2e5799274655d0c30.tar.gz frameworks_base-4d3399337d18ef04116bc8a2e5799274655d0c30.tar.bz2 | |
Convert renderscript from using ACC to LLVM for its compiler.
This will also require application to be updated to support
the new compiler and data passing models.
Change-Id: If078e3a5148af395ba1b936169a407d8c3ad727f
Diffstat (limited to 'libs/rs/rsUtils.h')
| -rw-r--r-- | libs/rs/rsUtils.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/libs/rs/rsUtils.h b/libs/rs/rsUtils.h index 07f8933..adddf49 100644 --- a/libs/rs/rsUtils.h +++ b/libs/rs/rsUtils.h @@ -41,6 +41,38 @@ namespace renderscript { #define rsAssert(v) while(0) #endif +typedef float rsvF_2 __attribute__ ((vector_size (8))); +typedef float rsvF_4 __attribute__ ((vector_size (16))); +typedef float rsvF_8 __attribute__ ((vector_size (32))); +typedef float rsvF_16 __attribute__ ((vector_size (64))); +typedef uint8_t rsvU8_4 __attribute__ ((vector_size (4))); + +union float2 { + rsvF_2 v; + float f[2]; +}; + +union float4 { + rsvF_4 v; + float f[4]; +}; + +union float8 { + rsvF_8 v; + float f[8]; +}; + +union float16 { + rsvF_16 v; + float f[16]; +}; + +union uchar4 { + rsvU8_4 v; + uint8_t f[4]; + uint32_t packed; +}; + template<typename T> T rsMin(T in1, T in2) { |
