Alsvinn
0.5.3
The fast FVM simulator with UQ support
|
#include <alsfvm/memory/View.hpp>
Public Member Functions | |
__device__ __host__ | View (T *pointer, size_t nx, size_t ny, size_t nz, size_t extentXInBytes, size_t extentYInBytes) |
View constructs the View. More... | |
__device__ __host__ T & | at (size_t x, size_t y, size_t z) |
at returns a reference to the element at the given location More... | |
__device__ __host__ const T & | at (size_t x, size_t y, size_t z) const |
at returns a reference to the element at the given location (const version) More... | |
__device__ __host__ T & | at (size_t index) |
at returns the reference to the element index by the single value index More... | |
__device__ __host__ const T & | at (size_t index) const |
at returns the reference to the element index by the single value index More... | |
__device__ __host__ size_t | size () const |
__device__ __host__ size_t | index (size_t x, size_t y, size_t z) const |
index computes the linear index of the given cell More... | |
__device__ __host__ size_t | getNumberOfXCells () const |
__device__ __host__ size_t | getNumberOfYCells () const |
__device__ __host__ size_t | getNumberOfZCells () const |
Public Attributes | |
const size_t | nx |
const size_t | ny |
const size_t | nz |
View is raw view to the memory area. It will only contain the most basic functionality. This is ideal for use in an inner loop.
The View class is not meant for memory management, it will not delete its pointer on scope exit.
|
inline |
pointer | raw pointer to the data. |
nx | the number of elements in x direction (in number of T's) (used for bounds checking) |
ny | the number of elements in y direction (in number of T's) (used for bounds checking) |
nz | the number of elements in z direction (in number of T's) (used for bounds checking) |
extentXInBytes | the extent in X direction (used for indexing) |
extentYInBytes | the extent in Y direction (used for indexing) |
|
inline |
at returns a reference to the element at the given location
x | the x coordinate |
y | the y coordinate |
z | the z coordinate |
|
inline |
at returns a reference to the element at the given location (const version)
x | the x coordinate |
y | the y coordinate |
z | the z coordinate |
|
inline |
at returns the reference to the element index by the single value index
index |
|
inline |
at returns the reference to the element index by the single value index
index |
|
inline |
|
inline |
|
inline |
|
inline |
index computes the linear index of the given cell
x | the x coordinate |
y | the y coordinate |
z | the z coordinate |
|
inline |
const size_t alsfvm::memory::View< T >::nx |
const size_t alsfvm::memory::View< T >::ny |
const size_t alsfvm::memory::View< T >::nz |