alpaka
Abstraction Library for Parallel Kernel Acceleration
alpaka::meta Namespace Reference

Namespaces

 detail
 

Classes

struct  Contains
 
struct  Contains< List< Head, Tail... >, Value >
 
struct  DependentFalseType
 A false_type being dependent on a ignored template parameter. This allows to use static_assert in uninstantiated template specializations without triggering. More...
 
class  InheritFromList
 
class  InheritFromList< TList< TBases... > >
 
struct  IntegerSequenceValuesInRange
 Checks if the values in the index sequence are within the given range. More...
 
struct  IntegerSequenceValuesInRange< std::integer_sequence< T, Tvals... >, T, Tmin, Tmax >
 Checks if the values in the index sequence are within the given range. More...
 
struct  IntegerSequenceValuesUnique
 Checks if the values in the index sequence are unique. More...
 
struct  IntegerSequenceValuesUnique< std::integer_sequence< T, Tvals... > >
 Checks if the values in the index sequence are unique. More...
 
struct  IntegralValuesInRange
 Checks if the integral values are within the given range. More...
 
struct  IntegralValuesInRange< T, Tmin, Tmax >
 Checks if the integral values are within the given range. More...
 
struct  IntegralValuesInRange< T, Tmin, Tmax, I, Tvals... >
 Checks if the integral values are within the given range. More...
 
struct  IntegralValuesUnique
 Checks if the integral values are unique. More...
 
struct  IsArrayOrVector
 
struct  IsArrayOrVector< alpaka::Vec< N, T > >
 
struct  IsArrayOrVector< std::array< T, N > >
 
struct  IsArrayOrVector< std::vector< T, A > >
 
struct  IsArrayOrVector< T[N]>
 
struct  max
 
struct  min
 

Typedefs

template<typename TList , template< typename... > class TApplicant>
using Apply = typename detail::ApplyImpl< TList, TApplicant >::type
 
template<template< typename... > class TList, typename... Ts>
using CartesianProduct = typename detail::CartesianProductImpl< TList, Ts... >::type
 
template<typename... T>
using Concatenate = typename detail::ConcatenateImpl< T... >::type
 
template<typename TDstType , typename TIntegerSequence >
using ConvertIntegerSequence = typename detail::ConvertIntegerSequence< TDstType, TIntegerSequence >::type
 
template<typename TList , template< typename > class TPred>
using Filter = typename detail::FilterImpl< TList, TPred >::type
 
template<typename List >
using Front = typename detail::Front< List >::type
 
template<typename T0 , typename T1 >
using HigherMax = std::conditional_t<(sizeof(T0) > sizeof(T1)), T0, std::conditional_t<((sizeof(T0)==sizeof(T1)) &&std::is_unsigned_v< T0 > &&std::is_signed_v< T1 >), T0, T1 > >
 The type that has the higher max value. More...
 
template<typename T0 , typename T1 >
using HigherMin = std::conditional_t<(std::is_unsigned_v< T0 >==std::is_unsigned_v< T1 >), std::conditional_t< std::is_unsigned_v< T0 >, std::conditional_t<(sizeof(T0)< sizeof(T1)), T1, T0 >, std::conditional_t<(sizeof(T0)< sizeof(T1)), T0, T1 > >, std::conditional_t< std::is_unsigned_v< T0 >, T0, T1 > >
 The type that has the higher min value. If both types have the same min value, the type with the wider range is chosen. More...
 
template<typename TSuperset , typename TSubset >
using IsIntegralSuperset = std::integral_constant< bool, std::is_integral_v< TSuperset > &&std::is_integral_v< TSubset > &&(((std::is_unsigned_v< TSuperset >==std::is_unsigned_v< TSubset >) &&(sizeof(TSuperset) >=sizeof(TSubset)))||((std::is_unsigned_v< TSuperset > !=std::is_unsigned_v< TSubset >) &&(sizeof(TSuperset) > sizeof(TSubset))))>
 The trait is true if all values of TSubset are contained in TSuperset. More...
 
