Skip to content

Commit

Permalink
Started cleaning up the subset pointers.
Browse files Browse the repository at this point in the history
  • Loading branch information
LTLA committed Apr 7, 2024
1 parent 0534572 commit e44b927
Show file tree
Hide file tree
Showing 2 changed files with 155 additions and 230 deletions.
9 changes: 4 additions & 5 deletions include/tatami_chunked/OracleSlabCache.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ class OracleSlabCache {
future_cache[a] = cIt->second;
++cIt;
}
to_reassign.clear();

populate(to_populate);
to_populate.clear();

// We always fill future_cache to the brim so every entry of
// all_slabs should be referenced by a pointer in future_cache.
Expand All @@ -145,12 +149,7 @@ class OracleSlabCache {
// worrying about leaking memory. The only exception is if we're at
// the end of the predictions, in which case it doesn't matter.
current_cache.clear();
to_reassign.clear();

populate(to_populate);

current_cache.swap(future_cache);
to_populate.clear();
}

// We know it must exist, so no need to check ccIt's validity.
Expand Down
Loading

0 comments on commit e44b927

Please sign in to comment.