Skip to content

Commit edb2d88

Browse files
committed
simplify
1 parent f16641c commit edb2d88

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

libclc/clc/include/clc/common/unary_def.inc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#include <clc/utils.h>
22

3+
#ifndef __CLC_FUNCTION
34
#define __CLC_FUNCTION(x) __CLC_CONCAT(__clc_, x)
5+
#endif
46

57
_CLC_OVERLOAD _CLC_DEF __CLC_FLOATN FUNCTION(__CLC_FLOATN a) {
68
return __CLC_FUNCTION(FUNCTION)(a);

libclc/generic/lib/common/sign.cl

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,7 @@
22
#include <clc/clcmacro.h>
33
#include <clc/common/clc_sign.h>
44

5-
_CLC_DEFINE_UNARY_BUILTIN(float, sign, __clc_sign, float)
5+
#define FUNCTION sign
6+
#define __CLC_BODY "unary_def.inc"
67

7-
#ifdef cl_khr_fp64
8-
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
9-
10-
_CLC_DEFINE_UNARY_BUILTIN(double, sign, __clc_sign, double)
11-
12-
#endif
13-
14-
#ifdef cl_khr_fp16
15-
#pragma OPENCL EXTENSION cl_khr_fp16 : enable
16-
17-
_CLC_DEFINE_UNARY_BUILTIN(half, sign, __clc_sign, half)
18-
19-
#endif
8+
#include <clc/common/floatn.inc>

0 commit comments

Comments
 (0)