27#include <torch/types.h>
40using namespace torch::indexing;
53 using std::variant<
Size, torch::Tensor>::variant;
56 const torch::Tensor *
traceable()
const noexcept;
The wrapper (decorator) for cross-referencing unresolved values at parse time.
Definition CrossRef.h:54
torch::SmallVector< TensorIndex > TensorIndices
Definition types.h:41
torch::ArrayRef< TensorIndex > TensorIndicesRef
Definition types.h:42
Definition CrossRef.cxx:31
bool operator!=(const TraceableSize &lhs, const TraceableSize &rhs)
Definition types.cxx:66
torch::Device & default_device()
Default device.
Definition types.cxx:187
torch::TensorOptions & default_integer_tensor_options()
Default integral tensor options.
Definition types.cxx:165
torch::TensorOptions & default_tensor_options()
Definition types.cxx:157
double Real
Definition types.h:31
std::string & buffer_name_separator()
Default nested buffer name separator.
Definition types.cxx:215
torch::Dtype & default_dtype()
Default floating point type.
Definition types.cxx:173
torch::SmallVector< Size > TensorShape
Definition types.h:34
torch::Dtype & default_integer_dtype()
Default integral type.
Definition types.cxx:180
bool & currently_solving_nonlinear_system()
Definition types.cxx:229
Real & machine_precision()
Definition types.cxx:194
int64_t Size
Definition types.h:33
Real & tolerance()
The tolerance used in various algorithms.
Definition types.cxx:201
FType
Role in a function definition.
Definition types.h:119
torch::IntArrayRef TensorShapeRef
Definition types.h:35
std::ostream & operator<<(std::ostream &os, const EnumSelection &es)
Definition EnumSelection.cxx:31
Real & tighter_tolerance()
A tighter tolerance used in various algorithms.
Definition types.cxx:208
std::string & parameter_name_separator()
Default nested parameter name separator.
Definition types.cxx:222
bool operator==(const TraceableSize &lhs, const TraceableSize &rhs)
Definition types.cxx:60
Traceable size.
Definition types.h:52
torch::Tensor as_tensor() const
Definition types.cxx:51
Size concrete() const
Definition types.cxx:37
const torch::Tensor * traceable() const noexcept
Definition types.cxx:31
Traceable tensor shape.
Definition types.h:81
TensorShape concrete() const
Definition types.cxx:124
torch::Tensor as_tensor() const
Definition types.cxx:133
TraceableTensorShape(const TensorShape &shape)
Definition types.cxx:78
int64_t Size
Definition types.h:83
TraceableTensorShape slice(Size start, Size end) const
Slice the shape, semantically the same as ArrayRef::slice, but traceable.
Definition types.cxx:105