Value¶
- class madspace.Value(*args, **kwargs)¶
Bases:
pybind11_objectA 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
Value``s. A value with ``local_index >= 0refers to the output of an earlier instruction. Otherwiseliteral_valueholds an inline scalar or dense tensor constant. Scalars and nestedstd::vector``s convert to a ``Valueimplicitly.Overloaded function.
__init__(self: madspace._madspace_py.Value, value: typing.SupportsInt) -> None
Scalar integer constant.
__init__(self: madspace._madspace_py.Value, value: typing.SupportsFloat) -> None
Scalar floating-point constant.
__init__(self: madspace._madspace_py.Value, values: collections.abc.Sequence[typing.SupportsInt], shape: collections.abc.Sequence[typing.SupportsInt] = []) -> None
__init__(self: madspace._madspace_py.Value, values: collections.abc.Sequence[typing.SupportsFloat], shape: collections.abc.Sequence[typing.SupportsInt] = []) -> None
- property literal_value¶
Inline constant, or
std::monostatefor a graph local.
- property local_index¶
Index of the referenced graph local, or -1 for a literal.
- property type¶
Type of the value.