summaryrefslogtreecommitdiffstats
path: root/libclc/generic/include/clc
diff options
context:
space:
mode:
Diffstat (limited to 'libclc/generic/include/clc')
-rw-r--r--libclc/generic/include/clc/math/sqrt.h9
-rw-r--r--libclc/generic/include/clc/math/sqrt.inc1
2 files changed, 4 insertions, 6 deletions
diff --git a/libclc/generic/include/clc/math/sqrt.h b/libclc/generic/include/clc/math/sqrt.h
index f69de847e62..ccde9748adb 100644
--- a/libclc/generic/include/clc/math/sqrt.h
+++ b/libclc/generic/include/clc/math/sqrt.h
@@ -1,6 +1,3 @@
-#undef sqrt
-#define sqrt __clc_sqrt
-
-#define __CLC_FUNCTION __clc_sqrt
-#define __CLC_INTRINSIC "llvm.sqrt"
-#include <clc/math/unary_intrin.inc>
+#define __CLC_BODY <clc/math/sqrt.inc>
+#include <clc/math/gentype.inc>
+#undef __CLC_BODY
diff --git a/libclc/generic/include/clc/math/sqrt.inc b/libclc/generic/include/clc/math/sqrt.inc
new file mode 100644
index 00000000000..f629fac761b
--- /dev/null
+++ b/libclc/generic/include/clc/math/sqrt.inc
@@ -0,0 +1 @@
+_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE sqrt(__CLC_GENTYPE a);
OpenPOWER on IntegriCloud