alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
alpaka::internal::SmartMaskValueRef< T, T_ValueMask > Struct Template Reference

Simd mask reference. More...

#include <SmartMaskValueRef.hpp>

Public Types

using value_type = T
using ValueMaskType = T_ValueMask

Public Member Functions

constexpr SmartMaskValueRef (ValueMaskType &ref) noexcept
constexpr operator bool () const noexcept
constexpr bool operator! () const noexcept
constexpr bool operator!= (SmartMaskValueRef const &rhs) const noexcept
constexpr ValueMaskType operator& (SmartMaskValueRef const &rhs) const noexcept
constexpr SmartMaskValueRefoperator&= (bool b) noexcept
constexpr SmartMaskValueRefoperator&= (ValueMaskType v) noexcept
constexpr SmartMaskValueRefoperator= (bool b) noexcept
constexpr SmartMaskValueRefoperator= (ValueMaskType v) noexcept
constexpr bool operator== (SmartMaskValueRef const &rhs) const noexcept
constexpr ValueMaskType operator^ (SmartMaskValueRef const &rhs) const noexcept
constexpr SmartMaskValueRefoperator^= (bool b) noexcept
constexpr SmartMaskValueRefoperator^= (ValueMaskType v) noexcept
constexpr ValueMaskType operator| (SmartMaskValueRef const &rhs) const noexcept
constexpr SmartMaskValueRefoperator|= (bool b) noexcept
constexpr SmartMaskValueRefoperator|= (ValueMaskType v) noexcept
constexpr ValueMaskType operator~ () const noexcept
constexpr ValueMaskType value () const noexcept

Private Attributes

ValueMaskTypevalueRef

Detailed Description

template<typename T, typename T_ValueMask>
struct alpaka::internal::SmartMaskValueRef< T, T_ValueMask >

Simd mask reference.

A SIMD mask is not required to store its values as bool, it can store the values as a representable value type where all bits are 1 for true and zero for false. To be able to assign values to a SIMD mask we can not return a reference to the stored value because we need to cast the value during the write. For the read we need to cast the value to bool.

Definition at line 22 of file SmartMaskValueRef.hpp.

Member Typedef Documentation

◆ value_type

template<typename T, typename T_ValueMask>
using alpaka::internal::SmartMaskValueRef< T, T_ValueMask >::value_type = T

Definition at line 24 of file SmartMaskValueRef.hpp.

◆ ValueMaskType

template<typename T, typename T_ValueMask>
using alpaka::internal::SmartMaskValueRef< T, T_ValueMask >::ValueMaskType = T_ValueMask

Definition at line 25 of file SmartMaskValueRef.hpp.

Constructor & Destructor Documentation

◆ SmartMaskValueRef()

template<typename T, typename T_ValueMask>
alpaka::internal::SmartMaskValueRef< T, T_ValueMask >::SmartMaskValueRef ( ValueMaskType & ref)
inlineconstexprnoexcept

Definition at line 27 of file SmartMaskValueRef.hpp.

Member Function Documentation

◆ operator bool()

template<typename T, typename T_ValueMask>
alpaka::internal::SmartMaskValueRef< T, T_ValueMask >::operator bool ( ) const
inlineconstexprnoexcept

Definition at line 32 of file SmartMaskValueRef.hpp.

◆ operator!()

template<typename T, typename T_ValueMask>
bool alpaka::internal::SmartMaskValueRef< T, T_ValueMask >::operator! ( ) const
inlineconstexprnoexcept

Definition at line 51 of file SmartMaskValueRef.hpp.

◆ operator!=()

template<typename T, typename T_ValueMask>
bool alpaka::internal::SmartMaskValueRef< T, T_ValueMask >::operator!= ( SmartMaskValueRef< T, T_ValueMask > const & rhs) const
inlineconstexprnoexcept

Definition at line 89 of file SmartMaskValueRef.hpp.

◆ operator&()

template<typename T, typename T_ValueMask>
ValueMaskType alpaka::internal::SmartMaskValueRef< T, T_ValueMask >::operator& ( SmartMaskValueRef< T, T_ValueMask > const & rhs) const
inlineconstexprnoexcept

Definition at line 70 of file SmartMaskValueRef.hpp.

◆ operator&=() [1/2]

