[libclc] 215/291: Implement fmod

Andreas Beckmann anbe at moszumanska.debian.org
Tue Sep 8 10:53:51 UTC 2015


This is an automated email from the git hooks/post-receive script.

anbe pushed a commit to branch master
in repository libclc.

commit 254d4dc0b9169131222d19c48b3559d53111a780
Author: Jan Vesely <jan.vesely at rutgers.edu>
Date:   Sun Oct 5 20:24:52 2014 +0000

    Implement fmod
    
    Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
    Reviewed-by: Tom Stellard <tom at stellard.net>
    Reviewed-by: Aaron Watry <awatry at gmail.com>
    
    git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@219087 91177308-0d34-0410-b5e6-96231b3b80d8
---
 generic/include/clc/clc.h         |  1 +
 generic/include/clc/math/fmod.h   |  2 ++
 generic/include/clc/math/fmod.inc |  1 +
 generic/lib/SOURCES               |  1 +
 generic/lib/math/fmod.cl          | 12 ++++++++++++
 5 files changed, 17 insertions(+)

diff --git a/generic/include/clc/clc.h b/generic/include/clc/clc.h
index 2afbcfd..ff63fb0 100644
--- a/generic/include/clc/clc.h
+++ b/generic/include/clc/clc.h
@@ -47,6 +47,7 @@
 #include <clc/math/fma.h>
 #include <clc/math/fmax.h>
 #include <clc/math/fmin.h>
+#include <clc/math/fmod.h>
 #include <clc/math/hypot.h>
 #include <clc/math/log.h>
 #include <clc/math/log2.h>
diff --git a/generic/include/clc/math/fmod.h b/generic/include/clc/math/fmod.h
new file mode 100644
index 0000000..4906867
--- /dev/null
+++ b/generic/include/clc/math/fmod.h
@@ -0,0 +1,2 @@
+#define __CLC_BODY <clc/math/fmod.inc>
+#include <clc/math/gentype.inc>
diff --git a/generic/include/clc/math/fmod.inc b/generic/include/clc/math/fmod.inc
new file mode 100644
index 0000000..39d9153
--- /dev/null
+++ b/generic/include/clc/math/fmod.inc
@@ -0,0 +1 @@
+_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE fmod(__CLC_GENTYPE a, __CLC_GENTYPE b);
diff --git a/generic/lib/SOURCES b/generic/lib/SOURCES
index f7b3adf..5918989 100644
--- a/generic/lib/SOURCES
+++ b/generic/lib/SOURCES
@@ -61,6 +61,7 @@ math/exp.cl
 math/exp10.cl
 math/fmax.cl
 math/fmin.cl
+math/fmod.cl
 math/hypot.cl
 math/mad.cl
 math/mix.cl
diff --git a/generic/lib/math/fmod.cl b/generic/lib/math/fmod.cl
new file mode 100644
index 0000000..f9a4e31
--- /dev/null
+++ b/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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/libclc.git



More information about the Pkg-opencl-commits mailing list