| 208 | } |
| 209 | |
| 210 | argument argument::element(std::size_t i) const |
| 211 | { |
| 212 | assert(this->get_shape().sub_shapes().empty()); |
| 213 | auto idx = this->get_shape().index(i); |
| 214 | auto offset = this->get_shape().type_size() * idx; |
| 215 | return argument{shape{this->get_shape().type()}, this->data() + offset}; |
| 216 | } |
| 217 | |
| 218 | void save_argument(const argument& a, const std::string& filename) |
| 219 | { |