Skip to content

Commit

Permalink
Fix conflict resolution in libclc
Browse files Browse the repository at this point in the history
  • Loading branch information
jsji committed Aug 22, 2024
1 parent 200d768 commit 78703d9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 0 additions & 1 deletion libclc/generic/lib/clcmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@
return (RET_TYPE##16)(FUNCTION(x, y, z.lo), FUNCTION(x, y, z.hi)); \
}


#define _CLC_V_V_VP_VECTORIZE(DECLSPEC, RET_TYPE, FUNCTION, ARG1_TYPE, \
ADDR_SPACE, ARG2_TYPE) \
DECLSPEC RET_TYPE##2 FUNCTION(ARG1_TYPE##2 x, ADDR_SPACE ARG2_TYPE##2 * y) { \
Expand Down
12 changes: 12 additions & 0 deletions libclc/generic/lib/math/clc_ldexp.cl
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,15 @@ _CLC_DEF _CLC_OVERLOAD double __clc_ldexp(double x, int n) {
}

#endif

#ifdef cl_khr_fp16

#pragma OPENCL EXTENSION cl_khr_fp16 : enable

_CLC_OVERLOAD _CLC_DEF half __clc_ldexp(half x, int n) {
return (half)__clc_ldexp((float)x, n);
}

_CLC_BINARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, half, __clc_ldexp, half, int);

#endif

0 comments on commit 78703d9

Please sign in to comment.