Conditional expression
|
conditional selection with mask |
Warning
doxygenfunction: Unable to resolve function “select” with arguments “(batch_bool<T, A> const&, batch<T, A> const&, batch<T, A> const&)”. Candidate function could not be parsed. Parsing error is Error when parsing function declaration. If the function has no return type: Error in declarator or parameters-and-qualifiers Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 40] template<class T, class A> XSIMD_INLINE batch< T, A > select (batch_bool< T, A > const &cond, batch< T, A > const &true_br, batch< T, A > const &false_br) noexcept —————————————-^ If the function has a return type: Error in declarator or parameters-and-qualifiers If pointer to member declarator: Invalid C++ declaration: Expected ‘::’ in pointer to member (function). [error at 54] template<class T, class A> XSIMD_INLINE batch< T, A > select (batch_bool< T, A > const &cond, batch< T, A > const &true_br, batch< T, A > const &false_br) noexcept ——————————————————^ If declarator-id: Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 54] template<class T, class A> XSIMD_INLINE batch< T, A > select (batch_bool< T, A > const &cond, batch< T, A > const &true_br, batch< T, A > const &false_br) noexcept ——————————————————^
Warning
doxygenfunction: Unable to resolve function “select” with arguments “(batch_bool_constant<T, A, Values…> const&, batch<T, A> const&, batch<T, A> const&)”. Candidate function could not be parsed. Parsing error is Error when parsing function declaration. If the function has no return type: Error in declarator or parameters-and-qualifiers Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 40] template<class T, class A> XSIMD_INLINE batch< T, A > select (batch_bool< T, A > const &cond, batch< T, A > const &true_br, batch< T, A > const &false_br) noexcept —————————————-^ If the function has a return type: Error in declarator or parameters-and-qualifiers If pointer to member declarator: Invalid C++ declaration: Expected ‘::’ in pointer to member (function). [error at 54] template<class T, class A> XSIMD_INLINE batch< T, A > select (batch_bool< T, A > const &cond, batch< T, A > const &true_br, batch< T, A > const &false_br) noexcept ——————————————————^ If declarator-id: Invalid C++ declaration: Expecting “(” in parameters-and-qualifiers. [error at 54] template<class T, class A> XSIMD_INLINE batch< T, A > select (batch_bool< T, A > const &cond, batch< T, A > const &true_br, batch< T, A > const &false_br) noexcept ——————————————————^
In the specific case when one needs to conditionnaly increment or decrement a
batch based on a mask, incr_if()
and
decr_if()
provide specialized version.