Skip to content

Commit 78703d9

Browse files
committed
Fix conflict resolution in libclc
1 parent 200d768 commit 78703d9

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

libclc/generic/lib/clcmacro.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@
140140
return (RET_TYPE##16)(FUNCTION(x, y, z.lo), FUNCTION(x, y, z.hi)); \
141141
}
142142

143-
144143
#define _CLC_V_V_VP_VECTORIZE(DECLSPEC, RET_TYPE, FUNCTION, ARG1_TYPE, \
145144
ADDR_SPACE, ARG2_TYPE) \
146145
DECLSPEC RET_TYPE##2 FUNCTION(ARG1_TYPE##2 x, ADDR_SPACE ARG2_TYPE##2 * y) { \

libclc/generic/lib/math/clc_ldexp.cl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,15 @@ _CLC_DEF _CLC_OVERLOAD double __clc_ldexp(double x, int n) {
126126
}
127127

128128
#endif
129+
130+
#ifdef cl_khr_fp16
131+
132+
#pragma OPENCL EXTENSION cl_khr_fp16 : enable
133+
134+
_CLC_OVERLOAD _CLC_DEF half __clc_ldexp(half x, int n) {
135+
return (half)__clc_ldexp((float)x, n);
136+
}
137+
138+
_CLC_BINARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, half, __clc_ldexp, half, int);
139+
140+
#endif

0 commit comments

Comments
 (0)