Skip to content

Commit a510ad3

Browse files
committed
Directly pass the Matrix to consecutive_extractor() call.
This is a more modern way of calling the tatami API.
1 parent 9f362f5 commit a510ad3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/scran_variances/model_gene_variances.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ void compute_variances_dense_row(
220220
auto tmp_vars = sanisizer::create<std::vector<Stat_> >(blocked ? nblocks : 0);
221221

222222
auto buffer = tatami::create_container_of_Index_size<std::vector<Value_> >(NC);
223-
auto ext = tatami::consecutive_extractor<false>(&mat, true, start, length);
223+
auto ext = tatami::consecutive_extractor<false>(mat, true, start, length);
224224
for (Index_ r = start, end = start + length; r < end; ++r) {
225225
auto ptr = ext->fetch(buffer.data());
226226

@@ -270,7 +270,7 @@ void compute_variances_sparse_row(
270270
auto ibuffer = tatami::create_container_of_Index_size<std::vector<Index_> >(NC);
271271
tatami::Options opt;
272272
opt.sparse_ordered_index = false;
273-
auto ext = tatami::consecutive_extractor<true>(&mat, true, start, length, opt);
273+
auto ext = tatami::consecutive_extractor<true>(mat, true, start, length, opt);
274274

275275
for (Index_ r = start, end = start + length; r < end; ++r) {
276276
auto range = ext->fetch(vbuffer.data(), ibuffer.data());
@@ -316,7 +316,7 @@ void compute_variances_dense_column(
316316

317317
tatami::parallelize([&](int thread, Index_ start, Index_ length) -> void {
318318
auto buffer = tatami::create_container_of_Index_size<std::vector<Value_> >(length);
319-
auto ext = tatami::consecutive_extractor<false>(&mat, false, static_cast<Index_>(0), NC, start, length);
319+
auto ext = tatami::consecutive_extractor<false>(mat, false, static_cast<Index_>(0), NC, start, length);
320320

321321
auto get_var = [&](Index_ b) -> Stat_* { return buffers[b].variances; };
322322
tatami_stats::LocalOutputBuffers<Stat_, decltype(get_var)> local_vars(thread, nblocks, start, length, std::move(get_var));
@@ -370,7 +370,7 @@ void compute_variances_sparse_column(
370370
auto ibuffer = tatami::create_container_of_Index_size<std::vector<Index_> >(length);
371371
tatami::Options opt;
372372
opt.sparse_ordered_index = false;
373-
auto ext = tatami::consecutive_extractor<true>(&mat, false, static_cast<Index_>(0), NC, start, length, opt);
373+
auto ext = tatami::consecutive_extractor<true>(mat, false, static_cast<Index_>(0), NC, start, length, opt);
374374

375375
auto get_var = [&](Index_ b) -> Stat_* { return buffers[b].variances; };
376376
tatami_stats::LocalOutputBuffers<Stat_, decltype(get_var)> local_vars(thread, nblocks, start, length, std::move(get_var));

0 commit comments

Comments
 (0)