GEOSX
|
Lightweight wrapper around a c-array. More...
#include <Tensor.hpp>
Public Types | |
using | value_type = T |
Alias for type template parameter. | |
Public Member Functions | |
GEOSX_HOST_DEVICE GEOSX_FORCE_INLINE T const & | operator[] (std::ptrdiff_t const i) const |
Const element access. More... | |
GEOSX_HOST_DEVICE GEOSX_FORCE_INLINE T & | operator[] (std::ptrdiff_t const i) |
Non-const element access. More... | |
template<typename U = T> | |
GEOSX_HOST_DEVICE GEOSX_FORCE_INLINE std::enable_if_t< std::is_floating_point< U >::value, bool > | operator== (Tensor< U, SIZE > const &rhs) const |
Equality comparison operator. More... | |
template<typename U = T> | |
GEOSX_HOST_DEVICE GEOSX_FORCE_INLINE std::enable_if_t< !std::is_floating_point< U >::value, bool > | operator== (Tensor< U, SIZE > const &rhs) const |
Equality comparison operator. More... | |
GEOSX_HOST_DEVICE GEOSX_FORCE_INLINE constexpr int | size (int junk) const |
Returns the size of the tensor. More... | |
Public Attributes | |
T | data [SIZE] = {} |
Underlying array. | |
Static Public Attributes | |
static constexpr int | SIZE = SIZE_TPARAM |
Alias for size template parameter. | |
Friends | |
std::ostream & | operator<< (std::ostream &os, Tensor< T, SIZE > const &t) |
Stream insertion operator for Tensor. More... | |
Lightweight wrapper around a c-array.
T | data type |
SIZE_TPARAM | number of values |
Definition at line 29 of file Tensor.hpp.
|
inline |
Equality comparison operator.
U | dummy parameter to enable SFINAE, do not provide explicitly |
rhs | the right-hand side value to compare to |
Definition at line 76 of file Tensor.hpp.
|
inline |
Equality comparison operator.
U | dummy parameter to enable SFINAE, do not provide explicitly |
rhs | the right-hand side value to compare to |
Definition at line 99 of file Tensor.hpp.
|
inline |
Const element access.
i | element index |
Definition at line 48 of file Tensor.hpp.
|
inline |
Non-const element access.
i | element index |
Definition at line 60 of file Tensor.hpp.
|
inline |
Returns the size of the tensor.
junk | Unused |
Definition at line 118 of file Tensor.hpp.
|
friend |
Stream insertion operator for Tensor.
os | the output stream |
t | the tensor value |
os
Definition at line 135 of file Tensor.hpp.