![]() |
MFEM v4.8.0
Finite element discretization library
|
A basic generic Tensor class, appropriate for use on the GPU. More...
#include <dtensor.hpp>
Public Member Functions | |
| DeviceTensor ()=delete | |
| Default constructor. | |
| template<typename... Args> | |
| MFEM_HOST_DEVICE | DeviceTensor (Scalar *data_, Args... args) |
| Constructor to initialize a tensor from the Scalar array data_. | |
| DeviceTensor (const DeviceTensor &)=default | |
| Copy constructor (default) | |
| DeviceTensor & | operator= (const DeviceTensor &)=default |
| Copy assignment (default) | |
| MFEM_HOST_DEVICE | operator Scalar * () const |
Conversion to Scalar *. | |
| template<typename... Args> | |
| MFEM_HOST_DEVICE Scalar & | operator() (Args... args) const |
| Const accessor for the data. | |
| MFEM_HOST_DEVICE Scalar & | operator[] (int i) const |
| Subscript operator where the tensor is viewed as a 1D array. | |
Protected Attributes | |
| int | capacity |
| Scalar * | data |
| int | sizes [Dim] |
A basic generic Tensor class, appropriate for use on the GPU.
Definition at line 81 of file dtensor.hpp.
|
delete |
Default constructor.
|
inline |
Constructor to initialize a tensor from the Scalar array data_.
Definition at line 94 of file dtensor.hpp.
|
default |
Copy constructor (default)
|
inline |
Conversion to Scalar *.
Definition at line 110 of file dtensor.hpp.
|
inline |
Const accessor for the data.
Definition at line 114 of file dtensor.hpp.
|
default |
Copy assignment (default)
|
inline |
Subscript operator where the tensor is viewed as a 1D array.
Definition at line 121 of file dtensor.hpp.
|
protected |
Definition at line 84 of file dtensor.hpp.
|
protected |
Definition at line 85 of file dtensor.hpp.
|
protected |
Definition at line 86 of file dtensor.hpp.