diff options
author | rander <rander.wang@intel.com> | 2017-03-09 14:37:10 +0800 |
---|---|---|
committer | Yang Rong <rong.r.yang@intel.com> | 2017-04-17 16:08:48 +0800 |
commit | 8fe155b01a5fb4a2b13d3f2c6c891ba7ad3243e4 (patch) | |
tree | fa6f412818b5fd92662e512ca4cbae16649e8ecb /backend | |
parent | d3fae551ee05246dbfecb148d0d95fd0ac5ae2c5 (diff) |
Backend: add double support to convert_u|char|u|short|u|int_rte(double x)
Signed-off-by: rander <rander.wang@intel.com>
Tested-by: Yang Rong <rong.r.yang@intel.com>
Diffstat (limited to 'backend')
-rwxr-xr-x | backend/src/libocl/script/ocl_convert.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/backend/src/libocl/script/ocl_convert.sh b/backend/src/libocl/script/ocl_convert.sh index ef65ff51..53fb82c1 100755 --- a/backend/src/libocl/script/ocl_convert.sh +++ b/backend/src/libocl/script/ocl_convert.sh @@ -713,6 +713,15 @@ OVERLOADABLE ulong convert_ulong_rte(double x) ' fi +ITYPES="int:4 uint:4 short:2 ushort:2 char:1 uchar:1" +for ttype in $ITYPES; do + tbasetype=`IFS=:; set -- dummy $ttype; echo $2` + if [ $1"a" != "-pa" ]; then + echo "OVERLOADABLE $tbasetype convert_${tbasetype}_rte(double x)" + echo "{ return ($tbasetype)convert_long_rte(x);}" + fi +done + # convert_DSTTYPE_ROUNDING function for vector_length in $VECTOR_LENGTHS; do for ftype in $TYPES; do |