| 45 | |
| 46 | struct SubscriptArg { |
| 47 | void Init(const OpSpec &spec, const std::string &name) { |
| 48 | this->name = name; |
| 49 | src = spec.HasTensorArgument(name) |
| 50 | ? ArgSource::Input |
| 51 | : spec.HasArgument(name) |
| 52 | ? ArgSource::Value |
| 53 | : ArgSource::None; |
| 54 | if (src == ArgSource::Value) |
| 55 | scalar_value = spec.GetArgument<int64_t>(name); |
| 56 | } |
| 57 | |
| 58 | bool IsDefined() const { |
| 59 | return src != ArgSource::None; |
no test coverage detected