alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
alpaka::Simd< T_Type, T_width, T_Storage > Struct Template Reference

Simd vector. More...

#include <Simd.hpp>

Inheritance diagram for alpaka::Simd< T_Type, T_width, T_Storage >:

Public Types

using index_type = uint32_t
using rank_type = uint32_t
using reference = typename T_Storage::reference
 type is an implementation detail, can be a proxy type.
using size_type = uint32_t
using Storage = T_Storage
using type = typename T_Storage::value_type
using UniSimd = Simd<T_Type, T_width>

Public Member Functions

constexpr Simd ()=default
template<typename F, std::enable_if_t< std::is_invocable_v< F, std::integral_constant< uint32_t, 0u > >, uint32_t > = 0u>
ALPAKA_FN_HOST_ACC Simd (F &&generator)
 Initialize via a generator expression.
constexpr Simd (Simd const &other)=default
template<typename T_OtherStorage>
constexpr Simd (Simd< T_Type, T_width, T_OtherStorage > const &other)
 constructor allows changing the storage policy
template<typename... T_Args>
ALPAKA_FN_HOST_ACC Simd (T_Args const &... args)
 Constructor for SIMD pack.
constexpr Simd (T_Storage const &other)
constexpr void copyFrom (T_Type const *data, concepts::Alignment auto alignment)
constexpr void copyTo (auto *data, concepts::Alignment auto alignment) const
constexpr Simd< T_Type, T_width - 1u > eraseBack () const
 Shrink the SIMD pack.
template<typename T_OtherStorage>
constexpr auto min (Simd< T_Type, T_width, T_OtherStorage > const &rhs) const
constexpr operator type ()
 Allow static_cast / explicit cast to member type.
constexpr Simd operator- () const
constexpr Simdoperator= (Simd &&)=default
constexpr Simdoperator= (Simd const &)=default
constexpr reference operator[] (std::integral auto const idx)
 access a lane by index
constexpr type operator[] (std::integral auto const idx) const
 access a lane by index
constexpr type product () const
 Returns product of all components.
constexpr auto reduce (auto &&reduceFunc) const -> decltype(reduceFunc(std::declval< type >(), std::declval< type >()))
 reduce all elements to a single value
template<std::integral auto laneIdxToRemove>
requires (T_width >= 2u)
constexpr Simd< type, T_width - 1u > remove () const
 Removes a component.
constexpr Simd revert () const
template<uint32_t T_numElements>
constexpr Simd< T_Type, T_numElements > rshrink () const
 Shrink the number of elements of a vector.
template<uint32_t T_numElements>
constexpr Simd< type, T_numElements > rshrink (std::integral auto const startIdx) const
 Shrink the number of elements of a vector.
constexpr type sum () const
 Returns sum of all components.
constexpr Simd toRT () const
std::string toString (std::string const separator=",", std::string const enclosings="{}") const
 create string out of the SIMD pack
constexpr auto & asStorage ()
 static cast the instance to the storage type
constexpr auto const & asStorage () const
 static cast the instance to the storage type
template<typename T_OtherStorage>
constexpr Simdoperator+= (Simd< T_Type, T_width, T_OtherStorage > const &rhs)
constexpr Simdoperator+= (concepts::LosslesslyConvertible< T_Type > auto const value)
template<typename T_OtherStorage>
constexpr Simdoperator-= (Simd< T_Type, T_width, T_OtherStorage > const &rhs)
constexpr Simdoperator-= (concepts::LosslesslyConvertible< T_Type > auto const value)
template<typename T_OtherStorage>
constexpr Simdoperator/= (Simd< T_Type, T_width, T_OtherStorage > const &rhs)
constexpr Simdoperator/= (concepts::LosslesslyConvertible< T_Type > auto const value)
template<typename T_OtherStorage>
constexpr Simdoperator*= (Simd< T_Type, T_width, T_OtherStorage > const &rhs)
constexpr Simdoperator*= (concepts::LosslesslyConvertible< T_Type > auto const value)
template<typename T_OtherStorage>
constexpr Simdoperator= (Simd< T_Type, T_width, T_OtherStorage > const &rhs)
constexpr Simdoperator= (concepts::LosslesslyConvertible< T_Type > auto const value)
constexpr reference x ()
 named lane access
