[libclc] r324375 - Add vstore_half_rtp implementation
Jan Vesely via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 6 10:44:47 PST 2018
Author: jvesely
Date: Tue Feb 6 10:44:47 2018
New Revision: 324375
URL: http://llvm.org/viewvc/llvm-project?rev=324375&view=rev
Log:
Add vstore_half_rtp implementation
Passes CTS on carrizo
Reviewer: Jeroen Ketema <j.ketema at xs4all.nl>
Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
Modified:
libclc/trunk/generic/include/clc/shared/vstore.h
libclc/trunk/generic/lib/shared/vstore.cl
Modified: libclc/trunk/generic/include/clc/shared/vstore.h
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/include/clc/shared/vstore.h?rev=324375&r1=324374&r2=324375&view=diff
==============================================================================
--- libclc/trunk/generic/include/clc/shared/vstore.h (original)
+++ libclc/trunk/generic/include/clc/shared/vstore.h Tue Feb 6 10:44:47 2018
@@ -39,12 +39,14 @@ _CLC_VECTOR_VSTORE_PRIM1(float)
_CLC_VECTOR_VSTORE_HALF_PRIM1(float,)
_CLC_VECTOR_VSTORE_HALF_PRIM1(float, _rtz)
_CLC_VECTOR_VSTORE_HALF_PRIM1(float, _rtn)
+_CLC_VECTOR_VSTORE_HALF_PRIM1(float, _rtp)
#ifdef cl_khr_fp64
_CLC_VECTOR_VSTORE_PRIM1(double)
_CLC_VECTOR_VSTORE_HALF_PRIM1(double,)
_CLC_VECTOR_VSTORE_HALF_PRIM1(double, _rtz)
_CLC_VECTOR_VSTORE_HALF_PRIM1(double, _rtn)
+ _CLC_VECTOR_VSTORE_HALF_PRIM1(double, _rtp)
#endif
#ifdef cl_khr_fp16
Modified: libclc/trunk/generic/lib/shared/vstore.cl
URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/generic/lib/shared/vstore.cl?rev=324375&r1=324374&r2=324375&view=diff
==============================================================================
--- libclc/trunk/generic/lib/shared/vstore.cl (original)
+++ libclc/trunk/generic/lib/shared/vstore.cl Tue Feb 6 10:44:47 2018
@@ -143,6 +143,10 @@ _CLC_DEF _CLC_OVERLOAD float __clc_rtn(f
{
return ((as_uint(x) & 0x80000000) == 0) ? __clc_rtz(x) : __clc_rti(x);
}
+_CLC_DEF _CLC_OVERLOAD float __clc_rtp(float x)
+{
+ return ((as_uint(x) & 0x80000000) == 0) ? __clc_rti(x) : __clc_rtz(x);
+}
#ifdef cl_khr_fp64
_CLC_DEF _CLC_OVERLOAD double __clc_noop(double x)
@@ -184,12 +188,17 @@ _CLC_DEF _CLC_OVERLOAD double __clc_rtn(
{
return ((as_ulong(x) & 0x8000000000000000UL) == 0) ? __clc_rtz(x) : __clc_rti(x);
}
+_CLC_DEF _CLC_OVERLOAD double __clc_rtp(double x)
+{
+ return ((as_ulong(x) & 0x8000000000000000UL) == 0) ? __clc_rti(x) : __clc_rtz(x);
+}
#endif
#define __XFUNC(SUFFIX, VEC_SIZE, OFFSET, TYPE, STYPE, AS) \
__FUNC(SUFFIX, VEC_SIZE, OFFSET, TYPE, STYPE, AS, __clc_noop) \
__FUNC(SUFFIX ## _rtz, VEC_SIZE, OFFSET, TYPE, STYPE, AS, __clc_rtz) \
- __FUNC(SUFFIX ## _rtn, VEC_SIZE, OFFSET, TYPE, STYPE, AS, __clc_rtn)
+ __FUNC(SUFFIX ## _rtn, VEC_SIZE, OFFSET, TYPE, STYPE, AS, __clc_rtn) \
+ __FUNC(SUFFIX ## _rtp, VEC_SIZE, OFFSET, TYPE, STYPE, AS, __clc_rtp)
#define FUNC(SUFFIX, VEC_SIZE, OFFSET, TYPE, STYPE, AS) \
__XFUNC(SUFFIX, VEC_SIZE, OFFSET, TYPE, STYPE, AS)
More information about the cfe-commits
mailing list