diff options
| author | Jan Vesely <jan.vesely@rutgers.edu> | 2017-11-13 18:28:56 +0000 |
|---|---|---|
| committer | Jan Vesely <jan.vesely@rutgers.edu> | 2017-11-13 18:28:56 +0000 |
| commit | f38b40daf7eb0295d1a3541fb1ceb5844702133d (patch) | |
| tree | 9af71dace949697fc32fa411f4f1496adbfd6bbe /libclc/generic/include/clc | |
| parent | 1b9825f98264fa4c30add82164db327578dcbdf4 (diff) | |
| download | bcm5719-llvm-f38b40daf7eb0295d1a3541fb1ceb5844702133d.tar.gz bcm5719-llvm-f38b40daf7eb0295d1a3541fb1ceb5844702133d.zip | |
native_divide: provide function implementation instead of macro
Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 318067
Diffstat (limited to 'libclc/generic/include/clc')
| -rw-r--r-- | libclc/generic/include/clc/math/binary_decl_tt.inc | 1 | ||||
| -rw-r--r-- | libclc/generic/include/clc/math/native_divide.h | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/libclc/generic/include/clc/math/binary_decl_tt.inc b/libclc/generic/include/clc/math/binary_decl_tt.inc new file mode 100644 index 00000000000..3166476ab53 --- /dev/null +++ b/libclc/generic/include/clc/math/binary_decl_tt.inc @@ -0,0 +1 @@ +_CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION(__CLC_GENTYPE a, __CLC_GENTYPE b); diff --git a/libclc/generic/include/clc/math/native_divide.h b/libclc/generic/include/clc/math/native_divide.h index 5c52167fd3e..1bc6cf58368 100644 --- a/libclc/generic/include/clc/math/native_divide.h +++ b/libclc/generic/include/clc/math/native_divide.h @@ -1 +1,7 @@ -#define native_divide(x, y) ((x) / (y)) +#define __CLC_BODY <clc/math/binary_decl_tt.inc> +#define __CLC_FUNCTION native_divide + +#include <clc/math/gentype.inc> + +#undef __CLC_BODY +#undef __CLC_FUNCTION |

