| 75 | } |
| 76 | |
| 77 | array eval() const |
| 78 | { |
| 79 | auto volume = std::accumulate(shape_.begin(), shape_.end(), 1L, std::multiplies<int64_t>()); |
| 80 | auto v = icm::vector<T>(volume); |
| 81 | copy_data(base::span_cast<uint8_t>(std::span<T>(v.data(), v.size()))); |
| 82 | return nd::adapt(std::move(v), icm::shape(shape_)); |
| 83 | } |
| 84 | |
| 85 | void copy_data(std::span<uint8_t> buffer) const |
| 86 | { |