Hitmap 1.3
|
Go to the source code of this file.
Macros | |
#define | hit_blockTileAlloc(varP, baseType) |
#define | hit_blockTileAllocFill(varP, baseType, fillValue) |
#define | hit_blockTileSelect(...) |
#define | hit_blockTileSelectNoBoundary(...) |
#define | hit_blockTileSelectArrayCoords(...) |
#define | hit_blockTileSelectArrayCoordsNoBoundary(...) |
#define | hit_blockTileElemAt(tile, baseType, ndims,...) |
#define | hit_blockTileElemAtNS(tile, baseType, ndims,...) |
#define | hit_blockTileElemAtArrayCoords(tile, baseType, ndims,...) |
#define | hit_blockTileBufferAt(tile, baseType, ndims,...) |
#define | hit_blockTileBufferAtNS(tile, baseType, ndims,...) |
#define | hit_blockTileBufferAtArrayCoords(tile, baseType, ndims,...) |
#define | hit_blockTileDimBlockSize(tile, dim) |
Typedefs | |
typedef HitTile_HitTile | HitBlockTile |
Functions | |
void | hit_blockTileNew (HitBlockTile *container, void *originalVar, int blockSizes[HIT_MAXDIMS]) |
void | hit_blockTileFree (HitBlockTile container) |
Arrays of blocks
Array tiles in which elements are pointers to block tiles of the same type and size. Current implementation supports 1 and 2-dimensional arrays.
Definition in file hit_blockTile.h.
#define hit_blockTileAlloc | ( | varP, | |
baseType | |||
) |
Allocate an array of blocks.
It allocates the memory of an array of blocks with an already initilized domain.
[in,out] | varP | HitBlockTile* Pointer to an array of blocks tile. |
[in] | baseType | __typeName Type of the array elements. |
Definition at line 109 of file hit_blockTile.h.
#define hit_blockTileAllocFill | ( | varP, | |
baseType, | |||
fillValue | |||
) |
Allocate and initilize the elements of an array of blocks.
It allocates the memory of an array of blocks with an already initilized domain, and it fill the elements of all the blocks with the content of the variable pointed by fillValue.
[in,out] | varP | HitBlockTile* Array of blocks tile. |
[in] | baseType | _typeName Type of the array elements. |
[in] | fillValue | baseType* Pointer to a variable of type baseType with the value to fill in the array. |
Definition at line 127 of file hit_blockTile.h.
#define hit_blockTileBufferAt | ( | tile, | |
baseType, | |||
ndims, | |||
... | |||
) |
Access to the buffer-tile of a block element.
Expression to access the buffer-tile of a block of an array of blocks. The buffer-tile is the tile of the block with the complete size, independently of padding. This function should be used to retrieve tiles to be used in communication functions that involve moving data of blocks.
[in] | tile | HitBlockTile An array of blocks. |
[in] | baseType | __typeName Type of the base elements in the blocks. |
[in] | ndims | int Number of dimensions |
[in] | ... | int_list List with ndims integer indexes |
Definition at line 327 of file hit_blockTile.h.
#define hit_blockTileBufferAtArrayCoords | ( | tile, | |
baseType, | |||
ndims, | |||
... | |||
) |
Access to the buffer-tile of a block element using ancestor array coordinates.
Expression to access the buffer-tile of a block of an array of blocks using the coordinates of the ancestor array. If the array has no ancestor, these are the same as tile coordinates.
[in] | tile | HitBlockTile An array of blocks. |
[in] | baseType | __typeName Type of the base elements in the blocks. |
[in] | ndims | int Number of dimensions |
[in] | ... | int_list List with ndims integer indexes |
Definition at line 368 of file hit_blockTile.h.
#define hit_blockTileBufferAtNS | ( | tile, | |
baseType, | |||
ndims, | |||
... | |||
) |
Access to the buffer-tile of a block element without stride.
Expression to access the buffer-tile of a block of an array of blocks with no stride. This version is faster than hit_blockTileBufferAt().
[in] | tile | HitBlockTile An array of blocks. |
[in] | baseType | __typeName Type of the base elements in the blocks. |
[in] | ndims | int Number of dimensions |
[in] | ... | int_list List with ndims integer indexes |
Definition at line 347 of file hit_blockTile.h.
#define hit_blockTileDimBlockSize | ( | tile, | |
dim | |||
) |
Cardinality of the blocks of an array of blocks, in one dimension.
For a given array of blocks it returns the cardinality (number of elements) in a specific dimension of the blocks of the array.
[in] | tile | HitBlockTile Array of blocks. |
[in] | dim | int Dimension. |
int | Cardinality of the blocks of the array in that dimension. |
Definition at line 387 of file hit_blockTile.h.
#define hit_blockTileElemAt | ( | tile, | |
baseType, | |||
ndims, | |||
... | |||
) |
/** Access to a block element.
Expression to access a block of an array of blocks.
Arrays of blocks may need to add padding elements to the last blocks of a row or column when the original domain cardinalities are not integer divisible of the original array. The block accesed is always a subselection of the desired block without the padding elements if necessary. Thus, the obtained block may have less rows or columns than other the blocks in the array.
[in] | tile | HitBlockTile An array of blocks. |
[in] | baseType | __typeName Type of the base elements in the blocks. |
[in] | ndims | int Number of dimensions |
[in] | ... | int_list List with ndims integer indexes |
Definition at line 258 of file hit_blockTile.h.
#define hit_blockTileElemAtArrayCoords | ( | tile, | |
baseType, | |||
ndims, | |||
... | |||
) |
Access to a block element in an array of blocks using ancestor array coordinates.
Expression to access a block of an array of blocks using the coordinates of the ancestor array. If the array has no ancestor, these are the same as tile coordinates.
[in] | tile | HitBlockTile An array of blocks. |
[in] | baseType | __typeName Type of the base elements in the blocks. |
[in] | ndims | int Number of dimensions |
[in] | ... | int_list List with ndims integer indexes |
Definition at line 305 of file hit_blockTile.h.
#define hit_blockTileElemAtNS | ( | tile, | |
baseType, | |||
ndims, | |||
... | |||
) |
Access to a block element in an array of blocks without stride.
Expression to access a block of an array of blocks with no stride. This version is faster than hit_blockTileElemAt().
[in] | tile | HitBlockTile An array of blocks. |
[in] | baseType | __typeName Type of the base elements in the blocks. |
[in] | ndims | int Number of dimensions |
[in] | ... | int_list List with ndims integer indexes |
Definition at line 285 of file hit_blockTile.h.
#define hit_blockTileSelect | ( | ... | ) |
Selects a subtile of an array of block.
Generates a new tile with a subselection of the blocks of the original array.
[in,out] | ... | The same parameters as hit_tileSelect() |
Definition at line 160 of file hit_blockTile.h.
#define hit_blockTileSelectArrayCoords | ( | ... | ) |
Selects a subtile of an array of block, using ancestor array coordinates.
Generates a new tile with a subselection of the blocks of the original array. The selection is done in ancestor array coordinates. If the original array has no ancestor (it is not a subselection of another array), the ancestor array coordinates are the same as the tile coordinates.
[in,out] | ... | The same parameters as hit_tileSelectArrayCoords(). |
Definition at line 192 of file hit_blockTile.h.
#define hit_blockTileSelectArrayCoordsNoBoundary | ( | ... | ) |
Selects a subtile of an array of block, using ancestor array coordinates, and with possible extended boundaries.
Generates a new tile with a subselection of the blocks of the original array. It allows to select elements out of the boundaries of the original parent variable. The selection is done in ancestor array coordinates. If the original array has no ancestor (it is not a subselection of another array), the ancestor array coordinates are the same as the tile coordinates.
[in,out] | ... | The same parameters as hit_tileSelectArrayCoordsNoBoundary(). |
Definition at line 211 of file hit_blockTile.h.
#define hit_blockTileSelectNoBoundary | ( | ... | ) |
Selects a subtile of an array of block, with possible extended boundaries.
Generates a new tile with a subselection of the blocks of the original array. It allows to select elements out of the boundaries of the original parent variable.
[in,out] | ... | The same parameters as hit_tileSelectNoBoundary(). |
Definition at line 175 of file hit_blockTile.h.
typedef HitTile_HitTile HitBlockTile |
Shortcut name for the generic hierarchical type of arrays of blocks
Definition at line 77 of file hit_blockTile.h.
void hit_blockTileFree | ( | HitBlockTile | container | ) |
/** Free the allocated memory of an array of blocks.
It frees the allocated memory for the array and the blocks.
[in,out] | container | Array of blocks tile. |
Definition at line 205 of file hit_blockTile.c.
void hit_blockTileNew | ( | HitBlockTile * | container, |
void * | originalVar, | ||
int | blockSizes[HIT_MAXDIMS] | ||
) |
Initializer.
It uses a HitTile as reference (originalVar), to get a plain domain and a base type for the elements. It initilizes the domain of an array of blocks of the given sizes, that covers the domain of the originalVar.
[out] | container | Pointer to the new array of blocks tile. |
[in] | originalVar | Reference tile to get a domain and a base type for the elements. |
[in] | blockSizes | Array of integers with the block sizes. As many elements as the dimensions of the originalVar should exist and should be initialized. |
Definition at line 47 of file hit_blockTile.c.