Hitmap 1.3
 All Data Structures Namespaces Files Functions Variables Typedefs Friends Macros Groups Pages
Functions | Variables
hit_tile.c File Reference
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <stdlib.h>
#include <unistd.h>
#include <hit_allocP.h>
#include <hit_sshape.h>
#include <hit_cshape.h>
#include <hit_bshape.h>
#include <hit_tile.h>
Include dependency graph for hit_tile.c:

Go to the source code of this file.

Functions

void hit_tileSingleInternal (void *tileP, void *varP, size_t size)
 
void hit_tileDomainInternal (void *newVarP, size_t baseExtent, int hierDepth, int numDims,...)
 
void hit_tileDomainShapeInternal (void *newVarP, size_t baseExtent, int hierDepth, HitShape shape)
 
void hit_tileAllocInternal (void *newVarP, const char *name, const char *file, int numLine)
 
void hit_tileFillUpdateArrayCoordinatesRec (HitTile *root, int coords[HIT_MAXDIMS])
 
void hit_tileFillInternal (void *varP, void *value, const char *name, const char *file, int numLine)
 
void * hit_mtileBlockArrayCoord (HitTile *root, int coords[HIT_MAXDIMS])
 
void * hit_mtileElemAtArrayCoord (HitTile *root, int coords[HIT_MAXDIMS])
 
int hit_tileFileInternal (void *varP, const int fileFormat, const int fileMode, const int tileMode, const int type, const int formatSize1, const int formatSize2, const char *fileName, const char *debugVarName, const char *debugCodeFile, int debugCodeLine)
 
void hit_tileCloneInternal (void *newVarP, const void *oldVarP, const char *name, const char *file, int numLine)
 
void hit_tileSelectRefPointer (HitTile *newVar, const HitTile *oldVar)
 
int hit_tileSelectInternal (void *newVarP, const void *oldVarP, HitShape sh, int out)
 
int hit_tileCheckBoundaryArrayCoords (const void *tileP, HitShape sh)
 
int hit_tileCheckBoundaryTileCoords (const void *tileP, HitShape sh)
 
int hit_tileSelectArrayCoordsInternal (void *newVarP, const void *oldVarP, HitShape sh, int out)
 
int hit_tileReduceDims (void *newVarP, int numReductions)
 
int hit_tileExpandDims (void *newVarP, int numExpansions)
 
void hit_tileUpdateFromToAncestorInternal (void *sh, int fromTo, const char *name, const char *file, int numLine)
 
HitShape hit_tileShapeLocal (const void *inTile)
 
HitShape hit_tileShapeTile2Array (void *var, HitShape sh)
 
HitShape hit_tileShapeArray2Tile (void *var, HitShape sh)
 
void hit_tileFreeRecInternal (void *varP)
 
void hit_tileGlue (void *tileInA, void *tileInB, void *tileOut)
 

Variables

HitTile HIT_TILE_NULL = HIT_TILE_NULL_STATIC
 
HitPTile HIT_TILE_NULL_POINTER = &HIT_TILE_NULL
 

Detailed Description

Hierarchical tiling of multi-dimensional dense array. Definitions and functions to manipulate HitTile types. This type defines a handler for dense arrays and sparse structures with meta-information to create and manipulate hierarchical tiles.

Version
1.1.1
Author
Arturo Gonzalez-Escribano
Javier Fresno Bausela
Carlos de Blas Carton
Date
Nov 2012

Definition in file hit_tile.c.

Function Documentation

void* hit_mtileBlockArrayCoord ( HitTile root,
int  coords[HIT_MAXDIMS] 
)

Definition at line 504 of file hit_tile.c.

void* hit_mtileElemAtArrayCoord ( HitTile root,
int  coords[HIT_MAXDIMS] 
)

Definition at line 536 of file hit_tile.c.

void hit_tileAllocInternal ( void *  newVarP,
const char *  name,
const char *  file,
int  numLine 
)

Definition at line 243 of file hit_tile.c.

int hit_tileCheckBoundaryArrayCoords ( const void *  tileP,
HitShape  sh 
)

Checks if the shape is inside the boundary of the tile using array coords

Definition at line 1073 of file hit_tile.c.

Here is the caller graph for this function:

int hit_tileCheckBoundaryTileCoords ( const void *  tileP,
HitShape  sh 
)

Checks if the shape is inside the boundary of the tile using tile coords

Definition at line 1095 of file hit_tile.c.

Here is the caller graph for this function:

void hit_tileCloneInternal ( void *  newVarP,
const void *  oldVarP,
const char *  name,
const char *  file,
int  numLine 
)

Definition at line 819 of file hit_tile.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void hit_tileDomainInternal ( void *  newVarP,
size_t  baseExtent,
int  hierDepth,
int  numDims,
  ... 
)

Definition at line 162 of file hit_tile.c.

void hit_tileDomainShapeInternal ( void *  newVarP,
size_t  baseExtent,
int  hierDepth,
HitShape  shape 
)

Definition at line 200 of file hit_tile.c.