constexpr type x () const
 named lane access
constexpr reference y ()
 named lane access
constexpr type y () const
 named lane access
constexpr reference z ()
 named lane access
constexpr type z () const
 named lane access
constexpr reference w ()
 named lane access
constexpr type w () const
 named lane access
constexpr reference r ()
 named lane access
constexpr type r () const
 named lane access
constexpr reference g ()
 named lane access
constexpr type g () const
 named lane access
constexpr reference b ()
 named lane access
constexpr type b () const
 named lane access
constexpr reference a ()
 named lane access
constexpr type a () const
 named lane access
constexpr reference s0 ()
 named lane access
constexpr type s0 () const
 named lane access
constexpr reference s1 ()
 named lane access
constexpr type s1 () const
 named lane access
constexpr reference s2 ()
 named lane access
constexpr type s2 () const
 named lane access
constexpr reference s3 ()
 named lane access
constexpr type s3 () const
 named lane access
constexpr reference s4 ()
 named lane access
constexpr type s4 () const
 named lane access
constexpr reference s5 ()
 named lane access
constexpr type s5 () const
 named lane access
constexpr reference s6 ()
 named lane access
constexpr type s6 () const
 named lane access
constexpr reference s7 ()
 named lane access
constexpr type s7 () const
 named lane access
constexpr reference s8 ()
 named lane access
constexpr type s8 () const
 named lane access
constexpr reference s9 ()
 named lane access
constexpr type s9 () const
 named lane access
constexpr reference sA ()
 named lane access
constexpr type sA () const
 named lane access
constexpr reference sB ()
 named lane access
constexpr type sB () const
 named lane access
constexpr reference sC ()
 named lane access
constexpr type sC () const
 named lane access
constexpr reference sD ()
 named lane access
constexpr type sD () const
 named lane access
constexpr reference sE ()
 named lane access
constexpr type sE () const
 named lane access
constexpr reference sF ()
 named lane access
constexpr type sF () const
 named lane access

Static Public Member Functions

static constexpr auto fill (concepts::Convertible< T_Type > auto value)
 Creates a Simd where all lanes are set to the same value.
static consteval uint32_t width ()
 Number of components/lanes in the SIMD pack.

Friends

template<concepts::SimdMask Mask, concepts::Simd T_Simd>
struct SimdWhereExpr

Detailed Description

template<typename T_Type, uint32_t T_width, typename T_Storage>
struct alpaka::Simd< T_Type, T_width, T_Storage >

Simd vector.

Attention
You should not use this type to create a buffer of SIMD vectors. The implementation is not ABI compatible between different API's. Using Simd data created on the host and used in the compute kernel will be undefined behaviour.

This class is designed to be used via SimdPtr via reinterpretation of contiguous scalar data.

Template Parameters
T_Typedata value type
T_widthnumber of lanes in the SIMD vector
T_Storagewrapped native representation of the SIMD vector

Definition at line 77 of file Simd.hpp.

Member Typedef Documentation

◆ index_type

template<typename T_Type, uint32_t T_width, typename T_Storage>
using alpaka::Simd< T_Type, T_width, T_Storage >::index_type = uint32_t

Definition at line 84 of file Simd.hpp.

◆ rank_type

template<typename T_Type, uint32_t T_width, typename T_Storage>
using alpaka::Simd< T_Type, T_width, T_Storage >::rank_type = uint32_t

Definition at line 86 of file Simd.hpp.

◆ reference

template<typename T_Type, uint32_t T_width, typename T_Storage>
using alpaka::Simd< T_Type, T_width, T_Storage >::reference = typename T_Storage::reference

