#include <Cartesian.h>
Public Types | |
typedef std::vector< uint32_t > | cart_dims |
Container type for topology dimensions. | |
typedef std::vector< bool > | cart_period |
Container type for topology periodicity. | |
typedef std::vector< uint32_t > | cart_coords |
Public Member Functions | |
Constructors & destructor | |
Cartesian (ident_t id, const cart_dims &num_locations, const cart_period &is_periodic) | |
Get & set cartesian topology information | |
uint32_t | num_dimensions () const |
void | get_dimensionv (cart_dims &outv) const |
void | get_periodv (cart_period &outv) const |
void | get_coords (Location *location, cart_coords &coords) const |
void | set_coords (Location *location, const cart_coords &coords) |
Cartesian | ( | ident_t | id, | |
const cart_dims & | num_locations, | |||
const cart_period & | is_periodic | |||
) |
Creates a new instance and sets data to the given values.
id | Topology identifier | |
num_locations | Contains the number of locations in each dimension | |
is_periodic | Contains boolean values defining whether the corresponding dimension is periodic or not |
void get_coords | ( | Location * | location, | |
cart_coords & | coords | |||
) | const |
Stores the coordinate of the given location in the vector coords.
location | Location in the system hierarchy | |
[out] | coords | Coordinate of the given location |
RuntimeError | if the given location is not part of this topology |
void get_dimensionv | ( | cart_dims & | outv | ) | const |
Stores the number of locations in each dimension in the given vector outv.
[out] | outv | Number of locations per dimension |
void get_periodv | ( | cart_period & | outv | ) | const |
Stores the periodicity of each dimension in the given vector outv.
[out] | outv | Periodicity per dimension |
uint32_t num_dimensions | ( | ) | const |
Returns the number of dimensions of the cartesian grid.
void set_coords | ( | Location * | location, | |
const cart_coords & | coords | |||
) |
Assigns the coordinate coords to the given location.
location | Location in the system hierarchy | |
coords | Coordinate of the given location |
RuntimeError | if one of the following conditions is met:
|
![]() |
Copyright © 1998–2009 Forschungszentrum Jülich, Jülich Supercomputing Centre |