Speclib  0.1.2
The library for writing better CUDA libraries

sp::integer_sequence, and related free functions. More...

Modules

 Bound Sequences
 
 Constants
 
 Make Sequences
 
 Multi Sequences
 
 Sequences
 

Classes

class  sp::integer_sequence< T, Is >
 Encodes a sequence of integral type T. More...
 

Macros

#define HANDY_SHORTHANDS(N, T)
 

Typedefs

template<typename... Ts>
using sp::cat_integer_sequences = decltype(catHelper(Ts{}...))
 Concatenate multiple integer sequences. More...
 
template<typename T , int N>
using sp::make_integer_sequence = __make_integer_seq< sp::integer_sequence, T, N >
 Make a sequence of integers 0, 1, 2, ... N - 1, in type T. More...
 
template<int Start, int Stride, int Steps>
using sp::strided_int_sequence = decltype(stridedIntegerSequenceHelper< Start, Stride >(__make_integer_seq< sp::integer_sequence, int, Steps >{}))
 Create a sequence of integers over some range, with a given stride. More...
 

Detailed Description

sp::integer_sequence, and related free functions.

Macro Definition Documentation

◆ HANDY_SHORTHANDS

#define HANDY_SHORTHANDS (   N,
 
)
Value:
\
template<int Len> \
using make_ ## N ## _sequence = __make_integer_seq<sp::integer_sequence, T, Len>; \
\ \
template<T... Ns> \
using N ## _sequence = sp::integer_sequence<T, Ns...>; \
\ \
template<typename... Ts> \
using N ## _sequence_for = __make_integer_seq<sp::integer_sequence, T, sizeof...(Ts)>; \
\ \
template<int Start, int End> \
using make_bounded_ ## N ## _sequence = typename make_ ## N ## _sequence<End - Start>:: \
template map<tm::Add<Start>, T>;
Encodes a sequence of integral type T.
Definition: integer_sequence.hpp:113

Typedef Documentation

◆ cat_integer_sequences

template<typename... Ts>
using sp::cat_integer_sequences = typedef decltype(catHelper(Ts{}...))

Concatenate multiple integer sequences.

Example

using MultiCat = sp::cat_integer_sequences<A, B, C>; // 1, 2, 3, 4, 5, 6, 7, 8
using MultiCatA = sp::cat_integer_sequences<A>; // 1, 2, 3
using MultiCatNothing = sp::cat_integer_sequences<>; // []
decltype(catHelper(Ts{}...)) cat_integer_sequences
Concatenate multiple integer sequences.
Definition: integer_sequence.hpp:634
Template Parameters
TsSeveral integer sequences (of the same type) to concatenate.

◆ make_integer_sequence

template<typename T , int N>
using sp::make_integer_sequence = typedef __make_integer_seq<sp::integer_sequence, T, N>

Make a sequence of integers 0, 1, 2, ... N - 1, in type T.

◆ strided_int_sequence

template<int Start, int Stride, int Steps>
using sp::strided_int_sequence = typedef decltype(stridedIntegerSequenceHelper<Start, Stride>(__make_integer_seq<sp::integer_sequence, int, Steps>{}))

Create a sequence of integers over some range, with a given stride.

Produces the sequence start, start + stride, start + (2 * stride), ... up to a limit of Steps-many terms.

Template Parameters
StartThe first integer in the sequence
StrideThe distance between adjacent elements in the sequence.
StepsThe number of elements in the output sequence.