type is an implementation detail, can be a proxy type.

Definition at line 82 of file Simd.hpp.

◆ size_type

template<typename T_Type, uint32_t T_width, typename T_Storage>
using alpaka::Simd< T_Type, T_width, T_Storage >::size_type = uint32_t

Definition at line 85 of file Simd.hpp.

◆ Storage

template<typename T_Type, uint32_t T_width, typename T_Storage>
using alpaka::Simd< T_Type, T_width, T_Storage >::Storage = T_Storage

Definition at line 79 of file Simd.hpp.

◆ type

template<typename T_Type, uint32_t T_width, typename T_Storage>
using alpaka::Simd< T_Type, T_width, T_Storage >::type = typename T_Storage::value_type

Definition at line 80 of file Simd.hpp.

◆ UniSimd

template<typename T_Type, uint32_t T_width, typename T_Storage>
using alpaka::Simd< T_Type, T_width, T_Storage >::UniSimd = Simd<T_Type, T_width>

Definition at line 89 of file Simd.hpp.

Constructor & Destructor Documentation

◆ Simd() [1/6]

template<typename T_Type, uint32_t T_width, typename T_Storage>
alpaka::Simd< T_Type, T_width, T_Storage >::Simd ( )
constexprdefault

◆ Simd() [2/6]

template<typename T_Type, uint32_t T_width, typename T_Storage>
template<typename F, std::enable_if_t< std::is_invocable_v< F, std::integral_constant< uint32_t, 0u > >, uint32_t > = 0u>
ALPAKA_FN_HOST_ACC alpaka::Simd< T_Type, T_width, T_Storage >::Simd ( F && generator)
inlineexplicit

Initialize via a generator expression.

The generator must return the value for the corresponding index of the component which is passed to the generator.

This constructor is not constexpr because std::simd is using a reinterpret_cast during the initialization with a generator and complains that this is not allowed in constexpr functions.

Definition at line 128 of file Simd.hpp.

◆ Simd() [3/6]

template<typename T_Type, uint32_t T_width, typename T_Storage>
template<typename... T_Args>
ALPAKA_FN_HOST_ACC alpaka::Simd< T_Type, T_width, T_Storage >::Simd ( T_Args const &... args)
inline

Constructor for SIMD pack.

Attention
This constructor allows implicit casts.

This constructor is not constexpr because std::simd is using a reinterpret_cast during the initialization with a generator and complains that this is not allowed in constexpr functions.

Parameters
argsvalue of each lane index, x,y,z,...

Definition at line 148 of file Simd.hpp.

◆ Simd() [4/6]

template<typename T_Type, uint32_t T_width, typename T_Storage>
alpaka::Simd< T_Type, T_width, T_Storage >::Simd ( Simd< T_Type, T_width, T_Storage > const & other)
constexprdefault

◆ Simd() [5/6]

template<typename T_Type, uint32_t T_width, typename T_Storage>
alpaka::Simd< T_Type, T_width, T_Storage >::Simd ( T_Storage const & other)
inlineconstexpr

Definition at line 154 of file Simd.hpp.

◆ Simd() [6/6]

template<typename T_Type, uint32_t T_width, typename T_Storage>
template<typename T_OtherStorage>
alpaka::Simd< T_Type, T_width, T_Storage >::Simd ( Simd< T_Type, T_width, T_OtherStorage > const & other)
inlineconstexpr

constructor allows changing the storage policy

Definition at line 161 of file Simd.hpp.

Member Function Documentation

