Skip to content

Commit 1b49010

Browse files
t4c1bader
andauthored
Apply suggestions from code review
Apply review suggestions. Co-authored-by: Alexey Bader <[email protected]>
1 parent 9bbf569 commit 1b49010

File tree

4 files changed

+11
-13
lines changed

4 files changed

+11
-13
lines changed

libclc/ptx-nvidiacl/libspirv/math/fabs.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ _CLC_DEF _CLC_OVERLOAD uint __clc_fabs(uint x) {
3434
__builtin_trap();
3535
__builtin_unreachable();
3636
}
37-
_CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, uint, __clc_fabs, uint)
37+
_CLC_UNARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, uint, __clc_fabs, uint)

libclc/ptx-nvidiacl/libspirv/math/fmax.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@ _CLC_DEF _CLC_OVERLOAD uint __clc_fmax(uint x, uint y) {
6868
__builtin_unreachable();
6969
}
7070
_CLC_BINARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, uint, __clc_fmax, uint,
71-
uint)
71+
uint)

libclc/ptx-nvidiacl/libspirv/math/fmin.cl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@ _CLC_DEF _CLC_OVERLOAD uint __clc_fmin(uint x, uint y) {
6868
__builtin_unreachable();
6969
}
7070
_CLC_BINARY_VECTORIZE(_CLC_OVERLOAD _CLC_DEF, uint, __clc_fmin, uint,
71-
uint)
71+
uint)

libclc/ptx-nvidiacl/libspirv/math/native_exp2.cl

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,21 @@ int __clc_nvvm_reflect_arch();
2323
_CLC_DEF _CLC_OVERLOAD half __spirv_ocl_native_exp2(half x) {
2424
if (__clc_nvvm_reflect_arch() >= 750) {
2525
return __nvvm_ex2_approx_f16(x);
26-
} else {
27-
float upcast = x;
28-
return __spirv_ocl_native_exp2(upcast);
2926
}
27+
float upcast = x;
28+
return __spirv_ocl_native_exp2(upcast);
3029
}
3130

3231
_CLC_DEF _CLC_OVERLOAD half2 __spirv_ocl_native_exp2(half2 x) {
3332
if (__clc_nvvm_reflect_arch() >= 750) {
3433
return __nvvm_ex2_approx_f16x2(x);
35-
} else {
36-
float upcast0 = x[0];
37-
float upcast1 = x[1];
38-
half2 res;
39-
res.s0 = __spirv_ocl_native_exp2(upcast0);
40-
res.s1 = __spirv_ocl_native_exp2(upcast1);
41-
return res;
4234
}
35+
float upcast0 = x[0];
36+
float upcast1 = x[1];
37+
half2 res;
38+
res.s0 = __spirv_ocl_native_exp2(upcast0);
39+
res.s1 = __spirv_ocl_native_exp2(upcast1);
40+
return res;
4341
}
4442

4543
_CLC_UNARY_VECTORIZE_HAVE2(_CLC_OVERLOAD _CLC_DEF, half,

0 commit comments

Comments
 (0)