|
Tannic
A C++ Tensor Library
|
Classes | |
| struct | Composition |
| Transformation composition (Known as Matrix Multiplication) operation. More... | |
| struct | Concatenation |
| Concatenation operation along a specified axis. More... | |
| class | Convolution1D |
| Expression for 1D convolution operations. More... | |
| class | Convolution2D |
| Expression for 2D convolution operations. More... | |
| struct | Outer |
| Represents the outer product operation between two vectors. More... | |
| struct | Repack |
| Repack operation (makes a tensor contiguous in memory) More... | |
| struct | Repetition |
| Repetition operation along a specified axis. More... | |
| class | Transformation |
| Expression template for tensor transformations. More... | |
Functions | |
| template<Expression Signal, Expression Kernel> | |
| constexpr auto | convolve1D (Signal &&signal, Kernel &&kernel, std::size_t stride, std::size_t padding) |
| Creates a 1D convolution expression with uniform stride and padding. | |
| template<Expression Signal, Expression Kernel> | |
| constexpr auto | convolve1D (Signal &&signal, Kernel &&kernel, std::array< std::size_t, 1 > strides, std::array< std::size_t, 1 > padding) |
| Creates a 1D convolution expression with explicit stride and padding arrays. | |
| template<Expression Signal, Expression Kernel> | |
| constexpr auto | convolve2D (Signal &&signal, Kernel &&kernel, std::size_t stride, std::size_t padding) |
| Creates a 2D convolution expression with uniform stride and padding. | |
| template<Expression Signal, Expression Kernel> | |
| constexpr auto | convolve2D (Signal &&signal, Kernel &&kernel, std::array< std::size_t, 2 > strides, std::array< std::size_t, 2 > padding) |
| Creates a 2D convolution expression with explicit stride and padding arrays. | |
| template<Expression Outer, Expression Inner> | |
| constexpr auto | composition (Outer &&outer, Inner &&inner, double scale) |
| Creates a composition (matrix multiplication) expression. | |
| template<Expression First, Expression Second> | |
| constexpr auto | outer (First &&first, Second &&second) |
| Creates an outer product expression. | |
| template<Expression Source> | |
| constexpr auto | repeat (Source &&source, int repeats, int axis=0) |
| Creates a repetition transformation. | |
| template<Expression First, Expression Second> | |
| constexpr auto | concatenate (First &&first, Second &&second, int axis=0) |
| Helper function to create a concatenation transformation. | |
| template<Expression Source> | |
| constexpr auto | repack (Source &&source) |
| Creates a repack transformation. | |
| template<Expression Source, Integral ... Indexes> | |
| constexpr auto | reshape (Source &&source, Indexes ... indexes) |
| Creates a view but always repacks the tensor into a contiguous layout. | |
|
constexpr |
Creates a composition (matrix multiplication) expression.
| outer | Outer tensor operand |
| inner | Inner tensor operand |
|
constexpr |
Helper function to create a concatenation transformation.
| First | Left tensor expression type. |
| Second | Right tensor expression type. |
| first | Left tensor operand. |
| second | Right tensor operand. |
| axis | Axis along which to concatenate. |
|
constexpr |
Creates a 1D convolution expression with explicit stride and padding arrays.
| Signal | Input signal expression type |
| Kernel | Convolution kernel expression type |
| signal | Input signal tensor operand |
| kernel | Convolution kernel tensor operand |
| strides | Array of stride values (size = 1) |
| padding | Array of padding values (size = 1) |
| Exception | if stride is zero |
|
constexpr |
Creates a 1D convolution expression with uniform stride and padding.
| Signal | Input signal expression type |
| Kernel | Convolution kernel expression type |
| signal | Input signal tensor operand |
| kernel | Convolution kernel tensor operand |
| stride | Stride value applied to the signal length |
| padding | Padding value applied to the signal length |
| Exception | if stride is zero |
|
constexpr |
Creates a 2D convolution expression with explicit stride and padding arrays.
| Signal | Input signal expression type |
| Kernel | Convolution kernel expression type |
| signal | Input signal tensor operand |
| kernel | Convolution kernel tensor operand |
| strides | Array of stride values (size = 2: {stride_h, stride_w}) |
| padding | Array of padding values (size = 2: {pad_h, pad_w}) |
| Exception | if any stride value is zero |
|
constexpr |
Creates a 2D convolution expression with uniform stride and padding.
| Signal | Input signal expression type |
| Kernel | Convolution kernel expression type |
| signal | Input signal tensor operand |
| kernel | Convolution kernel tensor operand |
| stride | Stride value applied uniformly to both spatial dimensions |
| padding | Padding value applied uniformly to both spatial dimensions |
| Exception | if stride is zero |
|
constexpr |
Creates an outer product expression.
| First | Left tensor expression type |
| Second | Right tensor expression type |
| first | Left tensor operand |
| second | Right tensor operand |
|
constexpr |
Creates a repack transformation.
Ensures the tensor is stored contiguously (row-major order). Does not change shape or dtype.
| Source | Source tensor expression type. |
| source | Tensor to be repacked. |
|
constexpr |
Creates a repetition transformation.
| Source | Source tensor expression type. |
| source | Tensor to be repeated. |
| repeats | Number of repetitions. |
| axis | Axis along which to repeat. |
|
constexpr |
Creates a view but always repacks the tensor into a contiguous layout.
| Source | Source tensor expression type. |
| source | Tensor to be reshaped. |