template<typename T, typename T_ValueMask>
SmartMaskValueRef & alpaka::internal::SmartMaskValueRef< T, T_ValueMask >::operator&= ( bool b)
inlineconstexprnoexcept

Definition at line 115 of file SmartMaskValueRef.hpp.

◆ operator&=() [2/2]

template<typename T, typename T_ValueMask>
SmartMaskValueRef & alpaka::internal::SmartMaskValueRef< T, T_ValueMask >::operator&= ( ValueMaskType v)
inlineconstexprnoexcept

Definition at line 115 of file SmartMaskValueRef.hpp.

◆ operator=() [1/2]

template<typename T, typename T_ValueMask>
SmartMaskValueRef & alpaka::internal::SmartMaskValueRef< T, T_ValueMask >::operator= ( bool b)
inlineconstexprnoexcept

Definition at line 117 of file SmartMaskValueRef.hpp.

◆ operator=() [2/2]

template<typename T, typename T_ValueMask>
SmartMaskValueRef & alpaka::internal::SmartMaskValueRef< T, T_ValueMask >::operator= ( ValueMaskType v)
inlineconstexprnoexcept

Definition at line 117 of file SmartMaskValueRef.hpp.

◆ operator==()

template<typename T, typename T_ValueMask>
bool alpaka::internal::SmartMaskValueRef< T, T_ValueMask >::operator== ( SmartMaskValueRef< T, T_ValueMask > const & rhs) const
inlineconstexprnoexcept

Definition at line 84 of file SmartMaskValueRef.hpp.

◆ operator^()

template<typename T, typename T_ValueMask>
ValueMaskType alpaka::internal::SmartMaskValueRef< T, T_ValueMask >::operator^ ( SmartMaskValueRef< T, T_ValueMask > const & rhs) const
inlineconstexprnoexcept

Definition at line 75 of file SmartMaskValueRef.hpp.

◆ operator^=() [1/2]

template<typename T, typename T_ValueMask>
SmartMaskValueRef & alpaka::internal::SmartMaskValueRef< T, T_ValueMask >::operator^= ( bool b)
inlineconstexprnoexcept

Definition at line 116 of file SmartMaskValueRef.hpp.

◆ operator^=() [2/2]

template<typename T, typename T_ValueMask>
SmartMaskValueRef & alpaka::internal::SmartMaskValueRef< T, T_ValueMask >::operator^= ( ValueMaskType v)
inlineconstexprnoexcept

Definition at line 116 of file SmartMaskValueRef.hpp.

◆ operator|()

template<typename T, typename T_ValueMask>
ValueMaskType alpaka::internal::SmartMaskValueRef< T, T_ValueMask >::operator| ( SmartMaskValueRef< T, T_ValueMask > const & rhs) const
inlineconstexprnoexcept

Definition at line 65 of file SmartMaskValueRef.hpp.

◆ operator|=() [1/2]

template<typename T, typename T_ValueMask>
SmartMaskValueRef & alpaka::internal::SmartMaskValueRef< T, T_ValueMask >::operator|= ( bool b)
inlineconstexprnoexcept

Definition at line 114 of file SmartMaskValueRef.hpp.

◆ operator|=() [2/2]

template<typename T, typename T_ValueMask>
SmartMaskValueRef & alpaka::internal::SmartMaskValueRef< T, T_ValueMask >::operator|= ( ValueMaskType v)
inlineconstexprnoexcept

Definition at line 114 of file SmartMaskValueRef.hpp.

◆ operator~()

template<typename T, typename T_ValueMask>
ValueMaskType alpaka::internal::SmartMaskValueRef< T, T_ValueMask >::operator~ ( ) const
inlineconstexprnoexcept

Definition at line 56 of file SmartMaskValueRef.hpp.

◆ value()

template<typename T, typename T_ValueMask>
ValueMaskType alpaka::internal::SmartMaskValueRef< T, T_ValueMask >::value ( ) const
inlineconstexprnoexcept

Definition at line 45 of file SmartMaskValueRef.hpp.

Member Data Documentation

◆ valueRef

template<typename T, typename T_ValueMask>
ValueMaskType& alpaka::internal::SmartMaskValueRef< T, T_ValueMask >::valueRef
private

Definition at line 122 of file SmartMaskValueRef.hpp.


The documentation for this struct was generated from the following file: