AI Engine API User Guide (AIE) 2021.2
aie::detail::mask< Elems > Class Template Reference

#include

Public Member Functions

constexpr mask(bool initial_set=false)
More...
template
constexpr mask(unsigned w, T &&... words)
More...
constexpr void clear(unsigned i)
More...
constexpr unsigned clz() const
More...
constexpr unsigned count() const
More...
constexpr const std::array< unsigned, num_words > & data() const
constexpr bool empty() const
More...
constexprmask operator&(constmask&a) const
More...
constexprmask& operator&=(constmask&a)
More...
constexpr bool operator==(constmask&a) const
More...
constexprmask operator|(constmask&a) const
More...
constexprmask& operator|=(constmask&a)
More...
constexprmask operator~() const
More...
constexpr void set(unsigned i)
More...
constexpr bool test(unsigned i) const
More...

Static Public Member Functions

static constexpr unsigned size()
More...

Constructor & Destructor Documentation

mask()[1/2]

template
constexpraie::detail::mask< Elems >::mask ( bool initial_set=false )
inlineexplicitconstexpr

Creates a mask

Parameters
initial_set If true, the mask is initialized with 1s, otherise it is initialized with 0s.

mask()[2/2]

template
template
constexpraie::detail::mask< Elems >::mask ( unsigned w,
T &&... words
)
inlineexplicitconstexpr

Construct from unsigned (32b) words. Each bit in the input words is used to initialize one of the elements in the mask.

Parameters
w First word used to initialize the mask.
words Rest of words used to initialize the mask.

Member Function Documentation

clear()

template
constexpr voidaie::detail::mask< Elems >::clear ( unsigned i )
inlineconstexpr

Sets the value of the element in the given index to 0.

Parameters
i Element index.

clz()

template
constexpr unsignedaie::detail::mask< Elems >::clz ( ) const
inlineconstexpr

Returns the count of consecutive elements, starting at the high part of the mask, whose value is 0.

count()

template
constexpr unsignedaie::detail::mask< Elems >::count ( ) const
inlineconstexpr

Returns the count of elements whose value is 1.

empty()

template
constexpr boolaie::detail::mask< Elems >::empty ( ) const
inlineconstexpr

Returns a bool that says whether the value of all the elements in the mask is 0.

operator&()

template
constexprmaskaie::detail::mask< Elems >::operator& ( constmask< Elems > & a ) const
inlineconstexpr

Returns the result of merging the current and the given masks using the AND operation.

Parameters
a Maskto merge with.

operator&=()

template
constexprmask&aie::detail::mask< Elems >::operator&= ( constmask< Elems > & a )
inlineconstexpr

Updates the mask with the result of merging the current with the given masks using the AND operation. Returns a reference to the updated mask.

Parameters
a Maskto merge with.

operator==()

template
constexpr boolaie::detail::mask< Elems >::operator== ( constmask< Elems > & a ) const
inlineconstexpr

Compares whether two masks are equal.

Parameters
a Maskto compare against.

operator|()

template
constexprmaskaie::detail::mask< Elems >::operator| ( constmask< Elems > & a ) const
inlineconstexpr

Returns the result of merging the current and the given masks using the OR operation.

Parameters
a Maskto merge with.

operator|=()

template
constexprmask&aie::detail::mask< Elems >::operator|= ( constmask< Elems > & a )
inlineconstexpr

Updates the mask with the result of merging the current and the given masks using the OR operation. Returns a reference to the updated mask.

Parameters
a Maskto merge with.

operator~()

template
constexprmaskaie::detail::mask< Elems >::operator~ ( ) const
inlineconstexpr

Returns a mask that contains the negation of the values of all the elements in the mask (0->1, 1->0).

set()

template
constexpr voidaie::detail::mask< Elems >::set ( unsigned i )
inlineconstexpr

Sets the value of the element in the given index to 1.

Parameters
i Element index.

size()

template
static constexpr unsignedaie::detail::mask< Elems >::size ( )
inlinestaticconstexpr

Returns the number of elements in the mask

test()

template
constexpr boolaie::detail::mask< Elems >::test ( unsigned i ) const
inlineconstexpr

Returns the value of the element in the given index.

Parameters
i Element index.

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