Brick Library 0.1
Performance-portable stencil datalayout & codegen
|
n-dimensional Z-Mort ordering More...
#include <zmort.h>
Public Member Functions | |
ZMORT () | |
Default to 0-d. | |
ZMORT (unsigned long id, unsigned long dim) | |
Initialize using z-mort id and the number of dimensions. | |
ZMORT | operator[] (unsigned long p) |
Continuously construct a Z-Mort index. | |
unsigned long | operator() (unsigned long d) |
Get positions of a Z-Mort index on the d-th dimension. | |
ZMORT | set (unsigned long d, unsigned long p) |
Set positions of a Z-Mort index on the d-th dimension. | |
operator unsigned long () const | |
Implicit conversion to extract the Z-Mort index. | |
Public Attributes | |
unsigned long | id |
Z-Mort index of this struct. | |
unsigned long | dim |
Number of dimensions. | |
n-dimensional Z-Mort ordering
Preliminary n-d Z-Mort implementation whose returning index is not compact. Only for perfect 2-exponentials will return compact & contiguous index.
This can be viewed as a single Z-Mort index or as an array of indices that represent the original n-dimensional position. It can be constructed incrementally from 0-d Z-Mort.
|
inline |
Default to 0-d.
|
inline |
Initialize using z-mort id and the number of dimensions.
|
inline |
Implicit conversion to extract the Z-Mort index.
|
inline |
Get positions of a Z-Mort index on the d-th dimension.
d | The dimension to get index, 0 is the fastest varying dimension |
For example, see ZMORT::operator[](unsigned long).
|
inline |
|
inline |
Set positions of a Z-Mort index on the d-th dimension.
d | The dimension, 0 is the fastest varying dimension |
p | The position |
unsigned long ZMORT::dim |
Number of dimensions.
unsigned long ZMORT::id |
Z-Mort index of this struct.