template<typename... Ts>
using IsParameterPackSet = detail::IsParameterPackSetImpl< Ts... >
 Trait that tells if the parameter pack contains only unique (no equal) types. More...
 
template<typename TList >
using IsSet = detail::IsSetImpl< TList >
 Trait that tells if the template contains only unique (no equal) types. More...
 
template<typename TBase , typename TDerived >
using IsStrictBase = std::integral_constant< bool, std::is_base_of_v< TBase, TDerived > &&!std::is_same_v< TBase, std::decay_t< TDerived > >>
 The trait is true if TDerived is derived from TBase but is not TBase itself. More...
 
template<typename T0 , typename T1 >
using LowerMax = std::conditional_t<(sizeof(T0)< sizeof(T1)), T0, std::conditional_t<((sizeof(T0)==sizeof(T1)) &&std::is_signed_v< T0 > &&std::is_unsigned_v< T1 >), T0, T1 > >
 The type that has the lower max value. More...
 
template<typename T0 , typename T1 >
using LowerMin = std::conditional_t<(std::is_unsigned_v< T0 >==std::is_unsigned_v< T1 >), std::conditional_t<(sizeof(T0) > sizeof(T1)), T0, T1 >, std::conditional_t< std::is_signed_v< T0 >, T0, T1 > >
 The type that has the lower min value. If both types have the same min value, the type with the wider range is chosen. More...
 
template<typename T , T Tbegin, T Tsize>
using MakeIntegerSequenceOffset = typename detail::MakeIntegerSequenceHelper<(Tsize< 0),(Tsize==0), T, Tbegin, std::integral_constant< T, Tbegin+Tsize >, std::integer_sequence< T > >::type
 
template<typename T >
using NonZero = typename detail::NonZeroImpl< T >
 
template<typename Ts , template< typename... > class TOp>
using Transform = typename detail::TransformImpl< Ts, TOp >::type
 
template<typename TList >
using Unique = typename detail::UniqueImpl< TList >::type
 Trait that returns a list with only unique (no equal) types (a set). Duplicates will be filtered out. More...
 

Functions

template<typename TFnObj , typename T >
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto foldr (TFnObj const &, T const &t) -> T
 
template<typename TFnObj , typename T0 , typename T1 , typename... Ts>
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto foldr (TFnObj const &f, T0 const &t0, T1 const &t1, Ts const &... ts)
 
template<typename TList , typename TFnObj , typename... TArgs>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto forEachType (TFnObj &&f, TArgs &&... args) -> void
 Equivalent to boost::mpl::for_each but does not require the types of the sequence to be default constructible. This function does not create instances of the types instead it passes the types as template parameter. More...
 
template<typename TExtentVec , typename TFnObj , std::size_t... Tdims>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto ndLoop ([[maybe_unused]] std::index_sequence< Tdims... > indexSequence, TExtentVec const &extent, TFnObj const &f) -> void
 Loops over an n-dimensional iteration index variable calling f(idx, args...) for each iteration. The loops are nested in the order given by the index_sequence with the first element being the outermost and the last index the innermost loop. More...
 
template<typename TExtentVec , typename TFnObj >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto ndLoopIncIdx (TExtentVec const &extent, TFnObj const &f) -> void
 Loops over an n-dimensional iteration index variable calling f(idx, args...) for each iteration. The loops are nested from index zero outmost to index (dim-1) innermost. More...
 

Typedef Documentation

◆ Apply

template<typename TList , template< typename... > class TApplicant>
using alpaka::meta::Apply = typedef typename detail::ApplyImpl<TList, TApplicant>::type

Definition at line 21 of file Apply.hpp.

◆ CartesianProduct

template<template< typename... > class TList, typename... Ts>
using alpaka::meta::CartesianProduct = typedef typename detail::CartesianProductImpl<TList, Ts...>::type

