Skip to content

Commit

Permalink
get_chunk_length is now a free function accepting a ChunkDimensionStats.
Browse files Browse the repository at this point in the history
  • Loading branch information
LTLA committed May 18, 2024
1 parent 9f6c5bc commit c925074
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions include/tatami_hdf5/DenseMatrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ struct MyopicBase : public Base {
return factory.create();
},
/* populate = */ [&](Index_ id, Slab& contents) -> void {
auto curdim = dim_stats.get_chunk_length(id);
auto curdim = tatami_chunked::get_chunk_length(dim_stats, id);
auto output = [&](){
if constexpr(!by_h5_row_) {
return transposition_buffer.data();
Expand Down Expand Up @@ -318,7 +318,7 @@ struct OracularBase : public Base {

serialize([&]() -> void {
for (const auto& c : chunks) {
auto curdim = dim_stats.get_chunk_length(c.first);
auto curdim = tatami_chunked::get_chunk_length(dim_stats, c.first);
extract(c.first * dim_stats.chunk_length, curdim, c.second->data);
if constexpr(!by_h5_row_) {
cache_transpose_info.emplace_back(c.second, curdim);
Expand Down
2 changes: 1 addition & 1 deletion include/tatami_hdf5/sparse_secondary.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class MyopicSecondaryBase : public SecondaryBase {
Index_ chunk_offset = i % sec_dim_stats.chunk_length;

if (chunk_id != last_chunk_id || first) {
Index_ clen = sec_dim_stats.get_chunk_length(chunk_id);
Index_ clen = tatami_chunked::get_chunk_length(sec_dim_stats, chunk_id);
std::fill_n(cache_count.begin(), clen, 0);

serialize([&]() {
Expand Down

0 comments on commit c925074

Please sign in to comment.