◆ a() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
reference alpaka::Simd< T_Type, T_width, T_Storage >::a ( )
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a
constexpr reference s1()
named lane access
Definition Simd.hpp:312
constexpr reference s2()
named lane access
Definition Simd.hpp:313
constexpr reference x()
named lane access
Definition Simd.hpp:301
constexpr reference s0()
named lane access
Definition Simd.hpp:311
constexpr reference a()
named lane access
Definition Simd.hpp:309
constexpr reference s9()
named lane access
Definition Simd.hpp:320
constexpr reference g()
named lane access
Definition Simd.hpp:307
constexpr reference r()
named lane access
Definition Simd.hpp:306
constexpr reference w()
named lane access
Definition Simd.hpp:304
constexpr reference z()
named lane access
Definition Simd.hpp:303
constexpr reference y()
named lane access
Definition Simd.hpp:302
constexpr reference b()
named lane access
Definition Simd.hpp:308
constexpr reference s3()
named lane access
Definition Simd.hpp:314

Definition at line 309 of file Simd.hpp.

◆ a() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
type alpaka::Simd< T_Type, T_width, T_Storage >::a ( ) const
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 309 of file Simd.hpp.

◆ asStorage() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
auto & alpaka::Simd< T_Type, T_width, T_Storage >::asStorage ( )
inlineconstexpr

static cast the instance to the storage type

Attention
: Do not use this method in user code, it is an implementation detail and can cause undefined behaviour if used wrong.

Definition at line 105 of file Simd.hpp.

◆ asStorage() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
auto const & alpaka::Simd< T_Type, T_width, T_Storage >::asStorage ( ) const
inlineconstexpr

static cast the instance to the storage type

Attention
: Do not use this method in user code, it is an implementation detail and can cause undefined behaviour if used wrong.

Definition at line 110 of file Simd.hpp.

◆ b() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
reference alpaka::Simd< T_Type, T_width, T_Storage >::b ( )
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 308 of file Simd.hpp.

◆ b() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
type alpaka::Simd< T_Type, T_width, T_Storage >::b ( ) const
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 308 of file Simd.hpp.

◆ copyFrom()

template<typename T_Type, uint32_t T_width, typename T_Storage>
void alpaka::Simd< T_Type, T_width, T_Storage >::copyFrom ( T_Type const * data,
concepts::Alignment auto alignment )
inlineconstexpr

Definition at line 181 of file Simd.hpp.

◆ copyTo()

template<typename T_Type, uint32_t T_width, typename T_Storage>
void alpaka::Simd< T_Type, T_width, T_Storage >::copyTo ( auto * data,
concepts::Alignment auto alignment ) const
inlineconstexpr

Definition at line 186 of file Simd.hpp.

◆ eraseBack()

template<typename T_Type, uint32_t T_width, typename T_Storage>
Simd< T_Type, T_width - 1u > alpaka::Simd< T_Type, T_width, T_Storage >::eraseBack ( ) const
inlineconstexpr

Shrink the SIMD pack.

Removes the last value.

Definition at line 353 of file Simd.hpp.

◆ fill()

template<typename T_Type, uint32_t T_width, typename T_Storage>
constexpr auto alpaka::Simd< T_Type, T_width, T_Storage >::fill ( concepts::Convertible< T_Type > auto value)
inlinestaticconstexpr

Creates a Simd where all lanes are set to the same value.

Parameters
valueValue which is set for all lanes
Returns
new Simd<...>

Definition at line 197 of file Simd.hpp.

◆ g() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
reference alpaka::Simd< T_Type, T_width, T_Storage >::g ( )
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 307 of file Simd.hpp.

◆ g() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
type alpaka::Simd< T_Type, T_width, T_Storage >::g ( ) const
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 307 of file Simd.hpp.

◆ min()

template<typename T_Type, uint32_t T_width, typename T_Storage>
template<typename T_OtherStorage>
auto alpaka::Simd< T_Type, T_width, T_Storage >::min ( Simd< T_Type, T_width, T_OtherStorage > const & rhs) const
inlineconstexpr

Definition at line 433 of file Simd.hpp.

◆ operator type()

template<typename T_Type, uint32_t T_width, typename T_Storage>
alpaka::Simd< T_Type, T_width, T_Storage >::operator type ( )
inlineexplicitconstexpr

