diff options
| author | Jan Vesely <jan.vesely@rutgers.edu> | 2018-01-18 21:11:58 +0000 |
|---|---|---|
| committer | Jan Vesely <jan.vesely@rutgers.edu> | 2018-01-18 21:11:58 +0000 |
| commit | 398108b91e0a7fa01d8216406bc6a0c6f1e2ff43 (patch) | |
| tree | 1e816cc715b4e7aa1e7cfe461c850d8ddc0633d4 /libclc/generic/lib/math | |
| parent | a1aba44ffa742e02b0b0cc555d8359d456402fc2 (diff) | |
| download | bcm5719-llvm-398108b91e0a7fa01d8216406bc6a0c6f1e2ff43.tar.gz bcm5719-llvm-398108b91e0a7fa01d8216406bc6a0c6f1e2ff43.zip | |
half_recip: Implement using 1/x
Passes CTS on carrizo
v2: Use full precision implementation
Reviewer: Jeroen Ketema <j.ketema@xs4all.nl>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 322896
Diffstat (limited to 'libclc/generic/lib/math')
| -rw-r--r-- | libclc/generic/lib/math/half_recip.cl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libclc/generic/lib/math/half_recip.cl b/libclc/generic/lib/math/half_recip.cl new file mode 100644 index 00000000000..c0b5c00c5e3 --- /dev/null +++ b/libclc/generic/lib/math/half_recip.cl @@ -0,0 +1,10 @@ +#include <clc/clc.h> + +#define recip(x) (1.0f/x) + +#define __CLC_FUNC recip +#define __CLC_BODY <half_unary.inc> +#define __FLOAT_ONLY +#include <clc/math/gentype.inc> + +#undef recip |

