Tiling 2D Implementation API¶
-
group
aml_tiling_2d
2 dimensions tiling implementation.
Implementation of 2D tilings, i.e a contiguous memory area composed of contiguous tiles arranged in 2D grid.
Defines
-
AML_TILING_2D_ROWMAJOR_DECL
(name)¶ Static declaration of 2D tiling aranged in row major fashion
-
AML_TILING_2D_COLMAJOR_DECL
(name)¶ Static declaration of 2D tiling aranged in column major fashion
-
AML_TILING_ITERATOR_2D_DECL
(name)¶ Static declaration of 2D tiling iterator
-
AML_TILING_2D_ALLOCSIZE
¶ Static declaration of the size of a 2D tiling
-
AML_TILING_ITERATOR_2D_ALLOCSIZE
¶ Static declaration of the size of a 2D tiling iterator
Functions
-
int
aml_tiling_2d_create
(struct aml_tiling **tiling, int type, size_t tilesize, size_t totalsize, size_t rowsize, size_t colsize)¶ Allocates and initializes a new 2D tiling.
- Return
0 if successful; an error code otherwise.
- Parameters
tiling
: an address where the pointer to the newly allocated tiling structure will be stored.type
: a type of 2D tilingtilesize
: provides the size of each tile.totalsize
: provides the size of the complete user data structure to be tiled.rowsize
: the number of tiles in a rowcolsize
: the number of tiles in a column
-
int
aml_tiling_2d_init
(struct aml_tiling *tiling, int type, size_t tilesize, size_t totalsize, size_t rowsize, size_t colsize)¶ Initializes a tiling. Similar to create.
- Parameters
tiling
: a tiling declared with AML_TILING_2D_DECL.0
: if successful; an error code otherwise.
-
void
aml_tiling_2d_fini
(struct aml_tiling *tiling)¶ Finalize a tiling.
-
void
aml_tiling_2d_destroy
(struct aml_tiling **tiling)¶ Tears down an initialized tiling.
- Parameters
tiling
: a tiling created with aml_tiling_1d_create. NULL after return.
Variables
-
struct aml_tiling_ops
aml_tiling_2d_rowmajor_ops
¶ Initialized structure containing operations on 2D tiling aranged in row major order.
-
struct aml_tiling_ops
aml_tiling_2d_colmajor_ops
¶ Initialized structure containing operations on 2D tiling aranged in column major order.
-
struct aml_tiling_iterator_ops
aml_tiling_iterator_2d_ops
¶ Initialized structure containing operations on 2D tiling aranged.
-
struct
aml_tiling_2d_data
¶ - #include <2d.h>
Data of 2 dimensions tiling. 2D tiling consists in a set of contiguous data blocks with information to iterate on it as a 2D structure.
-
struct
aml_tiling_iterator_2d_data
¶ - #include <2d.h>
Data of 2 dimensions tiling iterator.
-