Skip to content

Commit

Permalink
Comment on the possibility of pretending the chunk length of 1.
Browse files Browse the repository at this point in the history
  • Loading branch information
LTLA committed Sep 26, 2024
1 parent 0bb4397 commit d8bb9c3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/tatami_hdf5/DenseMatrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,13 @@ class OracularCoreTransposed {
}
};

// COMMENT: technically, for all oracular extractors, we could pretend that the chunk length on the target dimension is 1.
// This would allow us to only extract the desired indices on each call, allowing for more efficient use of the cache.
// (In the transposed case, we would also reduce the amount of transposition that we need to perform.)
// The problem is that we would get harshly penalized for any chunk reuse outside of the current prediction cycle,
// where the chunk would need to be read from disk again if the exact elements weren't already in the cache.
// This access pattern might not be uncommon after applying a DelayedSubset with shuffled rows/columns.

template<bool solo_, bool oracle_, bool by_h5_row_, typename Index_, typename CachedValue_>
using DenseCore = typename std::conditional<solo_,
SoloCore<oracle_, by_h5_row_, Index_>,
Expand Down

0 comments on commit d8bb9c3

Please sign in to comment.