Hitmap 1.3
|
Go to the source code of this file.
Macros | |
Initializers, constructors | |
/* 3. Hit SHAPE GENERATING FUNCTIONS | |
#define | hit_shape(nd,...) |
#define | hit_shapeIndex(nd,...) |
#define | hit_shapeStd(nd,...) |
Iterators | |
#define | hit_shapeIterator(var, shape, dim) |
#define | hit_shapeIteratorTileCoord(var, shape, dim) |
Functions | |
void | dumpShape (HitShape sh) |
Binary shape operators | |
int | hit_shapeCmp (HitShape sh1, HitShape sh2) |
HitShape | hit_shapeIntersect (HitShape sh1, HitShape sh2) |
HitShape | hit_shapeSubset (HitShape sh1, HitShape sh2) |
HitShape | hit_shapeTileToArray (HitShape sh1, HitShape sh2) |
Variables | |
HitShape | HIT_SIG_SHAPE_NULL |
HitSigShape | HIT_SIG_SHAPE_WHOLE |
HitShape | HIT_SHAPE_WHOLE |
Retrieving/Setting shape information | |
#define | hit_shapeDims(shape) |
#define | hit_sshapeDims(shape) |
#define | hit_shapeDimsSet(shape, value) |
#define | hit_shapeSig(shape, dim) |
#define | hit_shapeSigCard(shape, dim) |
Boundaries and halos | |
#define | HIT_SHAPE_BEGIN |
#define | HIT_SHAPE_END |
HitShape | hit_shapeBorder (HitShape shape, int dim, int position, int offset) |
HitShape | hit_shapeDimExpand (HitShape shape, int dim, int position, int offset) |
HitShape | hit_shapeExpand (HitShape shape, int dims, int offset) |
Functionalities to manipulate Signature based domains.
Manipulation of HitSigShape domains. Multidimensional shapes for dense or strided domains of indexes in a bounding box.
Definition in file hit_sshape.h.
#define hit_shape | ( | nd, | |
... | |||
) |
Constructor (1) of Signature domain shapes.
The number of dimensions is limited by the maximum number of dimensions established when compiling the library.
[in] | nd | int Number of dimensions. |
[in] | ... | HitSig_list A list of "nd" signature values. |
HitShape | A new shape value. |
Definition at line 175 of file hit_sshape.h.
#define HIT_SHAPE_BEGIN |
Hit Shape Begin flag for the hit_shapeBorder function.
Definition at line 515 of file hit_sshape.h.
#define HIT_SHAPE_END |
Hit Shape End flag for the hit_shapeBorder function.
Definition at line 522 of file hit_sshape.h.
#define hit_shapeDims | ( | shape | ) |
Number of dimensions in a shape.
[in] | shape | HitShape A domain shape. |
int | Number of dimensions of the shape. |
Definition at line 364 of file hit_sshape.h.
#define hit_shapeDimsSet | ( | shape, | |
value | |||
) |
Set the number of dimensions in a shape.
[out] | shape | HitShape A domain shape. |
[in] | value | The new number of dimensions. |
Definition at line 387 of file hit_sshape.h.
#define hit_shapeIndex | ( | nd, | |
... | |||
) |
/** Constructor (2) of Signature domain shapes, for a particular multidimensional index.
This construtor builds a shape that contains only one multidimensional index.
The number of dimensions is limited by the maximum number of dimensions established when compiling the library.
The name will change to use the hit_sshape prefix.
Not used in the Trasgo translation system or in any application example
[in] | nd | int Number of dimensions. |
[in] | ... | int_list A list of "nd" integer indexes. |
HitShape | A new shape value with one multidimensional index. |
Definition at line 227 of file hit_sshape.h.
#define hit_shapeIterator | ( | var, | |
shape, | |||
dim | |||
) |
Loop across the array indexes of a dimension.
[out] | var | int Variable index to be used as counter in the loop. |
[in] | shape | HitShape A domain shape. |
[in] | dim | int Number of the dimension. |
Definition at line 603 of file hit_sshape.h.
#define hit_shapeIteratorTileCoord | ( | var, | |
shape, | |||
dim | |||
) |
Loop across the tile indexes of a dimension.
This iterator starts at 0, advances with stride 1, and stops at the cardinality of the dimension signature minus 1.
[out] | var | int Variable index to be used as counter in the loop. |
[in] | shape | HitShape A domain shape. |
[in] | dim | int Number of the dimension. |
Definition at line 619 of file hit_sshape.h.
#define hit_shapeSig | ( | shape, | |
dim | |||
) |
Access to one dimensional signature in a shape.
[in] | shape | HitShape A domain shape. |
[in] | dim | int A dimension, |
HitSig | The dimensional signature of that shape. |
Definition at line 400 of file hit_sshape.h.
#define hit_shapeSigCard | ( | shape, | |
dim | |||
) |
Cardinality of a dimensional signature in a shape.
[in] | shape | HitShape A domain shape. |
[in] | dim | int A dimension, |
int | The cardinality of the dimensional signature of that shape. |
Definition at line 412 of file hit_sshape.h.
#define hit_shapeStd | ( | nd, | |
... | |||
) |
/** Constructor (3) of Signature domain shapes, with standard C array domains.
Standard array C domains have index ranges from 0 to N-1, with no stride. A size for each dimension is enough to describe them.
The number of dimensions is limited by the maximum number of dimensions established when compiling the library.
[in] | nd | int Number of dimensions. |
[in] | ... | int_list A list of "nd" positive integer size values. |
HitShape | A new shape value. |
Definition at line 295 of file hit_sshape.h.
#define hit_sshapeDims | ( | shape | ) |
Number of dimensions in a shape.
[in] | shape | HitShape A domain shape. |
int | Number of dimensions of the shape. |
Definition at line 376 of file hit_sshape.h.
void dumpShape | ( | HitShape | sh | ) |
Definition at line 391 of file hit_shape.c.
Boundary selection.
Return another shape with the shape of the boundary (or border) elements in a given dimension, or a similar boundary shape but displaced by a given offset in that dimension. This function is useful to compute halos, and other boundary related shapes.
shape | A HitShape. |
dim | The dimension. |
position | Flag to select the border:
|
offset | A positive offset moves the border outside the shape. A negative offser moves the border inside the shape. |
Definition at line 241 of file hit_shape.c.
Compare two shape values.
sh1 | Domain shape. |
sh2 | Domain shape. |
Definition at line 109 of file hit_shape.c.
Expand a boundary.
Return a shape with a given boundary of one selected dimension expanded by an offset. This function is useful to compute halos, and other boundary related shapes.
shape | A HitShape. |
dim | The dimension to expand. |
position | Flag to select the border:
|
offset | A positive offset moves the border outside the shape. A negative offser moves the border inside the shape. |
Definition at line 226 of file hit_shape.c.
Expand boundaries.
Return a shape with the boundaries of several dimensions expanded by a given offset. This function is useful to compute halos, and other boundary related shapes.
shape | A HitShape. |
dims | The number of dimension to expand. |
offset | A positive offset moves the border outside the shape. A negative offser moves the border inside the shape. |
Definition at line 210 of file hit_shape.c.
Intersection of two shapes.
sh1 | Domain shape. |
sh2 | Domain shape. |
Definition at line 123 of file hit_shape.c.
Subset or subselection of a shape in tile coordinates.
Returns a new domain shape with the indexes of the first shape that exist in the second shape when renumbering the first shape in standard C notation (starting at 0, stride 1).
sh1 | Domain shape. |
sh2 | Subselection shape. |
Definition at line 157 of file hit_shape.c.
Transform tile coordinates to array coordinates.
Returns a new domain shape with the indexes of the second shape transformed to array coordinates in the reference system of the first shape.
sh1 | Domain shape. |
sh2 | Subshape in tile coordinates |
Definition at line 181 of file hit_shape.c.
HitShape HIT_SHAPE_WHOLE |
Special value: Whole domain.
Special value to indicate in tile selections that the whole collection of indexes of another shape should be selected.
The number of dimensions of this value is 0.
Definition at line 75 of file hit_shape.c.
HitShape HIT_SIG_SHAPE_NULL |
/** Null value for signature shapes.
The number of dimensions of this value is -1.
Definition at line 62 of file hit_shape.c.
HitSigShape HIT_SIG_SHAPE_WHOLE |
Special value: Whole domain.
Special value to indicate in tile selections that the whole collection of indexes of another shape should be selected.
The number of dimensions of this value is 0.
Definition at line 77 of file hit_shape.c.