[libclc] 47/79: Add vstore_half_rtp implementation
Andreas Boll
aboll-guest at moszumanska.debian.org
Mon Mar 19 16:50:59 UTC 2018
This is an automated email from the git hooks/post-receive script.
aboll-guest pushed a commit to branch master
in repository libclc.
commit 95849e01f33bd7b72ec35fba1eb1ccf9d60fa9b0
Author: Jan Vesely <jan.vesely at rutgers.edu>
Date: Tue Feb 6 18:44:47 2018 +0000
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>
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@324375 91177308-0d34-0410-b5e6-96231b3b80d8
---
generic/include/clc/shared/vstore.h | 2 ++
generic/lib/shared/vstore.cl | 11 ++++++++++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/generic/include/clc/shared/vstore.h b/generic/include/clc/shared/vstore.h
index 8639be7..b510e0a 100644
--- a/generic/include/clc/shared/vstore.h
+++ b/generic/include/clc/shared/vstore.h
@@ -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
diff --git a/generic/lib/shared/vstore.cl b/generic/lib/shared/vstore.cl
index 243c2f2..2bfb369 100644
--- a/generic/lib/shared/vstore.cl
+++ b/generic/lib/shared/vstore.cl
@@ -143,6 +143,10 @@ _CLC_DEF _CLC_OVERLOAD float __clc_rtn(float x)
{
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(double x)
{
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)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/libclc.git
More information about the Pkg-opencl-commits
mailing list