summaryrefslogtreecommitdiffstats
path: root/libclc/generic/include/clc/math
diff options
context:
space:
mode:
Diffstat (limited to 'libclc/generic/include/clc/math')
-rw-r--r--libclc/generic/include/clc/math/binary_decl_tt.inc1
-rw-r--r--libclc/generic/include/clc/math/native_divide.h8
2 files changed, 8 insertions, 1 deletions
diff --git a/libclc/generic/include/clc/math/binary_decl_tt.inc b/libclc/generic/include/clc/math/binary_decl_tt.inc
new file mode 100644
index 00000000000..3166476ab53
--- /dev/null
+++ b/libclc/generic/include/clc/math/binary_decl_tt.inc
@@ -0,0 +1 @@
+_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE a, __CLC_GENTYPE b);
diff --git a/libclc/generic/include/clc/math/native_divide.h b/libclc/generic/include/clc/math/native_divide.h
index 5c52167fd3e..1bc6cf58368 100644
--- a/libclc/generic/include/clc/math/native_divide.h
+++ b/libclc/generic/include/clc/math/native_divide.h
@@ -1 +1,7 @@
-#define native_divide(x, y) ((x) / (y))
+#define __CLC_BODY <clc/math/binary_decl_tt.inc>
+#define __CLC_FUNCTION native_divide
+
+#include <clc/math/gentype.inc>
+
+#undef __CLC_BODY
+#undef __CLC_FUNCTION
OpenPOWER on IntegriCloud