Single-grid data on a Box2D: VALID box + ng ghost layers, ncomp components, component-slow layout.
More...
#include <fab2d.hpp>
|
| | Fab2D ()=default |
| |
| | Fab2D (const Box2D &valid, int ncomp, int ng) |
| | Allocates the valid box grown by ng ghosts, ncomp components, initialized to 0.
|
| |
| const Box2D & | box () const |
| | VALID box (without ghosts).
|
| |
| const Box2D & | grown_box () const |
| | Grown box (valid + ng ghosts) = actual memory footprint.
|
| |
| int | ncomp () const |
| | Number of components.
|
| |
| int | n_ghost () const |
| | Number of ghost layers.
|
| |
| std::int64_t | size () const |
| | Buffer size (nx_tot * ny_tot * ncomp).
|
| |
| Real & | operator() (int i, int j, int c=0) |
| | HOST write access (i, j, c) (bounds assert in debug).
|
| |
| Real | operator() (int i, int j, int c=0) const |
| | HOST read access (i, j, c) (bounds assert in debug).
|
| |
| Array4 | array () |
| | WRITE handle (POD device-copyable) over this Fab. Valid as long as the Fab lives.
|
| |
| ConstArray4 | const_array () const |
| | READ handle (POD device-copyable) over this Fab. Valid as long as the Fab lives.
|
| |
| Real * | data () |
| | Raw pointer to the buffer (passed directly to MPI in unified memory, for instance).
|
| |
| const Real * | data () const |
| |
| void | set_val (Real v) |
| | Fills the whole buffer (valid + ghosts) with value v.
|
| |
Single-grid data on a Box2D: VALID box + ng ghost layers, ncomp components, component-slow layout.
OWNS its buffer (unified memory). Exposes Array4 / ConstArray4 handles to kernels (capture by value), never the Fab itself.
◆ Fab2D() [1/2]
◆ Fab2D() [2/2]
| pops::Fab2D::Fab2D |
( |
const Box2D & |
valid, |
|
|
int |
ncomp, |
|
|
int |
ng |
|
) |
| |
|
inline |
Allocates the valid box grown by ng ghosts, ncomp components, initialized to 0.
◆ array()
WRITE handle (POD device-copyable) over this Fab. Valid as long as the Fab lives.
◆ box()
| const Box2D & pops::Fab2D::box |
( |
| ) |
const |
|
inline |
VALID box (without ghosts).
◆ const_array()
READ handle (POD device-copyable) over this Fab. Valid as long as the Fab lives.
◆ data() [1/2]
| Real * pops::Fab2D::data |
( |
| ) |
|
|
inline |
Raw pointer to the buffer (passed directly to MPI in unified memory, for instance).
◆ data() [2/2]
| const Real * pops::Fab2D::data |
( |
| ) |
const |
|
inline |
◆ grown_box()
| const Box2D & pops::Fab2D::grown_box |
( |
| ) |
const |
|
inline |
Grown box (valid + ng ghosts) = actual memory footprint.
◆ n_ghost()
| int pops::Fab2D::n_ghost |
( |
| ) |
const |
|
inline |
◆ ncomp()
| int pops::Fab2D::ncomp |
( |
| ) |
const |
|
inline |
◆ operator()() [1/2]
| Real & pops::Fab2D::operator() |
( |
int |
i, |
|
|
int |
j, |
|
|
int |
c = 0 |
|
) |
| |
|
inline |
HOST write access (i, j, c) (bounds assert in debug).
Do not call inside a device kernel: go through array() (POD handle).
◆ operator()() [2/2]
| Real pops::Fab2D::operator() |
( |
int |
i, |
|
|
int |
j, |
|
|
int |
c = 0 |
|
) |
| const |
|
inline |
HOST read access (i, j, c) (bounds assert in debug).
◆ set_val()
| void pops::Fab2D::set_val |
( |
Real |
v | ) |
|
|
inline |
Fills the whole buffer (valid + ghosts) with value v.
◆ size()
| std::int64_t pops::Fab2D::size |
( |
| ) |
const |
|
inline |
Buffer size (nx_tot * ny_tot * ncomp).
The documentation for this class was generated from the following file: