Tensor Tiling Library
 
Loading...
Searching...
No Matches
TTL_types.h File Reference
#include "TTL_macros.h"
Include dependency graph for tensors/TTL_types.h:

Go to the source code of this file.

Data Structures

struct  TTL_shape_t
 Description of a Shape. More...
 
struct  TTL_offset_t
 Description of the 3D offset of an object. More...
 
struct  TTL_overlap_t
 Description of the overlap in 3D space of adjacent tiles. More...
 

Typedefs

typedef unsigned char TTL_overlap_dim_t
 

Functions

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_shape_t TTL_create_shape (TTL_dim_t width, TTL_dim_t height)
 Create a 2D Description of a Tile Shape.
 
static TTL_shape_t TTL_create_shape (TTL_dim_t width)
 Create a 1D Description of a Tile Shape.
 
static bool TTL_shape_empty (TTL_shape_t shape)
 A Shape is empty if its width is 0.
 
static TTL_offset_t TTL_create_offset (TTL_offset_dim_t x, TTL_offset_dim_t y, TTL_offset_dim_t z)
 Returns a TTL_offset_t.
 
static TTL_offset_t TTL_create_offset (TTL_offset_dim_t x, TTL_offset_dim_t y)
 Returns a TTL_offset_t.
 
static TTL_offset_t TTL_create_offset (TTL_offset_dim_t x)
 Returns a TTL_offset_t.
 
static TTL_offset_t TTL_create_offset (void)
 Returns a TTL_offset_t.
 
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_overlap_t TTL_create_overlap (const TTL_overlap_dim_t width, const TTL_overlap_dim_t height)
 Create a 2D Description of a Tile overlap.
 
static TTL_overlap_t TTL_create_overlap (const TTL_overlap_dim_t width)
 Create a 1D Description of a Tile overlap.
 

Typedef Documentation

◆ TTL_overlap_dim_t

typedef unsigned char TTL_overlap_dim_t

Overlap of a "adjacent" tiles in the unit of elements

Definition at line 161 of file tensors/TTL_types.h.

Function Documentation

◆ TTL_create_offset() [1/4]

static TTL_offset_t TTL_create_offset ( TTL_offset_dim_t x)
inlinestatic

Returns a TTL_offset_t.

Parameters
xThe x offset
Returns
x, y = 0, z = 0 expressed as a TTL_offset_dim_t

Definition at line 143 of file tensors/TTL_types.h.

◆ TTL_create_offset() [2/4]

static TTL_offset_t TTL_create_offset ( TTL_offset_dim_t x,
TTL_offset_dim_t y )
inlinestatic

Returns a TTL_offset_t.

Parameters
xThe x offset
yThe y offset
Returns
x, y, z = 0 expressed as a TTL_offset_dim_t

Definition at line 132 of file tensors/TTL_types.h.

◆ TTL_create_offset() [3/4]

static TTL_offset_t TTL_create_offset ( TTL_offset_dim_t x,
TTL_offset_dim_t y,
TTL_offset_dim_t z )
inlinestatic

Returns a TTL_offset_t.

Parameters
xThe x offset
yThe y offset
zThe z offset
Returns
x, y, z expressed as a TTL_offset_dim_t

Definition at line 117 of file tensors/TTL_types.h.

◆ TTL_create_offset() [4/4]

static TTL_offset_t TTL_create_offset ( void )
inlinestatic

Returns a TTL_offset_t.

Returns
x = 0, y = 0, z = 0 expressed as a TTL_offset_dim_t

Definition at line 153 of file tensors/TTL_types.h.

◆ TTL_create_overlap() [1/3]

static TTL_overlap_t TTL_create_overlap ( const TTL_overlap_dim_t width)
inlinestatic

Create a 1D Description of a Tile overlap.

See also
TTL_overlap_t for more information.
Parameters
width///< Overlap width in elements

height and depth default to 0

Returns
A TTL_overlap_t describing in 3D the overlap requested.

Definition at line 225 of file tensors/TTL_types.h.

◆ TTL_create_overlap() [2/3]

static TTL_overlap_t TTL_create_overlap ( const TTL_overlap_dim_t width,
const TTL_overlap_dim_t height )
inlinestatic

Create a 2D Description of a Tile overlap.

See also
TTL_overlap_t for more information.
Parameters
width///< Overlap width in elements
height///< Overlap height in elements

depth defaults to 0

Returns
A TTL_overlap_t describing in 3D the overlap requested.

Definition at line 210 of file tensors/TTL_types.h.

◆ TTL_create_overlap() [3/3]

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 )
inlinestatic

Create a 3D Description of a Tile overlap.

See also
TTL_overlap_t for more information.
Parameters
width///< Overlap width in elements
height///< Overlap height in elements
depth///< Overlap depth in elements
Returns
A TTL_overlap_t describing in 3D the overlap requested.

Definition at line 192 of file tensors/TTL_types.h.

◆ TTL_create_shape() [1/3]

static TTL_shape_t TTL_create_shape ( TTL_dim_t width)
inlinestatic

Create a 1D Description of a Tile Shape.

See also
TTL_shape_t for more information.
Parameters
widthThe number of elements of the Tile Shape in the x-axis

height and depth default to 1

Returns
A TTL_shape_t describing in Tile Shape requested.

Definition at line 80 of file tensors/TTL_types.h.

◆ TTL_create_shape() [2/3]

static TTL_shape_t TTL_create_shape ( TTL_dim_t width,
TTL_dim_t height )
inlinestatic

Create a 2D Description of a Tile Shape.

See also
TTL_shape_t for more information.
Parameters
widthThe number of elements of the Tile Shape in the x-axis
heightThe number of elements of the Tile Shape in the y-axis

depth defaults to 1

Returns
A TTL_shape_t describing in Tile Shape requested.

Definition at line 65 of file tensors/TTL_types.h.

◆ TTL_create_shape() [3/3]

static TTL_shape_t TTL_create_shape ( TTL_dim_t width,
TTL_dim_t height,
TTL_dim_t depth )
inlinestatic

Create a description of a Shape.

See also
TTL_shape_t for more information.
Parameters
widthThe number of elements of the Tile Shape in the x-axis
heightThe number of elements of the Tile Shape in the y-axis
depthThe number of elements of the Tile Shape in the z-axis
Returns
A TTL_shape_t describing in Tile Shape requested.

Definition at line 48 of file tensors/TTL_types.h.

◆ TTL_shape_empty()

static bool TTL_shape_empty ( TTL_shape_t shape)
inlinestatic

A Shape is empty if its width is 0.

Definition at line 87 of file tensors/TTL_types.h.