Definition at line 83 of file CartesianProduct.hpp.

◆ Concatenate

template<typename... T>
using alpaka::meta::Concatenate = typedef typename detail::ConcatenateImpl<T...>::type

Definition at line 28 of file Concatenate.hpp.

◆ ConvertIntegerSequence

template<typename TDstType , typename TIntegerSequence >
using alpaka::meta::ConvertIntegerSequence = typedef typename detail::ConvertIntegerSequence<TDstType, TIntegerSequence>::type

Definition at line 28 of file IntegerSequence.hpp.

◆ Filter

template<typename TList , template< typename > class TPred>
using alpaka::meta::Filter = typedef typename detail::FilterImpl<TList, TPred>::type

Definition at line 43 of file Filter.hpp.

◆ Front

template<typename List >
using alpaka::meta::Front = typedef typename detail::Front<List>::type

Definition at line 26 of file TypeListOps.hpp.

◆ HigherMax

template<typename T0 , typename T1 >
using alpaka::meta::HigherMax = typedef std::conditional_t< (sizeof(T0) > sizeof(T1)), T0, std::conditional_t<((sizeof(T0) == sizeof(T1)) && std::is_unsigned_v<T0> && std::is_signed_v<T1>), T0, T1> >

The type that has the higher max value.

Definition at line 26 of file Integral.hpp.

◆ HigherMin

template<typename T0 , typename T1 >
using alpaka::meta::HigherMin = typedef std::conditional_t< (std::is_unsigned_v<T0> == std::is_unsigned_v<T1>), std::conditional_t< std::is_unsigned_v<T0>, std::conditional_t<(sizeof(T0) < sizeof(T1)), T1, T0>, std::conditional_t<(sizeof(T0) < sizeof(T1)), T0, T1> >, std::conditional_t<std::is_unsigned_v<T0>, T0, T1> >

The type that has the higher min value. If both types have the same min value, the type with the wider range is chosen.

Definition at line 41 of file Integral.hpp.

◆ IsIntegralSuperset

template<typename TSuperset , typename TSubset >
using alpaka::meta::IsIntegralSuperset = typedef std::integral_constant< bool, std::is_integral_v<TSuperset> && std::is_integral_v<TSubset> && ( ((std::is_unsigned_v<TSuperset> == std::is_unsigned_v<TSubset>) &&(sizeof(TSuperset) >= sizeof(TSubset))) || ((std::is_unsigned_v<TSuperset> != std::is_unsigned_v<TSubset>) &&( sizeof(TSuperset) > sizeof(TSubset))))>

The trait is true if all values of TSubset are contained in TSuperset.

Definition at line 13 of file Integral.hpp.

◆ IsParameterPackSet

template<typename... Ts>
using alpaka::meta::IsParameterPackSet = typedef detail::IsParameterPackSetImpl<Ts...>

Trait that tells if the parameter pack contains only unique (no equal) types.

Definition at line 43 of file Set.hpp.

◆ IsSet

template<typename TList >
using alpaka::meta::IsSet = typedef detail::IsSetImpl<TList>

Trait that tells if the template contains only unique (no equal) types.

Definition at line 59 of file Set.hpp.

◆ IsStrictBase

template<typename TBase , typename TDerived >
using alpaka::meta::IsStrictBase = typedef std:: integral_constant<bool, std::is_base_of_v<TBase, TDerived> && !std::is_same_v<TBase, std::decay_t<TDerived> >>

The trait is true if TDerived is derived from TBase but is not TBase itself.

Definition at line 13 of file IsStrictBase.hpp.

◆ LowerMax

template<typename T0 , typename T1 >
using alpaka::meta::LowerMax = typedef std::conditional_t< (sizeof(T0) < sizeof(T1)), T0, std::conditional_t<((sizeof(T0) == sizeof(T1)) && std::is_signed_v<T0> && std::is_unsigned_v<T1>), T0, T1> >