Here is the caller graph for this function:

int hit_tileExpandDims ( void *  newVarP,
int  numExpansions 
)

Definition at line 1329 of file hit_tile.c.

int hit_tileFileInternal ( void *  varP,
const int  fileFormat,
const int  fileMode,
const int  tileMode,
const int  type,
const int  formatSize1,
const int  formatSize2,
const char *  fileName,
const char *  debugVarName,
const char *  debugCodeFile,
int  debugCodeLine 
)

Definition at line 572 of file hit_tile.c.

void hit_tileFillInternal ( void *  varP,
void *  value,
const char *  name,
const char *  file,
int  numLine 
)

Definition at line 342 of file hit_tile.c.

Here is the call graph for this function:

void hit_tileFillUpdateArrayCoordinatesRec ( HitTile root,
int  coords[HIT_MAXDIMS] 
)

Definition at line 300 of file hit_tile.c.

Here is the caller graph for this function:

void hit_tileFreeRecInternal ( void *  varP)

Definition at line 1658 of file hit_tile.c.

void hit_tileGlue ( void *  tileInA,
void *  tileInB,
void *  tileOut 
)

Glue two 1-dimensional array tiles with contiguous domains.

For two array tile variables of 1-dimension, and with contigous domains ( [a:b] and [b+1,c] ), this function generates a new tile variable with the whole domain ( [a:c] ) and a single contigous memory zone for the data of the two variables.

Deprecated:
Not needed in the Trasgo translation system anymore, and not needed for any application example.
Parameters
[in,out]tileInAA pointer to a HitTile derived type variable.
[in,out]tileInBA pointer to a HitTile derived type variable.
[out]tileOutA pointer to a non-initialized HitTile derived type variable.

Definition at line 1698 of file hit_tile.c.

Here is the call graph for this function:

int hit_tileReduceDims ( void *  newVar,
int  numReductions 
)

Reduce dimensions.

If the shape of a HitTile variable has some starting cardinalities which are 1 (e.g. a matrix of 1xn elements), the variable can be accesed faster if the initial trivial dimensions are eliminated (e.g. accesing the 1xn matrix as a vector of n elements).

This function eliminates the number of required starting dimensions of a variable shape as long as they are equal to 1, without modifying the values of the elements or its storage.

For example, if a variable have four dimensions, and its cardinalities are 1,1,2,4, we may request to reduce 2 dimensions. The result is the same variable, with the same data, but having only 2 dimensions with cardinalities 2,4.

Deprecated:
Not needed in the Trasgo translation system anymore, and not needed for any application example.
Parameters
[in,out]newVarA pointer to a HitTile derived type variable.
[in]numReductionsNumber of starting dimensions to eliminate.
Returns
0 if the reduction is correct, 1 in case the number of required dimensions cannot be reduced.

Definition at line 1296 of file hit_tile.c.

int hit_tileSelectArrayCoordsInternal ( void *  newVarP,
const void *  oldVarP,
HitShape  sh,
int  out 
)

Definition at line 1116 of file hit_tile.c.

Here is the call graph for this function:

int hit_tileSelectInternal ( void *  newVarP,
const void *  oldVarP,
HitShape  sh,
int  out 
)

Definition at line 942 of file hit_tile.c.

Here is the call graph for this function:

void hit_tileSelectRefPointer ( HitTile newVar,
const HitTile oldVar 
)

Definition at line 913 of file hit_tile.c.

Here is the caller graph for this function:

HitShape hit_tileShapeArray2Tile ( void *  var,
HitShape  sh 
)

Transforms a shape from ancestor array to tile coordinates space.

Parameters
[in]varA HitTile derived type variable.
[in]shShape to be transformed.
Return values
Transformedshape.

Definition at line 1640 of file hit_tile.c.

HitShape hit_tileShapeLocal ( const void *  inTile)

Get the shape of a HitTile variable in tile coordinates.

Parameters
[in]inTileA HitTile derived type variable.
Returns
Shape of the HitTile variable in tile coordinates.

Definition at line 1608 of file hit_tile.c.

HitShape hit_tileShapeTile2Array ( void *  var,
HitShape  sh 
)

Transforms a shape from tile to ancestor array coordinates space.

Parameters
[in]varA HitTile derived type variable.
[in]shShape to be transformed.
Return values
Transformedshape.

Definition at line 1622 of file hit_tile.c.

void hit_tileSingleInternal ( void *  tileP,
void *  varP,
size_t  size 
)

Definition at line 135 of file hit_tile.c.

void hit_tileUpdateFromToAncestorInternal ( void *  sh,
int  fromTo,
const char *  name,
const char *  file,
int  numLine 
)

Definition at line 1371 of file hit_tile.c.

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

HitTile HIT_TILE_NULL = HIT_TILE_NULL_STATIC

Null value for HitTile derived types.

Definition at line 63 of file hit_tile.c.

HitPTile HIT_TILE_NULL_POINTER = &HIT_TILE_NULL

Definition at line 64 of file hit_tile.c.