You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
!isfinite(Expression) does not compile. This is becuase
Tensor<bool,....> res = !isfinite(Expression);
is a nested expression that calls the eval function for ! and isfinite. The first call is to eval<bool> for ! and the second (nested) call is to eval<EVAL_TYPE> for isfinite.
Now EVAL_TYPE is a macro alias to scalar_type so we get eval<bool>(eval<EVAL_TYPE>). The return type of the inner function is SIMDVector<bool,simd_abi::fixed<4>> say for SSE float, but the return type of the outer function given that the type is bool is SIMDVector<bool,simd_abi::fixed<16>> (again under SSE). If Instead we use something like result_scalar_type = typename result_type::scalar_type we will resolve the evaluation at least as far as types are concerned but given that we use simd_abi::fixed the size of SIMDVectors will not be the same as the nested eval<EVAL_TYPE==bool> is now initialised with simd vector of different sizes (one for bool 16/32/64 and one for float 4/8/16 for SSE/AVX/AVX512).
We need proper mask types for these to be resolved.
The text was updated successfully, but these errors were encountered:
It seems like simply changing the return type of the eval types of boolean expression to bool fixes the issue. This is fixed in d90baa9 for now for unary and binary boolean expressions. When we have masks implemented they need to be changed back to U.
!isfinite(Expression)
does not compile. This is becuaseTensor<bool,....> res = !isfinite(Expression);
is a nested expression that calls the
eval
function for!
andisfinite
. The first call is toeval<bool>
for!
and the second (nested) call is toeval<EVAL_TYPE>
forisfinite
.Now
EVAL_TYPE
is a macro alias toscalar_type
so we geteval<bool>(eval<EVAL_TYPE>)
. The return type of the inner function isSIMDVector<bool,simd_abi::fixed<4>>
say for SSEfloat
, but the return type of the outer function given that the type isbool
isSIMDVector<bool,simd_abi::fixed<16>>
(again under SSE). If Instead we use something likeresult_scalar_type = typename result_type::scalar_type
we will resolve the evaluation at least as far as types are concerned but given that we usesimd_abi::fixed
the size of SIMDVectors will not be the same as the nestedeval<EVAL_TYPE==bool>
is now initialised with simd vector of different sizes (one for bool 16/32/64 and one for float 4/8/16 for SSE/AVX/AVX512).We need proper mask types for these to be resolved.
The text was updated successfully, but these errors were encountered: