Value¶
-
struct Value¶
A node in a compute graph: a typed tensor that is either a literal constant or a reference to a graph local.
FunctionBuilder methods take and return
Values. A value withlocal_index >= 0refers to the output of an earlier instruction. Otherwiseliteral_valueholds an inline scalar or dense tensor constant. Scalars and nestedstd::vectors convert to aValueimplicitly.Public Functions
-
inline Value()¶
Empty value (no literal, no local); tests as
false.
-
inline Value(me_int_t value)¶
Scalar integer constant.
-
inline Value(double value)¶
Scalar floating-point constant.
-
template<ScalarType T>
inline Value(const std::vector<T> &values, const std::vector<int> &shape = {})¶
-
inline operator bool()¶
-
inline Value()¶