Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libclc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,6 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
-D${CLC_TARGET_DEFINE}
# All libclc builtin libraries see CLC headers
-I${CMAKE_CURRENT_SOURCE_DIR}/clc/include
# FIXME: Fix libclc to not require disabling this noisy warning
-Wno-bitwise-conditional-parentheses
)

if( NOT "${cpu}" STREQUAL "" )
Expand All @@ -400,6 +398,8 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )

list( APPEND build_flags
-I${CMAKE_CURRENT_SOURCE_DIR}/generic/include
# FIXME: Fix libclc to not require disabling this noisy warning
-Wno-bitwise-conditional-parentheses
)

add_libclc_builtin_set(
Expand Down
4 changes: 2 additions & 2 deletions libclc/clc/lib/generic/math/clc_ldexp.cl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ _CLC_DEF_ldexp _CLC_OVERLOAD float __clc_ldexp(float x, int n) {
int s = i & 0x80000000;
int v = __clc_add_sat(e, n);
v = __clc_clamp(v, 0, 0xff);
int mr = e == 0 | v == 0 | v == 0xff ? 0 : m;
int mr = (e == 0 || v == 0 || v == 0xff) ? 0 : m;
int c = e == 0xff;
mr = c ? m : mr;
int er = c ? e : v;
Expand Down Expand Up @@ -96,7 +96,7 @@ _CLC_DEF_ldexp _CLC_OVERLOAD float __clc_ldexp(float x, int n) {
val_ui = dexp == 0 ? dval_ui : val_ui;
val_f = __clc_as_float(val_ui);

val_f = __clc_isnan(x) | __clc_isinf(x) | val_x == 0 ? x : val_f;
val_f = (__clc_isnan(x) || __clc_isinf(x) || val_x == 0) ? x : val_f;
return val_f;
}

Expand Down