diff options
| author | Jan Vesely <jan.vesely@rutgers.edu> | 2017-10-22 14:21:59 +0000 |
|---|---|---|
| committer | Jan Vesely <jan.vesely@rutgers.edu> | 2017-10-22 14:21:59 +0000 |
| commit | 7ab2d0bdcdc218d83faa90751a2cf2f34587ccc1 (patch) | |
| tree | bd4fa077bc91f8797abc47f85bd5e3452e7cf3a8 /libclc/generic/include/clc/shared | |
| parent | 12061c7125f9e3548103914d1b30f7a19abe5008 (diff) | |
| download | bcm5719-llvm-7ab2d0bdcdc218d83faa90751a2cf2f34587ccc1.tar.gz bcm5719-llvm-7ab2d0bdcdc218d83faa90751a2cf2f34587ccc1.zip | |
shared: Implement aligned vector stores (vstorea_half)
Float version passes newly posted piglit tests on turks, float and double pass on carrizo.
v2: scalar vstorea_half
v3: fix typo
Reviewer: Aaron Watry
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 316291
Diffstat (limited to 'libclc/generic/include/clc/shared')
| -rw-r--r-- | libclc/generic/include/clc/shared/vstore.h | 41 |
1 files changed, 28 insertions, 13 deletions
diff --git a/libclc/generic/include/clc/shared/vstore.h b/libclc/generic/include/clc/shared/vstore.h index 0e3f694b90c..a246d52f205 100644 --- a/libclc/generic/include/clc/shared/vstore.h +++ b/libclc/generic/include/clc/shared/vstore.h @@ -16,37 +16,52 @@ #define _CLC_VECTOR_VSTORE_PRIM1(PRIM_TYPE) \ _CLC_VECTOR_VSTORE_PRIM3(,PRIM_TYPE, PRIM_TYPE) \ -#define _CLC_VECTOR_VSTORE_PRIM() \ - _CLC_VECTOR_VSTORE_PRIM1(char) \ - _CLC_VECTOR_VSTORE_PRIM1(uchar) \ - _CLC_VECTOR_VSTORE_PRIM1(short) \ - _CLC_VECTOR_VSTORE_PRIM1(ushort) \ - _CLC_VECTOR_VSTORE_PRIM1(int) \ - _CLC_VECTOR_VSTORE_PRIM1(uint) \ - _CLC_VECTOR_VSTORE_PRIM1(long) \ - _CLC_VECTOR_VSTORE_PRIM1(ulong) \ - _CLC_VECTOR_VSTORE_PRIM1(float) \ - _CLC_VECTOR_VSTORE_PRIM3(_half, half, float) +_CLC_VECTOR_VSTORE_PRIM1(char) +_CLC_VECTOR_VSTORE_PRIM1(uchar) +_CLC_VECTOR_VSTORE_PRIM1(short) +_CLC_VECTOR_VSTORE_PRIM1(ushort) +_CLC_VECTOR_VSTORE_PRIM1(int) +_CLC_VECTOR_VSTORE_PRIM1(uint) +_CLC_VECTOR_VSTORE_PRIM1(long) +_CLC_VECTOR_VSTORE_PRIM1(ulong) +_CLC_VECTOR_VSTORE_PRIM1(float) +_CLC_VECTOR_VSTORE_PRIM3(_half, half, float) +// Use suffix to declare aligned vstorea_halfN +_CLC_VECTOR_VSTORE_PRIM3(a_half, half, float) #ifdef cl_khr_fp64 _CLC_VECTOR_VSTORE_PRIM1(double) _CLC_VECTOR_VSTORE_PRIM3(_half, half, double) + // Use suffix to declare aligned vstorea_halfN + _CLC_VECTOR_VSTORE_PRIM3(a_half, half, double) + + // Scalar vstore_half also needs to be declared _CLC_VSTORE_DECL(_half, half, double, , __private) _CLC_VSTORE_DECL(_half, half, double, , __local) _CLC_VSTORE_DECL(_half, half, double, , __global) + + // Scalar vstorea_half is not part of the specs but CTS expects it + _CLC_VSTORE_DECL(a_half, half, double, , __private) + _CLC_VSTORE_DECL(a_half, half, double, , __local) + _CLC_VSTORE_DECL(a_half, half, double, , __global) #endif #ifdef cl_khr_fp16 _CLC_VECTOR_VSTORE_PRIM1(half) #endif -_CLC_VECTOR_VSTORE_PRIM() +// Scalar vstore_half also needs to be declared _CLC_VSTORE_DECL(_half, half, float, , __private) _CLC_VSTORE_DECL(_half, half, float, , __local) _CLC_VSTORE_DECL(_half, half, float, , __global) +// Scalar vstorea_half is not part of the specs but CTS expects it +_CLC_VSTORE_DECL(a_half, half, float, , __private) +_CLC_VSTORE_DECL(a_half, half, float, , __local) +_CLC_VSTORE_DECL(a_half, half, float, , __global) + + #undef _CLC_VSTORE_DECL #undef _CLC_VECTOR_VSTORE_DECL #undef _CLC_VECTOR_VSTORE_PRIM3 #undef _CLC_VECTOR_VSTORE_PRIM1 -#undef _CLC_VECTOR_VSTORE_PRIM |