Allow static_cast / explicit cast to member type.

Attention
only available for SIMD with a single lane.

Definition at line 170 of file Simd.hpp.

◆ operator*=() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
Simd & alpaka::Simd< T_Type, T_width, T_Storage >::operator*= ( concepts::LosslesslyConvertible< T_Type > auto const value)
inlineconstexpr

Definition at line 248 of file Simd.hpp.

◆ operator*=() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
template<typename T_OtherStorage>
Simd & alpaka::Simd< T_Type, T_width, T_Storage >::operator*= ( Simd< T_Type, T_width, T_OtherStorage > const & rhs)
inlineconstexpr

Definition at line 248 of file Simd.hpp.

◆ operator+=() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
Simd & alpaka::Simd< T_Type, T_width, T_Storage >::operator+= ( concepts::LosslesslyConvertible< T_Type > auto const value)
inlineconstexpr

Definition at line 245 of file Simd.hpp.

◆ operator+=() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
template<typename T_OtherStorage>
Simd & alpaka::Simd< T_Type, T_width, T_Storage >::operator+= ( Simd< T_Type, T_width, T_OtherStorage > const & rhs)
inlineconstexpr

Definition at line 245 of file Simd.hpp.

◆ operator-()

template<typename T_Type, uint32_t T_width, typename T_Storage>
Simd alpaka::Simd< T_Type, T_width, T_Storage >::operator- ( ) const
inlineconstexpr

Definition at line 224 of file Simd.hpp.

◆ operator-=() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
Simd & alpaka::Simd< T_Type, T_width, T_Storage >::operator-= ( concepts::LosslesslyConvertible< T_Type > auto const value)
inlineconstexpr

Definition at line 246 of file Simd.hpp.

◆ operator-=() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
template<typename T_OtherStorage>
Simd & alpaka::Simd< T_Type, T_width, T_Storage >::operator-= ( Simd< T_Type, T_width, T_OtherStorage > const & rhs)
inlineconstexpr

Definition at line 246 of file Simd.hpp.

◆ operator/=() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
Simd & alpaka::Simd< T_Type, T_width, T_Storage >::operator/= ( concepts::LosslesslyConvertible< T_Type > auto const value)
inlineconstexpr

Definition at line 247 of file Simd.hpp.

◆ operator/=() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
template<typename T_OtherStorage>
Simd & alpaka::Simd< T_Type, T_width, T_Storage >::operator/= ( Simd< T_Type, T_width, T_OtherStorage > const & rhs)
inlineconstexpr

Definition at line 247 of file Simd.hpp.

◆ operator=() [1/4]

template<typename T_Type, uint32_t T_width, typename T_Storage>
Simd & alpaka::Simd< T_Type, T_width, T_Storage >::operator= ( concepts::LosslesslyConvertible< T_Type > auto const value)
inlineconstexpr

Definition at line 249 of file Simd.hpp.

◆ operator=() [2/4]

template<typename T_Type, uint32_t T_width, typename T_Storage>
Simd & alpaka::Simd< T_Type, T_width, T_Storage >::operator= ( Simd< T_Type, T_width, T_Storage > && )
constexprdefault

◆ operator=() [3/4]

template<typename T_Type, uint32_t T_width, typename T_Storage>
Simd & alpaka::Simd< T_Type, T_width, T_Storage >::operator= ( Simd< T_Type, T_width, T_Storage > const & )
constexprdefault

◆ operator=() [4/4]

template<typename T_Type, uint32_t T_width, typename T_Storage>
template<typename T_OtherStorage>
Simd & alpaka::Simd< T_Type, T_width, T_Storage >::operator= ( Simd< T_Type, T_width, T_OtherStorage > const & rhs)
inlineconstexpr

Definition at line 249 of file Simd.hpp.

