aboutsummaryrefslogtreecommitdiff
path: root/libclc/amdgpu
diff options
context:
space:
mode:
authorJan Vesely <jan.vesely@rutgers.edu>2018-02-13 22:09:44 +0000
committerJan Vesely <jan.vesely@rutgers.edu>2018-02-13 22:09:44 +0000
commited28c4458a873d496c66ed87a93e3e8d0da21e20 (patch)
tree04c5bda6e0538dd05d082b26fbdf3f34773f8057 /libclc/amdgpu
parent86cbf56a4bc20a2e3f5a0c87492cf11fb837ea92 (diff)
downloadllvm-ed28c4458a873d496c66ed87a93e3e8d0da21e20.zip
llvm-ed28c4458a873d496c66ed87a93e3e8d0da21e20.tar.gz
llvm-ed28c4458a873d496c66ed87a93e3e8d0da21e20.tar.bz2
amdgpu/half_log2: Switch implementation to native_log2
Reviewer: Tom Stellard <tstellar@redhat.com> Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 325060
Diffstat (limited to 'libclc/amdgpu')
-rw-r--r--libclc/amdgpu/lib/SOURCES1
-rw-r--r--libclc/amdgpu/lib/math/half_log2.cl6
2 files changed, 7 insertions, 0 deletions
diff --git a/libclc/amdgpu/lib/SOURCES b/libclc/amdgpu/lib/SOURCES
index c86b2ec..c6dc3bd 100644
--- a/libclc/amdgpu/lib/SOURCES
+++ b/libclc/amdgpu/lib/SOURCES
@@ -6,6 +6,7 @@ math/half_exp10.cl
math/half_exp2.cl
math/half_log.cl
math/half_log10.cl
+math/half_log2.cl
math/half_rsqrt.cl
math/half_sqrt.cl
math/nextafter.cl
diff --git a/libclc/amdgpu/lib/math/half_log2.cl b/libclc/amdgpu/lib/math/half_log2.cl
new file mode 100644
index 0000000..51645f4
--- /dev/null
+++ b/libclc/amdgpu/lib/math/half_log2.cl
@@ -0,0 +1,6 @@
+#include <clc/clc.h>
+
+#define __CLC_FUNC log2
+#define __FLOAT_ONLY
+#define __CLC_BODY <half_native_unary.inc>
+#include <clc/math/gentype.inc>