![]() |
MFEM
v4.2.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. More... | |
template<typename... Args> | |
DeviceTensor (Scalar *_data, Args...args) | |
Constructor to initialize a tensor from the Scalar array _data. More... | |
MFEM_HOST_DEVICE | DeviceTensor (const DeviceTensor &t) |
Copy constructor. More... | |
operator Scalar * () const | |
Conversion to Scalar * . More... | |
template<typename... Args> | |
MFEM_HOST_DEVICE Scalar & | operator() (Args...args) const |
Const accessor for the data. More... | |
MFEM_HOST_DEVICE Scalar & | operator[] (int i) const |
Subscript operator where the tensor is viewed as a 1D array. More... | |
Protected Attributes | |
int | capacity |
Scalar * | data |
int | sizes [Dim] |
A basic generic Tensor class, appropriate for use on the GPU.
Definition at line 79 of file dtensor.hpp.
|
delete |
Default constructor.
|
inline |
Constructor to initialize a tensor from the Scalar array _data.
Definition at line 92 of file dtensor.hpp.
|
inline |
Copy constructor.
Definition at line 102 of file dtensor.hpp.
|
inline |
Conversion to Scalar *
.
Definition at line 113 of file dtensor.hpp.
|
inline |
Const accessor for the data.
Definition at line 117 of file dtensor.hpp.
|
inline |
Subscript operator where the tensor is viewed as a 1D array.
Definition at line 124 of file dtensor.hpp.
|
protected |
Definition at line 82 of file dtensor.hpp.
|
protected |
Definition at line 83 of file dtensor.hpp.
|
protected |
Definition at line 84 of file dtensor.hpp.