Hitmap 1.3
 All Data Structures Namespaces Files Functions Variables Typedefs Friends Macros Groups Pages
Macros | Typedefs | Functions
hit_blockTile.h File Reference
#include "hit_sshape.h"
#include "hit_tile.h"
#include "hit_dump.h"
Include dependency graph for hit_blockTile.h:
This graph shows which files directly or indirectly include this file:

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)
 

Detailed Description

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.

Version
1.1
Author
Arturo Gonzalez-Escribano
Date
Feb 2012

Definition in file hit_blockTile.h.

Macro Definition Documentation

#define hit_blockTileAlloc (   varP,
  baseType 
)

Allocate an array of blocks.

It allocates the memory of an array of blocks with an already initilized domain.

Version
1.1
Author
Arturo Gonzalez-Escribano
Parameters
[in,out]varPHitBlockTile* 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.

Version
1.1
Author
Arturo Gonzalez-Escribano
Parameters
[in,out]varPHitBlockTile* Array of blocks tile.
[in]baseType_typeName Type of the array elements.
[in]fillValuebaseType* 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.

Version
1.2
Author
Arturo Gonzalez-Escribano
Parameters
[in]tileHitBlockTile An array of blocks.
[in]baseType__typeName Type of the base elements in the blocks.
[in]ndimsint Number of dimensions
[in]...int_list List with ndims integer indexes
See Also
hit_blockTileElemAt()

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.

Version
1.2
Author
Arturo Gonzalez-Escribano
Parameters
[in]tileHitBlockTile An array of blocks.
[in]baseType__typeName Type of the base elements in the blocks.
[in]ndimsint Number of dimensions
[in]...int_list List with ndims integer indexes
See Also
hit_blockTileBufferAt(), hit_tileElemAtArrayCoords()

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().

Version
1.2
Author
Arturo Gonzalez-Escribano
Parameters
[in]tileHitBlockTile An array of blocks.
[in]baseType__typeName Type of the base elements in the blocks.
[in]ndimsint Number of dimensions
[in]...int_list List with ndims integer indexes
See Also
hit_blockTileBufferAt(), hit_blockTileElemAtNS()

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.

Version
1.1
Author
Arturo Gonzalez-Escribano
Parameters
[in]tileHitBlockTile Array of blocks.
[in]dimint Dimension.
Return values
intCardinality 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.

Version
1.2
Author
Arturo Gonzalez-Escribano
Parameters
[in]tileHitBlockTile An array of blocks.
[in]baseType__typeName Type of the base elements in the blocks.
[in]ndimsint Number of dimensions
[in]...int_list List with ndims integer indexes
See Also
hit_tileElemAt()

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.

Version
1.2
Author
Arturo Gonzalez-Escribano
Parameters
[in]tileHitBlockTile An array of blocks.
[in]baseType__typeName Type of the base elements in the blocks.
[in]ndimsint Number of dimensions
[in]...int_list List with ndims integer indexes
See Also
hit_tileElemAtArrayCoords(), hit_blockTileElemAt()

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().

Deprecated:
This macro con only be used for HitBlockCTile arrays. It is equivalent to hit_blockTileElemAt(), but faster. The name will be changed and it will be moved to be a member of the HitBlockCTile class. The HitBlockCTile subclass has no stride in any dimension. The domain is contiguous or compact.
Version
1.2
Author
Arturo Gonzalez-Escribano
Parameters
[in]tileHitBlockTile An array of blocks.
[in]baseType__typeName Type of the base elements in the blocks.
[in]ndimsint Number of dimensions
[in]...int_list List with ndims integer indexes
See Also
hit_tileElemAtNoStride(), hit_blockTileElemAt()

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.

Version
1.1
Author
Arturo Gonzalez-Escribano
Parameters
[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.

Version
1.1
Author
Arturo Gonzalez-Escribano
Parameters
[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.

Version
1.1
Author
Arturo Gonzalez-Escribano
Parameters
[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.

Version
1.1
Author
Arturo Gonzalez-Escribano
Parameters
[in,out]...The same parameters as hit_tileSelectNoBoundary().

Definition at line 175 of file hit_blockTile.h.

Typedef Documentation

typedef HitTile_HitTile HitBlockTile

Shortcut name for the generic hierarchical type of arrays of blocks

Version
1.2
Author
Arturo Gonzalez-Escribano
Date
Ago 2015

Definition at line 77 of file hit_blockTile.h.

Function Documentation

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.

Version
1.1
Author
Arturo Gonzalez-Escribano
Parameters
[in,out]containerArray of blocks tile.

Definition at line 205 of file hit_blockTile.c.

Here is the caller graph for this function:

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.

Version
1.1
Author
Arturo Gonzalez-Escribano
Parameters
[out]containerPointer to the new array of blocks tile.
[in]originalVarReference tile to get a domain and a base type for the elements.
[in]blockSizesArray 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.

Here is the caller graph for this function: