Speclib  0.1.2
The library for writing better CUDA libraries
sp::GridTraits< B, Ds > Struct Template Reference

Represents the dimensions of a CUDA grid, in cases where this is constexpr. More...

#include <GridTraits.hpp>

Static Public Member Functions

constexpr static int NumBlocks ()
 

Static Public Attributes

constexpr static int Rank = sizeof...(Ds)
 
static constexpr sp::Vec< int, Rank > Dims {Ds...}
 

Detailed Description

template<typename B, int... Ds>
struct sp::GridTraits< B, Ds >

Represents the dimensions of a CUDA grid, in cases where this is constexpr.

Does not contain a BlockTraits, since you can have a static grid with dynamic block sizes, and vice-versa, just fine. If both are fixed (such as for a blockchained reduction) you'll just need two aliases in your implementation.