Skip to main content

TessellateSpec Struct

MLA tessellation (tile-shuffle) parameters. More...

Declaration

struct simaai::neat::TessellateSpec { ... }

Included Headers

#include <PreprocessPlan.h>

Public Member Functions Index

voidset_slice_shape (std::vector< int > shape)

Replace slice_shape with the given shape. More...

intslice_height () const

Slice height (first dim of slice_shape), or 0 if not set. More...

intslice_width () const

Slice width (second dim of slice_shape), or 0 if not set. More...

intslice_channels () const

Slice channel count (last dim, when shape has rank ≥ 3); 0 otherwise. More...

boolhas_slice_shape () const

True iff slice_shape carries a complete H × W × C triple. More...

Public Member Attributes Index

AutoFlagenable = AutoFlag::Auto

On/off/auto. More...

std::vector< int >slice_shape

Tile shape (typically {H, W, C}); empty means "use the contract's geometry". More...

Public Static Functions Index

static intshape_dim (const std::vector< int > &shape, std::size_t index)

Read element index of shape, returning 0 if out of bounds. More...

Description

MLA tessellation (tile-shuffle) parameters.

Definition at line 150 of file PreprocessPlan.h.

Public Member Functions

has_slice_shape()

bool simaai::neat::TessellateSpec::has_slice_shape ()
inline

True iff slice_shape carries a complete H × W × C triple.

Definition at line 181 of file PreprocessPlan.h.

181 bool has_slice_shape() const {
182 return slice_height() > 0 && slice_width() > 0 && slice_channels() > 0;
183 }

set_slice_shape()

void simaai::neat::TessellateSpec::set_slice_shape (std::vector< int > shape)
inline

Replace slice_shape with the given shape.

Definition at line 156 of file PreprocessPlan.h.

156 void set_slice_shape(std::vector<int> shape) {
157 slice_shape = std::move(shape);
158 }

slice_channels()

int simaai::neat::TessellateSpec::slice_channels ()
inline

Slice channel count (last dim, when shape has rank ≥ 3); 0 otherwise.

Definition at line 176 of file PreprocessPlan.h.

176 int slice_channels() const {
177 return slice_shape.size() >= 3 ? slice_shape.back() : 0;
178 }

slice_height()

int simaai::neat::TessellateSpec::slice_height ()
inline

Slice height (first dim of slice_shape), or 0 if not set.

Definition at line 166 of file PreprocessPlan.h.

166 int slice_height() const {
167 return shape_dim(slice_shape, 0);
168 }

slice_width()

int simaai::neat::TessellateSpec::slice_width ()
inline

Slice width (second dim of slice_shape), or 0 if not set.

Definition at line 171 of file PreprocessPlan.h.

171 int slice_width() const {
172 return shape_dim(slice_shape, 1);
173 }

Public Member Attributes

enable

AutoFlag simaai::neat::TessellateSpec::enable = AutoFlag::Auto

On/off/auto.

Definition at line 151 of file PreprocessPlan.h.

slice_shape

std::vector<int> simaai::neat::TessellateSpec::slice_shape

Tile shape (typically {H, W, C}); empty means "use the contract's geometry".

Definition at line 152 of file PreprocessPlan.h.

152 std::vector<int> slice_shape;

Public Static Functions

shape_dim()

int simaai::neat::TessellateSpec::shape_dim (const std::vector< int > & shape, std::size_t index)
inline static

Read element index of shape, returning 0 if out of bounds.

Definition at line 161 of file PreprocessPlan.h.

161 static int shape_dim(const std::vector<int>& shape, std::size_t index) {
162 return shape.size() > index ? shape[index] : 0;
163 }

The documentation for this struct was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.