Speclib  0.1.2
The library for writing better CUDA libraries
Tensor-Like Primitives

Primitives that expose a Tensor-like interface, allowing them to be read and possibly written to using a uniform interface. More...

Modules

 Tensor Expressions
 Tensor expressions are TensorLikes that represent a composite operation on other TensorLikes.
 

Classes

class  sp::BlendingTensor< T, R, Options, BlendingOptions >
 A tensor that implements the "output blending" concept common in public APIs. More...
 
class  sp::BroadcastingTensor< T, R, Options, BroadcastOptions >
 A Tensor that implements "broadcasting". More...
 
class  sp::MemTensorLike< Subclass, T, TensorRank, Options >
 CRTP base class for TensorLikes directly backed by memory. More...
 
class  sp::NomadicTensor< TensorType, Args >
 Represents a TensorLike that can be synchronised between the CPU and various GPUs. More...
 
class  sp::PackedTriangularMat< Upper, T, Options >
 Represents a packed triangular matrix. More...
 
class  sp::StaticTensor< T, Dims >
 A Tensor that has constexpr dimensions. More...
 
class  sp::Tensor< T, R, Options >
 Represents a Tensor- a multidimensional array that can represent a multilinear map. More...
 
class  sp::TensorLike< Subclass, TensorRank >
 The interface exposed by anything that is "tensor like". More...
 
struct  sp::TensorProps< P, PT >
 Determines the layout and optimisation flags for a TensorLike. More...
 
struct  sp::MergeTensorOpts<... >
 Find the "lowest common denominator" of a set of TensorProperties. More...
 
class  sp::TensorView< TensorType, R >
 A view into another TensorLike. More...
 
class  sp::TexTensor< T, R, Options >
 A Tensor that's backed by a texture object. More...
 
struct  sp::IsTexTensor< typename >
 Type-trait to detect if a type is an instantiation of TexTensor. More...
 
class  sp::TriangularMat< Upper, T, Options >
 Represents a non-packed triangular matrix. More...
 

Typedefs

template<int Rank, typename TP >
using sp::CanonTensorOpts = decltype(canonTensorOpts< Rank, TP >())
 
template<int Rank, PackMode P, bool PT>
using sp::TensorProperties = CanonTensorOpts< Rank, TensorProps< P, PT > >
 
using sp::MostAggressiveTensorOptions = TensorProps< PackMode::FULL, true >
 The most restrictive, but optimised Tensor options. More...
 
using sp::DefaultTensorOptions = TensorProps< PackMode::NONE, false >
 The default Tensor options. More...
 
template<int Rank>
using sp::DefaultAllocatedTensorOptions = TensorProperties< Rank, PackMode::PARTIAL, true >
 Default Tensor options used by tensors we allocate ourselves. Since we get to choose padding, we can improve layout. More...
 
template<typename... Ts>
using sp::MergedTensorOpts = typename MergeTensorOpts< Ts... >::type
 Handy type alias for accessing MergeTensorOpts. More...
 
using sp::DefaultTexTensorOptions = TensorProperties< false, PackMode::PARTIAL, true >
 

Enumerations

enum  sp::PackMode { sp::NONE = 0 , sp::PARTIAL = 1 , sp::FULL = 2 }
 Determines in what way a TensorLike's underlying buffer is packed. More...
 

Functions

template<int Rank, typename TensorProps >
constexpr auto sp::canonTensorOpts ()
 

Detailed Description

Primitives that expose a Tensor-like interface, allowing them to be read and possibly written to using a uniform interface.

Examples include Tensor, TriangularMatrix, and PackedTriangularMatrix.

Typedef Documentation

◆ DefaultAllocatedTensorOptions

template<int Rank>
using sp::DefaultAllocatedTensorOptions = typedef TensorProperties<Rank, PackMode::PARTIAL, true>

Default Tensor options used by tensors we allocate ourselves. Since we get to choose padding, we can improve layout.

◆ DefaultTensorOptions

using sp::DefaultTensorOptions = typedef TensorProps<PackMode::NONE, false>

The default Tensor options.

◆ MergedTensorOpts

template<typename... Ts>
using sp::MergedTensorOpts = typedef typename MergeTensorOpts<Ts...>::type

Handy type alias for accessing MergeTensorOpts.

◆ MostAggressiveTensorOptions

using sp::MostAggressiveTensorOptions = typedef TensorProps<PackMode::FULL, true>

The most restrictive, but optimised Tensor options.

Enumeration Type Documentation

◆ PackMode

Determines in what way a TensorLike's underlying buffer is packed.

Enumerator
NONE 

There are gaps at every dimension.

PARTIAL 

The stride at the innermost dimension is 1, but there are gaps between rows (or higher dimensions).

FULL 

There are no gaps in the allocation, at all.