3 #include <ATen/core/ivalue.h> 4 #include <torch/csrc/jit/constants.h> 5 #include <torch/csrc/jit/source_range.h> 6 #include <torch/csrc/utils/variadic.h> 15 : loc_(loc), name_(name), value_(value) {}
20 : name_(name), value_(value) {}
23 : value_(
nullptr), ivalue_(std::move(value)) {}
26 : name_(name), ivalue_(std::move(value)) {}
30 typename = enable_if_t<
31 (!std::is_same<decay_t<T>,
NamedValue>::value &&
32 !std::is_same<decay_t<T>,
Value*>::value &&
33 !std::is_same<decay_t<T>,
IValue>::value)>>
38 typename = enable_if_t<
39 (!std::is_same<decay_t<T>,
Value*>::value &&
40 !std::is_same<decay_t<T>,
IValue>::value)>>
46 return backup_location;
54 return insertConstant(
59 const std::string& name()
const {
72 Value* value_{
nullptr};