◆ operator[]() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
reference alpaka::Simd< T_Type, T_width, T_Storage >::operator[] ( std::integral auto const idx)
inlineconstexpr

access a lane by index

Returns
The returned type is implementation specific, therefore it can be a proxy reference. You can not use the returned value to deduct the type and assume that it will be the value type of Simd.

Definition at line 261 of file Simd.hpp.

◆ operator[]() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
type alpaka::Simd< T_Type, T_width, T_Storage >::operator[] ( std::integral auto const idx) const
inlineconstexpr

access a lane by index

Returns
The value type, by copy.

Definition at line 270 of file Simd.hpp.

◆ product()

template<typename T_Type, uint32_t T_width, typename T_Storage>
type alpaka::Simd< T_Type, T_width, T_Storage >::product ( ) const
inlinenodiscardconstexpr

Returns product of all components.

Returns
product of components

Definition at line 404 of file Simd.hpp.

◆ r() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
reference alpaka::Simd< T_Type, T_width, T_Storage >::r ( )
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 306 of file Simd.hpp.

◆ r() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
type alpaka::Simd< T_Type, T_width, T_Storage >::r ( ) const
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 306 of file Simd.hpp.

◆ reduce()

template<typename T_Type, uint32_t T_width, typename T_Storage>
auto alpaka::Simd< T_Type, T_width, T_Storage >::reduce ( auto && reduceFunc) const -> decltype(reduceFunc(std::declval< type >(), std::declval< type >()))
inlinenodiscardconstexpr

reduce all elements to a single value

For better numerical stability a tree reduce algorithm is used.

Template Parameters
BinaryOpbinary functor executed to reduce the range The binary operation must be associative.
Returns
the type of the result depends on the binary functor

Definition at line 426 of file Simd.hpp.

◆ remove()

template<typename T_Type, uint32_t T_width, typename T_Storage>
template<std::integral auto laneIdxToRemove>
requires (T_width >= 2u)
Simd< type, T_width - 1u > alpaka::Simd< T_Type, T_width, T_Storage >::remove ( ) const
inlineconstexpr

Removes a component.

It is not allowed to call this method on a vector with the width of one.

Template Parameters
laneIdxToRemoveindex which shall be removed; range: [ 0; T_width - 1 ]
Returns
vector with T_width - 1 elements

Definition at line 388 of file Simd.hpp.

◆ revert()

template<typename T_Type, uint32_t T_width, typename T_Storage>
Simd alpaka::Simd< T_Type, T_width, T_Storage >::revert ( ) const
inlineconstexpr

Definition at line 212 of file Simd.hpp.

◆ rshrink() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
template<uint32_t T_numElements>
Simd< T_Type, T_numElements > alpaka::Simd< T_Type, T_width, T_Storage >::rshrink ( ) const
inlineconstexpr

Shrink the number of elements of a vector.

Highest indices kept alive.

Template Parameters
T_numElementsNew width of the SIMD pack.
Returns
First T_numElements elements of the origin vector

Definition at line 339 of file Simd.hpp.

◆ rshrink() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
template<uint32_t T_numElements>
Simd< type, T_numElements > alpaka::Simd< T_Type, T_width, T_Storage >::rshrink ( std::integral auto const startIdx) const
inlineconstexpr

Shrink the number of elements of a vector.

Template Parameters
T_numElementsNew width of the SIMD pack.
Parameters
startIdxIndex within the origin vector which will be the last element in the result.
Returns
T_numElements elements of the origin vector starting with the index startIdx. Indexing will wrapp around when the begin of the origin vector is reached.

Definition at line 371 of file Simd.hpp.

◆ s0() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
reference alpaka::Simd< T_Type, T_width, T_Storage >::s0 ( )
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 311 of file Simd.hpp.

◆ s0() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
type alpaka::Simd< T_Type, T_width, T_Storage >::s0 ( ) const
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 311 of file Simd.hpp.

