Highly Efficient FFT for Exascale: HeFFTe v2.3
|
A generic container that describes a 3d box of indexes. More...
#include <heffte_geometry.h>
Public Member Functions | |
box3d (std::array< index, 3 > clow, std::array< index, 3 > chigh) | |
Constructs a box from the low and high indexes, the span in each direction includes the low and high (uses default order). | |
box3d (std::array< index, 3 > clow, std::array< index, 3 > chigh, std::array< int, 3 > corder) | |
Constructs a box from the low and high indexes, also sets an order. | |
box3d (std::array< index, 2 > clow, std::array< index, 2 > chigh) | |
Constructor for the two dimensional case. | |
box3d (std::array< index, 2 > clow, std::array< index, 2 > chigh, std::array< int, 2 > corder) | |
Constructor for the two dimensional case, order is either (0, 1) or (1, 0). | |
bool | empty () const |
Returns true if the box contains no indexes. | |
long long | count () const |
Counts all indexes in the box, i.e., the volume. | |
box3d | collide (box3d const other) const |
Creates a box that holds the intersection of this box and the other. | |
box3d | r2c (int dimension) const |
Returns the box that is reduced in the given dimension according to the real-to-complex symmetry. | |
bool | is2d () const |
Returns true if either dimension contains only a single index. | |
bool | operator== (box3d const &other) const |
Compares two boxes, ignoring the order, returns true if all sizes and boundaries match. | |
bool | operator!= (box3d const &other) const |
Compares two boxes, ignoring the order, returns true if either of the box boundaries do not match. | |
bool | ordered_same_as (box3d const &other) const |
Compares the order of two boxes, ignores the dimensions, returns true if the order is the same. | |
int | find_order (int dir) const |
Returns the effective order of the direction (dir), 0 -> fast, 1 -> mid, 2 -> slow. | |
index | osize (int dimension) const |
Get the ordered size of the dimension, i.e., size[order[dimension]]. | |
Public Attributes | |
std::array< index, 3 > const | low |
The three lowest indexes. | |
std::array< index, 3 > const | high |
The three highest indexes. | |
std::array< index, 3 > const | size |
The number of indexes in each direction. | |
std::array< int, 3 > const | order |
The order of the dimensions in the k * plane_stride + j * line_stride + i indexing. | |
A generic container that describes a 3d box of indexes.
The box is defined by three low and three high indexes and holds all indexes from low to high including the low and high. For example,
The box3d also defines a size field that holds the number of indexes in each direction, for the example above size will be {1, 2, 3}.
In addition to the low and high indexes, the box has orientation with respect to the i j k indexing, indicating which are the fast, middle and slow growing dimensions. For example, suppose we want to access the entries of a box stored in a data array
However,
The order must always hold a permutation of the entries 0, 1, and 2.