Tenncor
|
Leaf node implementation containing mutable Eigen data. More...
#include <variable.hpp>
Public Member Functions | |
Variable< T > & | operator= (const Variable< T > &other)=default |
Variable< T > & | operator= (Variable< T > &&other)=default |
Variable< T > & | operator= (std::vector< T > input) |
Assign vectorized data to data source. More... | |
Variable< T > & | operator= (const TensorT< T > &input) |
Assign Eigen tensor to internal data object. More... | |
void | assign (const void *input, egen::_GENERATED_DTYPE dtype, teq::Shape shape) |
Assign void pointer of specified data type enum and shape. More... | |
std::string | to_string (void) const override |
Implementation of iTensor. More... | |
bool | is_const (void) const override |
Implementation of iLeaf. More... | |
![]() | |
virtual | ~iLeaf (void)=default |
const teq::Shape & | shape (void) const override |
Implementation of iTensor. More... | |
void * | data (void) override |
Implementation of iData. More... | |
const void * | data (void) const override |
Implementation of iData. More... | |
size_t | type_code (void) const override |
Implementation of iData. More... | |
std::string | type_label (void) const override |
Implementation of iData. More... | |
size_t | nbytes (void) const override |
Implementation of iData. More... | |
![]() | |
void | accept (iTraveler &visiter) override |
Implementation of iTensor. More... | |
![]() | |
virtual | ~iTensor (void)=default |
![]() | |
virtual | ~iData (void)=default |
Static Public Member Functions | |
static Variable< T > * | get (T *ptr, teq::Shape shape, std::string label="") |
Return Variable given raw pointer array whose size is denoted by shape. More... | |
static Variable< T > * | get (teq::Shape shape, std::string label="") |
Return zero-initialized Variable of specified shape. More... | |
static Variable< T > * | get (T scalar, teq::Shape shape, std::string label="") |
Return scalar-initialized Variable of specified shape. More... | |
static Variable< T > * | get (std::vector< T > data, teq::Shape shape, std::string label="") |
Return Variable whose data is initialized by vector data. More... | |
static Variable< T > * | get (const Variable< T > &other) |
Return deep copy of other Variable. More... | |
static Variable< T > * | get (Variable< T > &&other) |
Return move of other Variable. More... | |
Public Attributes | |
std::string | label_ |
Label for distinguishing variable nodes. More... | |
Private Member Functions | |
Variable (T *data, teq::Shape shape, std::string label) | |
Variable (const Variable< T > &other)=default | |
Variable (Variable< T > &&other)=default | |
Additional Inherited Members | |
![]() | |
iLeaf (T *data, teq::Shape shape) | |
![]() | |
TensorT< T > | data_ |
Data Source. More... | |
teq::Shape | shape_ |
Shape utility to avoid excessive conversion between data_.dimensions() More... | |
Leaf node implementation containing mutable Eigen data.
|
inlineprivate |
|
privatedefault |
|
privatedefault |
|
inline |
Assign void pointer of specified data type enum and shape.
|
static |
Return Variable given raw pointer array whose size is denoted by shape.
|
inlinestatic |
Return zero-initialized Variable of specified shape.
|
inlinestatic |
Return scalar-initialized Variable of specified shape.
|
inlinestatic |
Return Variable whose data is initialized by vector data.
|
inlinestatic |
Return deep copy of other Variable.
|
inlinestatic |
Return move of other Variable.
|
inlineoverridevirtual |
Implementation of iLeaf.
Implements teq::iLeaf.
|
default |
|
default |
|
inline |
Assign vectorized data to data source.
|
inline |
Assign Eigen tensor to internal data object.
|
inlineoverridevirtual |
Implementation of iTensor.
Implements teq::iTensor.
std::string eteq::Variable< T >::label_ |
Label for distinguishing variable nodes.