Signed-off-by: rander <[email protected]>
---
backend/src/libocl/script/ocl_convert.sh | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/backend/src/libocl/script/ocl_convert.sh
b/backend/src/libocl/script/ocl_convert.sh
index b826b38..fe5c1ec 100755
--- a/backend/src/libocl/script/ocl_convert.sh
+++ b/backend/src/libocl/script/ocl_convert.sh
@@ -550,6 +550,26 @@ OVERLOADABLE float __convert_float_rtn(uint x)
return __convert_float_rtz(x);
}
+OVERLOADABLE char convert_char_rtn(double x)
+{
+ return (char)convert_int_rtn(x);
+}
+
+OVERLOADABLE uchar convert_uchar_rtn(double x)
+{
+ return (uchar)convert_int_rtn(x);
+}
+
+OVERLOADABLE short convert_short_rtn(double x)
+{
+ return (short)convert_int_rtn(x);
+}
+
+OVERLOADABLE ushort convert_ushort_rtn(double x)
+{
+ return (ushort)convert_int_rtn(x);
+}
+
OVERLOADABLE int convert_int_rtn(double x)
{
int ret, iexp ;
--
2.7.4
_______________________________________________
Beignet mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/beignet