45 #ifndef _HitBlockTile_
46 #define _HitBlockTile_
109 #define hit_blockTileAlloc( varP, baseType ) hit_blockTileAllocInternal( varP, sizeof(baseType), NULL )
127 #define hit_blockTileAllocFill( varP, baseType, fillValue ) hit_blockTileAllocInternal( varP, sizeof(baseType), fillValue )
160 #define hit_blockTileSelect( ... ) hit_tileSelect( __VA_ARGS__ );
175 #define hit_blockTileSelectNoBoundary( ... ) hit_tileSelectNoBoundary( __VA_ARGS__ );
192 #define hit_blockTileSelectArrayCoords( ... ) hit_tileSelectArrayCoords( __VA_ARGS__ );
211 #define hit_blockTileSelectArrayCoordsNoBoundary( ... ) hit_tileSelectArrayCoordsNoBoundary( __VA_ARGS__ );
232 #define hit_blockTileUnpadElem( elem, baseType ) (((elem).unpadded != NULL) ? *(HitTile_##baseType *)((elem).unpadded) : *(HitTile_##baseType *)&(elem))
258 #define hit_blockTileElemAt( tile, baseType, ndims, ... ) hit_blockTileUnpadElem( hit_tileElemAt(tile, ndims, __VA_ARGS__ ), baseType )
285 #define hit_blockTileElemAtNS( tile, baseType, ndims, ... ) hit_blockTileUnpadElem( hit_tileElemAtNoStride(tile, ndims, __VA_ARGS__ ), baseType )
305 #define hit_blockTileElemAtArrayCoords( tile, baseType, ndims, ... ) hit_blockTileUnpadElem( hit_tileElemAtArrayCoords(tile, ndims, __VA_ARGS__ ), baseType )
327 #define hit_blockTileBufferAt( tile, baseType, ndims, ... ) ( *(HitTile_##baseType *) & hit_tileElemAt(tile, ndims, __VA_ARGS__ ) )
347 #define hit_blockTileBufferAtNS( tile, baseType, ndims, ... ) ( *(HitTile_##baseType *) & hit_tileElemAtNoStride(tile, ndims, __VA_ARGS__ ) )
368 #define hit_blockTileBufferAtArrayCoords( tile, baseType, ndims, ... ) ( *(HitTile_##baseType *) & hit_tileElemAtArrayCoords(tile, ndims, __VA_ARGS__ ) )
387 #define hit_blockTileDimBlockSize( tile, dim ) ( tile.childSize[ dim ] )
401 while ( tile->ref != NULL && tile->ref->hierDepth > 0 ) tile = tile->ref;
409 static inline void hit_blockTileDumpTiles(
HitBlockTile container,
const char *fileName ) {
418 if ( third.unpadded != NULL ) {
419 hit_dumpTileFile( *(third.unpadded), fileName,
"--- Unpadded selection: " );
void hit_blockTileAllocInternal(HitBlockTile *container, size_t baseSizeExtent, void *fillValue)
#define hit_tileElemAt(var, ndims,...)
#define hit_dumpTileFile(var, prefix, comment)
HitTile_HitTile HitBlockTile
void hit_blockTileFree(HitBlockTile container)
#define hit_tileForDimDomain(tile, dim, index)
void hit_blockTileNew(HitBlockTile *container, void *originalVar, int blockSizes[HIT_MAXDIMS])