Signed-off-by: rander <rander.w...@intel.com> --- backend/src/libocl/script/ocl_convert.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
diff --git a/backend/src/libocl/script/ocl_convert.sh b/backend/src/libocl/script/ocl_convert.sh index ed9abeb..b23022e 100755 --- a/backend/src/libocl/script/ocl_convert.sh +++ b/backend/src/libocl/script/ocl_convert.sh @@ -758,6 +758,7 @@ OVERLOADABLE long convert_long_rtp(double x) ' fi +# convert_u|char|short|int_rte(double x) 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` @@ -767,6 +768,7 @@ for ttype in $ITYPES; do fi done +# convert_u|char|short|int_rte(double x) IUTYPES="ulong:8 uint:4 ushort:2 uchar:1" for ttype in $IUTYPES; do tbasetype=`IFS=:; set -- dummy $ttype; echo $2` @@ -788,6 +790,25 @@ for ttype in $ITYPES; do fi done +# convert_u|char|short|int_rtp(double x) +IUTYPES="uint:4 ushort:2 uchar:1" +for ttype in $IUTYPES; do + tbasetype=`IFS=:; set -- dummy $ttype; echo $2` + if [ $1"a" != "-pa" ]; then + echo "OVERLOADABLE $tbasetype convert_${tbasetype}_rtp(double x)" + echo "{ return ($tbasetype)convert_ulong_rtp(x);}" + fi +done + +ITYPES="int:4 short:2 char:1" +for ttype in $ITYPES; do + tbasetype=`IFS=:; set -- dummy $ttype; echo $2` + if [ $1"a" != "-pa" ]; then + echo "OVERLOADABLE $tbasetype convert_${tbasetype}_rtp(double x)" + echo " { return ($tbasetype)convert_long_rtp(x);}" + fi +done + # convert_DSTTYPE_ROUNDING function for vector_length in $VECTOR_LENGTHS; do for ftype in $TYPES; do -- 2.7.4 _______________________________________________ Beignet mailing list Beignet@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/beignet