alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
alpaka::meta Namespace Reference

Classes

struct  Contains
struct  Contains< List< Head, Tail... >, Value >
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.
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.
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  IsList
struct  IsList< TList< TTypes... > >
struct  ToList
 Takes an arbitrary number of types (T) and creates a type list of type TListType with the types (T). If T is a single template parameter and it satisfies alpaka::meta::isList, the type of the structure is T (no type change). For example std::tuple can be used as TListType. More...
struct  ToList< TListType, T >
struct  ToList< TListType, T, Ts... >

Typedefs

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 List>
using Front = typename detail::Front<List>::type
template<typename... Ts>
using IsParameterPackSet = detail::IsParameterPackSetImpl<Ts...>
 Trait that tells if the parameter pack contains only unique (no equal) types.
template<typename TList>
using IsSet = detail::IsSetImpl<TList>
 Trait that tells if the template contains only unique (no equal) types.
template<typename T, T Tbegin, T Tsize>
using MakeIntegerSequenceOffset
template<typename... T>
using ToTuple = typename ToList<std::tuple, T...>::type
 If T is a single argument and a type list (fulfill alpaka::meta::isList), the return type is T. Otherwise, std::tuple is returned with T types as template parameters.

Functions

constexpr auto filter (auto const unaryConditionFn, auto const list)
template<typename TExtentVec, typename TFnObj, std::size_t... Tdims>
auto ndLoop (std::index_sequence< Tdims... > indexSequence, TExtentVec &idx, 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.
template<typename TExtentVec, typename TFnObj>
auto ndLoopIncIdx (TExtentVec &idx, 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.
template<typename TExtentVec, typename TFnObj>
auto ndLoopIncIdx (TExtentVec const &extent, TFnObj const &f) -> void

Variables

template<typename T>
constexpr bool isList = IsList<std::decay_t<T>>::value
 Checks whether the specified type is a list. List is a type with a variadic number of template types.

Typedef Documentation

◆ CartesianProduct

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

Definition at line 81 of file CartesianProduct.hpp.

◆ Concatenate

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

Definition at line 28 of file Concatenate.hpp.

◆ ConvertIntegerSequence

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

Definition at line 28 of file IntegerSequence.hpp.

◆ Front

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

Definition at line 27 of file TypeListOps.hpp.

◆ IsParameterPackSet

template<typename... Ts>
using alpaka::meta::IsParameterPackSet = 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 = detail::IsSetImpl<TList>

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

Definition at line 59 of file Set.hpp.

◆ MakeIntegerSequenceOffset

template<typename T, T Tbegin, T Tsize>
using alpaka::meta::MakeIntegerSequenceOffset
Initial value:
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.

◆ ToTuple

template<typename... T>
using alpaka::meta::ToTuple = typename ToList<std::tuple, T...>::type

If T is a single argument and a type list (fulfill alpaka::meta::isList), the return type is T. Otherwise, std::tuple is returned with T types as template parameters.

Definition at line 92 of file TypeListOps.hpp.

Function Documentation

◆ filter()

auto alpaka::meta::filter ( auto const unaryConditionFn,
auto const list )
constexpr

Definition at line 13 of file filter.hpp.

◆ ndLoop()

template<typename TExtentVec, typename TFnObj, std::size_t... Tdims>
auto alpaka::meta::ndLoop ( std::index_sequence< Tdims... > indexSequence,
TExtentVec & idx,
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 51 of file NdLoop.hpp.

◆ ndLoopIncIdx() [1/2]

template<typename TExtentVec, typename TFnObj>
auto alpaka::meta::ndLoopIncIdx ( TExtentVec & idx,
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 73 of file NdLoop.hpp.

◆ ndLoopIncIdx() [2/2]

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

Definition at line 80 of file NdLoop.hpp.

Variable Documentation

◆ isList

template<typename T>
bool alpaka::meta::isList = IsList<std::decay_t<T>>::value
constexpr

Checks whether the specified type is a list. List is a type with a variadic number of template types.

Definition at line 53 of file TypeListOps.hpp.