alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
SimdWhereExpr.hpp File Reference
#include "alpaka/Simd.hpp"

Go to the source code of this file.

Classes

struct  alpaka::SimdWhereExpr< Mask, T_Simd >

Namespaces

namespace  alpaka
 main alpaka namespace.

Macros

#define ALPAKA_SIMD_EXPR_ASSIGN_OP(op_name, op)

Functions

template<concepts::SimdMask T_Mask, concepts::Simd T_Simd>
constexpr SimdWhereExpr< T_Mask, T_Simd > alpaka::where (T_Mask const &mask, T_Simd &value)
 Conditionally update each component of an SIMD pack.

Macro Definition Documentation

◆ ALPAKA_SIMD_EXPR_ASSIGN_OP

#define ALPAKA_SIMD_EXPR_ASSIGN_OP ( op_name,
op )
Value:
constexpr void operator op_name(concepts::Simd auto const& rhs) \
{ \
if constexpr(requires { value.where(m_mask); }) \
value.where(m_mask) op_name rhs.asNativeType(); \
else \
value.update(m_mask, value op rhs); \
} \
constexpr void operator op_name(concepts::LosslesslyConvertible<value_type> auto const& rhs) \
{ \
if constexpr(requires { value.where(m_mask); }) \
value.where(m_mask) op_name rhs; \
else \
value.update(m_mask, value op rhs); \
}

Definition at line 56 of file SimdWhereExpr.hpp.