aboutsummaryrefslogtreecommitdiff
path: root/libclc/generic/lib/math/fmod.cl
diff options
context:
space:
mode:
Diffstat (limited to 'libclc/generic/lib/math/fmod.cl')
-rw-r--r--libclc/generic/lib/math/fmod.cl12
1 files changed, 12 insertions, 0 deletions
diff --git a/libclc/generic/lib/math/fmod.cl b/libclc/generic/lib/math/fmod.cl
new file mode 100644
index 0000000..f9a4e31
--- /dev/null
+++ b/libclc/generic/lib/math/fmod.cl
@@ -0,0 +1,12 @@
+#include <clc/clc.h>
+#include "../clcmacro.h"
+
+_CLC_DEFINE_BINARY_BUILTIN(float, fmod, __builtin_fmodf, float, float)
+
+#ifdef cl_khr_fp64
+
+#pragma OPENCL EXTENSION cl_khr_fp64 : enable
+
+_CLC_DEFINE_BINARY_BUILTIN(double, fmod, __builtin_fmod, double, double)
+
+#endif