| 267 | } |
| 268 | |
| 269 | array eval() const |
| 270 | { |
| 271 | auto volume = std::accumulate(shape_.begin(), shape_.end(), 1L, std::multiplies<int64_t>()); |
| 272 | auto v = icm::vector<T>(volume); |
| 273 | copy_data(base::span_cast<uint8_t>(std::span<T>(v.data(), v.size()))); |
| 274 | return nd::adapt(std::move(v), icm::shape(shape_)); |
| 275 | } |
| 276 | |
| 277 | void copy_data(std::span<uint8_t> buffer) const |
| 278 | { |