◆ s1() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
reference alpaka::Simd< T_Type, T_width, T_Storage >::s1 ( )
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 312 of file Simd.hpp.

◆ s1() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
type alpaka::Simd< T_Type, T_width, T_Storage >::s1 ( ) const
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 312 of file Simd.hpp.

◆ s2() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
reference alpaka::Simd< T_Type, T_width, T_Storage >::s2 ( )
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 313 of file Simd.hpp.

◆ s2() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
type alpaka::Simd< T_Type, T_width, T_Storage >::s2 ( ) const
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 313 of file Simd.hpp.

◆ s3() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
reference alpaka::Simd< T_Type, T_width, T_Storage >::s3 ( )
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 314 of file Simd.hpp.

◆ s3() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
type alpaka::Simd< T_Type, T_width, T_Storage >::s3 ( ) const
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 314 of file Simd.hpp.

◆ s4() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
reference alpaka::Simd< T_Type, T_width, T_Storage >::s4 ( )
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 315 of file Simd.hpp.

◆ s4() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
type alpaka::Simd< T_Type, T_width, T_Storage >::s4 ( ) const
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 315 of file Simd.hpp.

◆ s5() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
reference alpaka::Simd< T_Type, T_width, T_Storage >::s5 ( )
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 316 of file Simd.hpp.

◆ s5() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
type alpaka::Simd< T_Type, T_width, T_Storage >::s5 ( ) const
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 316 of file Simd.hpp.

◆ s6() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
reference alpaka::Simd< T_Type, T_width, T_Storage >::s6 ( )
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 317 of file Simd.hpp.

◆ s6() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
type alpaka::Simd< T_Type, T_width, T_Storage >::s6 ( ) const
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 317 of file Simd.hpp.

◆ s7() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
reference alpaka::Simd< T_Type, T_width, T_Storage >::s7 ( )
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 318 of file Simd.hpp.

◆ s7() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
type alpaka::Simd< T_Type, T_width, T_Storage >::s7 ( ) const
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 318 of file Simd.hpp.

◆ s8() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
reference alpaka::Simd< T_Type, T_width, T_Storage >::s8 ( )
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 319 of file Simd.hpp.

◆ s8() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
type alpaka::Simd< T_Type, T_width, T_Storage >::s8 ( ) const
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 319 of file Simd.hpp.

◆ s9() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
reference alpaka::Simd< T_Type, T_width, T_Storage >::s9 ( )
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 320 of file Simd.hpp.

◆ s9() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
type alpaka::Simd< T_Type, T_width, T_Storage >::s9 ( ) const
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 320 of file Simd.hpp.

◆ sA() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
reference alpaka::Simd< T_Type, T_width, T_Storage >::sA ( )
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 321 of file Simd.hpp.

◆ sA() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
type alpaka::Simd< T_Type, T_width, T_Storage >::sA ( ) const
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 321 of file Simd.hpp.

◆ sB() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
reference alpaka::Simd< T_Type, T_width, T_Storage >::sB ( )
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 322 of file Simd.hpp.

◆ sB() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
type alpaka::Simd< T_Type, T_width, T_Storage >::sB ( ) const
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 322 of file Simd.hpp.

◆ sC() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
reference alpaka::Simd< T_Type, T_width, T_Storage >::sC ( )
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 323 of file Simd.hpp.

◆ sC() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
type alpaka::Simd< T_Type, T_width, T_Storage >::sC ( ) const
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 323 of file Simd.hpp.

◆ sD() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
reference alpaka::Simd< T_Type, T_width, T_Storage >::sD ( )
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 324 of file Simd.hpp.

◆ sD() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
type alpaka::Simd< T_Type, T_width, T_Storage >::sD ( ) const
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 324 of file Simd.hpp.

◆ sE() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
reference alpaka::Simd< T_Type, T_width, T_Storage >::sE ( )
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 325 of file Simd.hpp.

