| 45 | |
| 46 | template <typename H> |
| 47 | void set(const H& h) { |
| 48 | if (!(*this) || h.dim() != ptr_t::get()->state.dim) { |
| 49 | ptr_t::reset(new block_t[h.dim() + 1]); |
| 50 | ptr_t::get()->state.dim = h.dim(); |
| 51 | ptr_t::get()->state.idx = 0; |
| 52 | } |
| 53 | h.for_each_axis(dim_visitor{1, ptr_t::get() + 1}); |
| 54 | } |
| 55 | |
| 56 | void set_idx(std::size_t idx) { |
| 57 | auto& s = ptr_t::get()->state; |
no test coverage detected