Tensor Tiling Library
 
Loading...
Searching...
No Matches
TTL_tiler Struct Reference

TTL_tiler is the basic unit that describes how a tile is subdivided. More...

#include <TTL_tiles.h>

Collaboration diagram for TTL_tiler:

Public Member Functions

 TTL_tiler (const TTL_shape tensor_shape, const TTL_shape tile_shape, const TTL_overlap overlap, const TTL_augmentation augmentation)
 Return a TTL_tiler based on a shape, a tile, and an overlap.
 
 TTL_tiler (const TTL_shape shape, const TTL_shape tile)
 
int number_of_tiles () const
 Return the number of tiles that this tile can produce.
 
int valid_tile_id (int tile_id) const
 Given a tile ID return true or false to indicate if the id is valid.
 
int TTL_ceil_of_a_div_b (const int a, const int b) const
 Return the ceil value of a/b i.e. ceil(a/b)
 
TTL_dim tiles_in_width () const
 
TTL_dim tiles_in_height () const
 
TTL_dim tiles_in_depth () const
 
TTL_tile create_tile (TTL_dim x, TTL_dim y, TTL_dim z) const
 Returns a tile at a position from a tiler and respective coordinates.
 
TTL_tile get_tile (const int tile_id) const
 Return the tile_id'th tile of a tile array in row-major order.
 
TTL_tile get_tile_column_major (const int tile_id) const
 Return the tile_id'th tile of a tile array in column-major order.
 

Data Fields

TTL_shape space
 Represents the space to be tiled such as an image.
 
TTL_shape tile
 
TTL_overlap overlap
 When zeroes represent no overlap.
 
TTL_augmentation augmentation
 The augmentation that the tile produces.
 
struct { 
 
   TTL_dim   number_of_tiles 
 
   TTL_dim   tiles_in_width 
 
   TTL_dim   tiles_in_height 
 
   TTL_dim   tiles_in_depth 
 
