indices[r].reserve(sz);
sz = 1;
allDense = false;
- // Prepare the pointer structure. We cannot use `addPointer`
+ // Prepare the pointer structure. We cannot use `appendPointer`
// here, because `isCompressedDim` won't work until after this
// preparation has been done.
pointers[r].push_back(0);
/// Appends the next free position of `indices[d]` to `pointers[d]`.
/// Thus, when called after inserting the last element of a segment,
/// it will append the position where the next segment begins.
- inline void addPointer(uint64_t d) {
+ inline void appendPointer(uint64_t d) {
assert(isCompressedDim(d)); // Entails `d < getRank()`.
uint64_t p = indices[d].size();
assert(p <= std::numeric_limits<P>::max() &&
}
/// Appends the given index to `indices[d]`.
- inline void addIndex(uint64_t d, uint64_t i) {
+ inline void appendIndex(uint64_t d, uint64_t i) {
assert(isCompressedDim(d)); // Entails `d < getRank()`.
assert(i <= std::numeric_limits<I>::max() &&
"Index value is too large for the I-type");
seg++;
// Handle segment in interval for sparse or dense dimension.
if (isCompressedDim(d)) {
- addIndex(d, i);
+ appendIndex(d, i);
} else {
// For dense storage we must fill in all the zero values between
// the previous element (when last we ran this for-loop) and the
}
// Finalize the sparse pointer structure at this dimension.
if (isCompressedDim(d)) {
- addPointer(d);
+ appendPointer(d);
} else {
// For dense storage we must fill in all the zero values after
// the last element.
if (d == getRank()) {
values.push_back(0);
} else if (isCompressedDim(d)) {
- addPointer(d);
+ appendPointer(d);
} else {
for (uint64_t full = 0, sz = sizes[d]; full < sz; full++)
endDim(d + 1);
for (uint64_t i = 0; i < rank - diff; i++) {
uint64_t d = rank - i - 1;
if (isCompressedDim(d)) {
- addPointer(d);
+ appendPointer(d);
} else {
for (uint64_t full = idx[d] + 1, sz = sizes[d]; full < sz; full++)
endDim(d + 1);
for (uint64_t d = diff; d < rank; d++) {
uint64_t i = cursor[d];
if (isCompressedDim(d)) {
- addIndex(d, i);
+ appendIndex(d, i);
} else {
for (uint64_t full = top; full < i; full++)
endDim(d + 1);