| 111 | |
| 112 | template <class Index> |
| 113 | CUTE_HOST_DEVICE constexpr |
| 114 | sparse_ptr operator+(Index const& i) const { |
| 115 | // Only allow offset by multiples of the sparsity factor, |
| 116 | // else the misalignments become a bug. E.g. (sparse_ptr<8,I>{} + 7) + 7 |
| 117 | // Motivation for subsparse_iterator or generalization of subbyte_iterator? |
| 118 | assert(i % Sparsity == 0); |
| 119 | return {this->get() + i / Sparsity}; |
| 120 | } |
| 121 | |
| 122 | template <class Index> |
| 123 | CUTE_HOST_DEVICE constexpr |