   TTL_dim   tiles_in_plane 
 
cache 
 Precomputed information to speed up later reuse.
 

Detailed Description

TTL_tiler is the basic unit that describes how a tile is subdivided.

The TTL_tiler type represents the tiling of a 3D space into 3D tiles with operational overlap

Definition at line 121 of file TTL_cpp/TTL_tiles.h.

Constructor & Destructor Documentation

◆ TTL_tiler() [1/2]

TTL_tiler::TTL_tiler ( const TTL_shape tensor_shape,
const TTL_shape tile_shape,
const TTL_overlap overlap,
const TTL_augmentation augmentation )
inline

Return a TTL_tiler based on a shape, a tile, and an overlap.

Parameters
tensor_shapeThe shape to be tiled
tile_shapeThe description of the tile that the shape will be sub-divided to.
overlapThe overlap between tiles
augmentationThe augomentation to apply at the edges durring import.

Complete description of what not how here.

Returns
A tiler that can produce a tile for any given index.

Definition at line 134 of file TTL_cpp/TTL_tiles.h.

◆ TTL_tiler() [2/2]

TTL_tiler::TTL_tiler ( const TTL_shape shape,
const TTL_shape tile )
inline

Definition at line 154 of file TTL_cpp/TTL_tiles.h.

Member Function Documentation

◆ create_tile()

TTL_tile TTL_tiler::create_tile ( TTL_dim x,
TTL_dim y,
TTL_dim z ) const
inline

Returns a tile at a position from a tiler and respective coordinates.

Parameters
xThe x position of the tile being created
yThe y position of the tile being created
zThe z position of the tile being created
tilerThe tiler from which the tiler can be calculated.
Returns
The created TTL_tile type

Definition at line 233 of file TTL_cpp/TTL_tiles.h.

◆ get_tile()

TTL_tile TTL_tiler::get_tile ( const int tile_id) const
inline

Return the tile_id'th tile of a tile array in row-major order.

Return the tile_id'th tile, starting from tile_id=0, in row-major order. Returns an invalid tile if tile_id is not valid (not from [0, number_of_tiles))

Parameters
tile_idThe tile id to return - if out of bounds then an invalid tile is returned
tilerThe containing with the shape and tiling information
Returns
The tile that is represented by tile_id when interpreted in row-major order.

Definition at line 267 of file TTL_cpp/TTL_tiles.h.

◆ get_tile_column_major()

TTL_tile TTL_tiler::get_tile_column_major ( const int tile_id) const
inline

Return the tile_id'th tile of a tile array in column-major order.

Return the tile_id'th tile, starting from tile_id=0, in column-major order. Returns an invalid tile if tile_id is not valid (not from [0, number_of_tiles))

Parameters
tile_idThe tile id to return - if out of bounds then an invalid tile is returned
tilerThe tiler containing the shape and tiling information
Returns
The tile that is represented by tile_id when interpreted in column-major order.

Definition at line 296 of file TTL_cpp/TTL_tiles.h.

◆ number_of_tiles()

int TTL_tiler::number_of_tiles ( ) const
inline

Return the number of tiles that this tile can produce.

Returns
int The number of tiles produced by the tiler.

Definition at line 179 of file TTL_cpp/TTL_tiles.h.

◆ tiles_in_depth()

TTL_dim TTL_tiler::tiles_in_depth ( ) const
inline

Definition at line 219 of file TTL_cpp/TTL_tiles.h.

◆ tiles_in_height()

TTL_dim TTL_tiler::tiles_in_height ( ) const
inline

Definition at line 215 of file TTL_cpp/TTL_tiles.h.

◆ tiles_in_width()

TTL_dim TTL_tiler::tiles_in_width ( ) const
inline

Definition at line 211 of file TTL_cpp/TTL_tiles.h.

◆ TTL_ceil_of_a_div_b()

int TTL_tiler::TTL_ceil_of_a_div_b ( const int a,
const int b ) const
inline

Return the ceil value of a/b i.e. ceil(a/b)

Implementation of ceil(a/b) without requiring a library or floating-point.

Internal TTL function not part of the API.

Parameters
aThe dividend to use in the calculation
bThe divisor to use in the calculation

Definition at line 207 of file TTL_cpp/TTL_tiles.h.

◆ valid_tile_id()

int TTL_tiler::valid_tile_id ( int tile_id) const
inline

Given a tile ID return true or false to indicate if the id is valid.

Parameters
tile_idThe ID to validate.
Returns
int The number of tiles produced by the tiler.

Definition at line 190 of file TTL_cpp/TTL_tiles.h.

Field Documentation

◆ augmentation

TTL_augmentation TTL_tiler::augmentation

The augmentation that the tile produces.

Definition at line 161 of file TTL_cpp/TTL_tiles.h.

◆ [struct]

struct { ... } TTL_tiler::cache

Precomputed information to speed up later reuse.

◆ number_of_tiles

TTL_dim TTL_tiler::number_of_tiles

Definition at line 167 of file TTL_cpp/TTL_tiles.h.

◆ overlap

TTL_overlap TTL_tiler::overlap

When zeroes represent no overlap.

Definition at line 160 of file TTL_cpp/TTL_tiles.h.

◆ space

TTL_shape TTL_tiler::space

Represents the space to be tiled such as an image.

Definition at line 157 of file TTL_cpp/TTL_tiles.h.

◆ tile

TTL_shape TTL_tiler::tile

All tiles will be of this shape, except for clamping at the end of the space

Definition at line 158 of file TTL_cpp/TTL_tiles.h.

◆ tiles_in_depth

TTL_dim TTL_tiler::tiles_in_depth

Definition at line 170 of file TTL_cpp/TTL_tiles.h.

◆ tiles_in_height

TTL_dim TTL_tiler::tiles_in_height

Definition at line 169 of file TTL_cpp/TTL_tiles.h.

◆ tiles_in_plane

TTL_dim TTL_tiler::tiles_in_plane

Definition at line 171 of file TTL_cpp/TTL_tiles.h.

◆ tiles_in_width

TTL_dim TTL_tiler::tiles_in_width

Definition at line 168 of file TTL_cpp/TTL_tiles.h.


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