File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
libclc/clc/lib/generic/geometric Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change 1010#if (__CLC_VECSIZE_OR_1 == 1 || __CLC_VECSIZE_OR_1 == 2 || \
1111 __CLC_VECSIZE_OR_1 == 3 || __CLC_VECSIZE_OR_1 == 4 )
1212
13- // Until we have a native FP16 implementation, go via FP32
14- #if __CLC_FPSIZE == 16
15-
16- _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE __clc_normalize (__CLC_GENTYPE p) {
17- return __CLC_CONVERT_GENTYPE (__clc_normalize (__CLC_CONVERT_FLOATN (p)));
18- }
19-
2013// Scalar normalize
21- # elif defined(__CLC_SCALAR)
14+ #if defined (__CLC_SCALAR)
2215
2316_CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE __clc_normalize (__CLC_GENTYPE p) {
2417 return __clc_sign (p);
@@ -27,7 +20,13 @@ _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE __clc_normalize(__CLC_GENTYPE p) {
2720// Vector normalize
2821#else
2922
30- #if __CLC_FPSIZE == 32
23+ #if __CLC_FPSIZE == 16
24+
25+ # define MIN_VAL HALF_MIN
26+ # define MAX_SQRT 0x 1.0p +8h
27+ # define MIN_SQRT 0x 1.0p -8h
28+
29+ # elif __CLC_FPSIZE == 32
3130
3231# define MIN_VAL FLT_MIN
3332# define MAX_SQRT 0x 1.0p +86F
You can’t perform that action at this time.
0 commit comments