alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
alpaka::onAcc::detail::ReducedVector< T_Type, T_dim > Struct Template Reference

Store reduced vector. More...

#include <TiledIdxContainer.hpp>

Inheritance diagram for alpaka::onAcc::detail::ReducedVector< T_Type, T_dim >:

Public Member Functions

constexpr ReducedVector (Vec< T_Type, T_dim > const &first)
constexpr decltype(auto) operator[] (T_Type idx)
constexpr decltype(auto) operator[] (T_Type idx) const

Additional Inherited Members

Private Types inherited from alpaka::Vec< T_Type, T_dim - 1u >
using index_type
using ParamType
using rank_type
using size_type
using Storage
using type
using UniVec
Private Member Functions inherited from alpaka::Vec< T_Type, T_dim - 1u >
constexpr Vec ()=default
constexpr Vec< T_Type, T_dim > assign (T_Type const &value) const
 Assign an value to the given index position.
constexpr decltype(auto) back ()
constexpr Vec< T_Type, T_dim - 1u > eraseBack () const
 Shrink the vector.
constexpr auto min (Vec< T_Type, T_dim, T_OtherStorage > const &rhs) const
constexpr operator type ()
 Allow static_cast / explicit cast to member type for 1D vector.
constexpr bool operator!= (Vec< T_Type, T_dim, T_OtherStorage > const &rhs) const
 != comparison operator.
constexpr Vec operator- () const
constexpr Vecoperator= (Vec const &)=default
constexpr bool operator== (Vec< T_Type, T_dim, T_OtherStorage > const &rhs) const
 == comparison operator.
constexpr decltype(auto) operator[] (std::integral auto const idx)
constexpr type product () const
 Returns product of all components.
constexpr Vec< T_Type, T_dim > rAssign (T_Type const &value) const
 Assign an value to the given index position.
constexpr auto reduce (auto &&reduceFunc) const -> decltype(reduceFunc(std::declval< type >(), std::declval< type >()))
 reduce all elements to a single value
constexpr auto ref (Vec< T, sizeof...(T_values), detail::CVec< T, T_values... > > const v)
constexpr Vec< type, T_dim - 1u > remove () const
 Removes a component.
constexpr Vec revert () const
constexpr Vec< T_Type, T_numElements > rshrink () const
 Shrink the number of elements of a vector.
constexpr type sum () const
 Returns sum of all components.
constexpr Vec toRT () const
std::string toString (std::string const separator=",", std::string const enclosings="{}") const
 create string out of the vector
constexpr Vecoperator+= (Vec< T_Type, T_dim, T_OtherStorage > const &rhs)
 assign operator
constexpr Vecoperator-= (Vec< T_Type, T_dim, T_OtherStorage > const &rhs)
 assign operator
constexpr Vecoperator/= (Vec< T_Type, T_dim, T_OtherStorage > const &rhs)
 assign operator
constexpr Vecoperator*= (Vec< T_Type, T_dim, T_OtherStorage > const &rhs)
 assign operator
constexpr decltype(auto) x ()
 named member access
constexpr decltype(auto) y ()
 named member access
constexpr decltype(auto) z ()
 named member access
constexpr decltype(auto) w ()
 named member access
Static Private Member Functions inherited from alpaka::Vec< T_Type, T_dim - 1u >
static consteval uint32_t dim ()
static constexpr auto fill (concepts::Convertible< T_Type > auto const &value)
 Creates a Vec where all dimensions are set to the same value.

Detailed Description

template<typename T_Type, uint32_t T_dim>
struct alpaka::onAcc::detail::ReducedVector< T_Type, T_dim >

Store reduced vector.

The first index can be reduced by on dimension because the slowest dimension must never set to zero after the initialization.

Definition at line 34 of file TiledIdxContainer.hpp.

Constructor & Destructor Documentation

◆ ReducedVector()

template<typename T_Type, uint32_t T_dim>
alpaka::onAcc::detail::ReducedVector< T_Type, T_dim >::ReducedVector ( Vec< T_Type, T_dim > const & first)
inlineconstexpr

Definition at line 36 of file TiledIdxContainer.hpp.

Member Function Documentation

◆ operator[]() [1/2]

template<typename T_Type, uint32_t T_dim>
decltype(auto) alpaka::onAcc::detail::ReducedVector< T_Type, T_dim >::operator[] ( T_Type idx)
inlineconstexpr

Definition at line 46 of file TiledIdxContainer.hpp.

◆ operator[]() [2/2]

template<typename T_Type, uint32_t T_dim>
decltype(auto) alpaka::onAcc::detail::ReducedVector< T_Type, T_dim >::operator[] ( T_Type idx) const
inlineconstexpr

Definition at line 41 of file TiledIdxContainer.hpp.


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