◆ sE() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
type alpaka::Simd< T_Type, T_width, T_Storage >::sE ( ) const
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 325 of file Simd.hpp.

◆ sF() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
reference alpaka::Simd< T_Type, T_width, T_Storage >::sF ( )
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 326 of file Simd.hpp.

◆ sF() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
type alpaka::Simd< T_Type, T_width, T_Storage >::sF ( ) const
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 326 of file Simd.hpp.

◆ sum()

template<typename T_Type, uint32_t T_width, typename T_Storage>
type alpaka::Simd< T_Type, T_width, T_Storage >::sum ( ) const
inlinenodiscardconstexpr

Returns sum of all components.

Returns
sum of components

Definition at line 413 of file Simd.hpp.

◆ toRT()

template<typename T_Type, uint32_t T_width, typename T_Storage>
Simd alpaka::Simd< T_Type, T_width, T_Storage >::toRT ( ) const
inlineconstexpr

Definition at line 207 of file Simd.hpp.

◆ toString()

template<typename T_Type, uint32_t T_width, typename T_Storage>
std::string alpaka::Simd< T_Type, T_width, T_Storage >::toString ( std::string const separator = ",",
std::string const enclosings = "{}" ) const
inline

create string out of the SIMD pack

Parameters
separatorstring to separate components of the SIMD pack
enclosingsstring with width 2 to enclose SIMD pack width == 0 ? no enclose symbols width == 1 ? means enclose symbol begin and end are equal width >= 2 ? letter[0] = begin enclose symbol letter[1] = end enclose symbol

example: .toString(";","|") -> |x;...;z| .toString(",","[]") -> [x,...,z]

Definition at line 454 of file Simd.hpp.

◆ w() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
reference alpaka::Simd< T_Type, T_width, T_Storage >::w ( )
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 304 of file Simd.hpp.

◆ w() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
type alpaka::Simd< T_Type, T_width, T_Storage >::w ( ) const
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 304 of file Simd.hpp.

◆ width()

template<typename T_Type, uint32_t T_width, typename T_Storage>
consteval uint32_t alpaka::Simd< T_Type, T_width, T_Storage >::width ( )
inlinestaticconsteval

Number of components/lanes in the SIMD pack.

Definition at line 176 of file Simd.hpp.

◆ x() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
reference alpaka::Simd< T_Type, T_width, T_Storage >::x ( )
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 301 of file Simd.hpp.

◆ x() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
type alpaka::Simd< T_Type, T_width, T_Storage >::x ( ) const
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 301 of file Simd.hpp.

◆ y() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
reference alpaka::Simd< T_Type, T_width, T_Storage >::y ( )
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 302 of file Simd.hpp.

◆ y() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
type alpaka::Simd< T_Type, T_width, T_Storage >::y ( ) const
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 302 of file Simd.hpp.

◆ z() [1/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
reference alpaka::Simd< T_Type, T_width, T_Storage >::z ( )
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 303 of file Simd.hpp.

◆ z() [2/2]

template<typename T_Type, uint32_t T_width, typename T_Storage>
type alpaka::Simd< T_Type, T_width, T_Storage >::z ( ) const
inlineconstexpr

named lane access

Attention
The mapping from names x,y,z,w to memory indices differ from the mapping of an alpaka vector Vec. The availability of the naming methods depends on the SIMD width.

You can have access to the same lane index via different nonspecific naming.

lane index : 0, 1, 2, 3, ..., 9, 10, ... , 15
hexadecimal : s0, s1, s2, s3, ..., s9, SA, ... , SF
coordinate : x, y, z, w
color channel: r, g, b, a

Definition at line 303 of file Simd.hpp.

◆ SimdWhereExpr

template<typename T_Type, uint32_t T_width, typename T_Storage>
template<concepts::SimdMask Mask, concepts::Simd T_Simd>
friend struct SimdWhereExpr
friend

Definition at line 521 of file Simd.hpp.


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