The type that has the lower max value.

Definition at line 33 of file Integral.hpp.

◆ LowerMin

template<typename T0 , typename T1 >
using alpaka::meta::LowerMin = typedef std::conditional_t< (std::is_unsigned_v<T0> == std::is_unsigned_v<T1>), std::conditional_t<(sizeof(T0) > sizeof(T1)), T0, T1>, std::conditional_t<std::is_signed_v<T0>, T0, T1> >

The type that has the lower min value. If both types have the same min value, the type with the wider range is chosen.

Definition at line 52 of file Integral.hpp.

◆ MakeIntegerSequenceOffset

template<typename T , T Tbegin, T Tsize>
using alpaka::meta::MakeIntegerSequenceOffset = typedef typename detail::MakeIntegerSequenceHelper< (Tsize < 0), (Tsize == 0), T, Tbegin, std::integral_constant<T, Tbegin + Tsize>, std::integer_sequence<T> >::type

Definition at line 70 of file IntegerSequence.hpp.

◆ NonZero

template<typename T >
using alpaka::meta::NonZero = typedef typename detail::NonZeroImpl<T>

Definition at line 25 of file NonZero.hpp.

◆ Transform

template<typename Ts , template< typename... > class TOp>
using alpaka::meta::Transform = typedef typename detail::TransformImpl<Ts, TOp>::type

Definition at line 21 of file Transform.hpp.

◆ Unique

template<typename TList >
using alpaka::meta::Unique = typedef typename detail::UniqueImpl<TList>::type

Trait that returns a list with only unique (no equal) types (a set). Duplicates will be filtered out.

Definition at line 40 of file Unique.hpp.

Function Documentation

◆ foldr() [1/2]

template<typename TFnObj , typename T >
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto alpaka::meta::foldr ( TFnObj const &  ,
T const &  t 
) -> T
constexpr

Definition at line 13 of file Fold.hpp.

◆ foldr() [2/2]

template<typename TFnObj , typename T0 , typename T1 , typename... Ts>
ALPAKA_NO_HOST_ACC_WARNING constexpr ALPAKA_FN_HOST_ACC auto alpaka::meta::foldr ( TFnObj const &  f,
T0 const &  t0,
T1 const &  t1,
Ts const &...  ts 
)
constexpr

Definition at line 20 of file Fold.hpp.

◆ forEachType()

template<typename TList , typename TFnObj , typename... TArgs>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::meta::forEachType ( TFnObj &&  f,
TArgs &&...  args 
) -> void

Equivalent to boost::mpl::for_each but does not require the types of the sequence to be default constructible. This function does not create instances of the types instead it passes the types as template parameter.

Definition at line 48 of file ForEachType.hpp.

◆ ndLoop()

template<typename TExtentVec , typename TFnObj , std::size_t... Tdims>
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::meta::ndLoop ( [[maybe_unused] ] std::index_sequence< Tdims... >  indexSequence,
TExtentVec const &  extent,
TFnObj const &  f 
) -> void

Loops over an n-dimensional iteration index variable calling f(idx, args...) for each iteration. The loops are nested in the order given by the index_sequence with the first element being the outermost and the last index the innermost loop.

Parameters
indexSequenceA sequence of indices being a permutation of the values [0, dim-1].
extentN-dimensional loop extent.
fThe function called at each iteration.

Definition at line 58 of file NdLoop.hpp.

◆ ndLoopIncIdx()

template<typename TExtentVec , typename TFnObj >
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC auto alpaka::meta::ndLoopIncIdx ( TExtentVec const &  extent,
TFnObj const &  f 
) -> void

Loops over an n-dimensional iteration index variable calling f(idx, args...) for each iteration. The loops are nested from index zero outmost to index (dim-1) innermost.

Parameters
extentN-dimensional loop extent.
fThe function called at each iteration.

Definition at line 81 of file NdLoop.hpp.