191 return b ? ((a + b - 1) / b) : 0;
216 const TTL_dim_t tiles_in_plane = tiles_in_width * tiles_in_height;
217 const TTL_dim_t number_of_tiles = tiles_in_plane * tiles_in_depth;
223 { number_of_tiles, tiles_in_width, tiles_in_height, tiles_in_depth, tiles_in_plane } };
static TTL_dim_t TTL_tiles_in_height(TTL_tiler_t t)
static int TTL_valid_tile_id(int tile_id, TTL_tiler_t tiler)
Given a tile ID return true or false to indicate if the id is valid.
static TTL_tile_t TTL_get_tile_column_major(const int tile_id, const TTL_tiler_t tiler)
Return the tile_id'th tile of a tile array in column-major order.
static int TTL_tile_empty(TTL_tile_t tile)
Check if the tile passed is empty.
unsigned char TTL_augmented_dim_t
Augment an input tensor with logical padding.
static TTL_tile_t TTL_get_tile(const int tile_id, const TTL_tiler_t tiler)
Return the tile_id'th tile of a tile array in row-major order.
static int TTL_number_of_tiles(TTL_tiler_t tiler)
Return the number of tiles that this tile can produce.
static TTL_dim_t TTL_tiles_in_width(TTL_tiler_t t)
static TTL_tile_t TTL_create_tile(TTL_dim_t x, TTL_dim_t y, TTL_dim_t z, TTL_tiler_t tiler)
Returns a tile at a position from a tiler and respective coordinates.
static TTL_tile_t TTL_create_empty_tile()
Create an empty tile. Empty means it has all dimensions set to zero.
static TTL_augmentation_t TTL_create_augmentation(const TTL_augmented_dim_t left, const TTL_augmented_dim_t right, const TTL_augmented_dim_t top, const TTL_augmented_dim_t bottom, const TTL_augmented_dim_t front, const TTL_augmented_dim_t back)
Create a 3D Description of a Tile augmentation.
static TTL_tiler_t TTL_create_overlap_tiler(const TTL_shape_t tensor_shape, const TTL_shape_t tile_shape, const TTL_overlap_t overlap, const TTL_augmentation_t augmentation)
Return a TTL_tiler_t based on a shape, a tile, and an overlap.
static TTL_tiler_t TTL_create_tiler(const TTL_shape_t shape, const TTL_shape_t tile)
static int TTL_ceil_of_a_div_b(const int a, const int b)
Return the ceil value of a/b i.e. ceil(a/b)
static TTL_dim_t TTL_tiles_in_depth(TTL_tiler_t t)
unsigned int TTL_dim_t
The type used to hold the size of an object along any dimension.
3D description of the augmented margins
TTL_augmented_dim_t right
Right hand augmentation in elements.
TTL_augmented_dim_t back
Back augmentation in elements.
TTL_augmented_dim_t bottom
Bottom augmentation in elements.
TTL_augmented_dim_t top
Top augmentation in elements.
TTL_augmented_dim_t left
Left hand augmentation in elements.
TTL_augmented_dim_t front
Front augmentation in elements.
Description of the 3D offset of an object.
TTL_offset_dim_t z
Offset in dimension z.
TTL_offset_dim_t y
Offset in dimension y.
TTL_offset_dim_t x
Offset in dimension x.
Description of the overlap in 3D space of adjacent tiles.
TTL_overlap_dim_t depth
depth overlap in elements
TTL_overlap_dim_t height
height overlap in elements
TTL_overlap_dim_t width
width overlap in elements
TTL_dim_t depth
Number of planes along dimension z.
TTL_dim_t width
Number of elements along dimension x.
TTL_dim_t height
Number of rows along dimension y.
TTL_tiler_t is the basic unit that describes how a tile is subdivided.
struct TTL_tiler_t::@346103000177117034076065313020113027262217277043 cache
Precomputed information to speed up later reuse.
TTL_overlap_t overlap
When zeroes represent no overlap.
TTL_augmentation_t augmentation
The augmentation that the tile produces.
TTL_shape_t space
Represents the space to be tiled such as an image.
TTL_dim_t tiles_in_height
TTL_dim_t number_of_tiles
static bool TTL_shape_empty(TTL_shape_t shape)
A Shape is empty if its width is 0.
static TTL_overlap_t TTL_create_overlap(const TTL_overlap_dim_t width, const TTL_overlap_dim_t height, const TTL_overlap_dim_t depth)
Create a 3D Description of a Tile overlap.
static TTL_shape_t TTL_create_shape(TTL_dim_t width, TTL_dim_t height, TTL_dim_t depth)
Create a description of a Shape.
static TTL_offset_t TTL_create_offset(void)
Returns a TTL_offset_t.