| make_m2_cpp_parallel | R Documentation |
This version minimizes memory usage by:
Building CSC format directly (no triplet intermediate)
Using O(n_groups) workspace per column instead of dense group_sums matrix
Two-pass algorithm: count then fill
make_m2_cpp_parallel(M1, group_ids, n_threads = 1L)
M1 |
Sparse matrix (dgCMatrix) of inclusion counts (events x cells) |
group_ids |
Integer vector of group IDs for each event |
n_threads |
Number of threads for OpenMP (default 1) |
Memory usage: O(nnz_output) + O(n_groups) workspace vs previous: O(n_groups * n_cells) + O(6 * nnz_output)
Sparse matrix M2 with same dimensions as M1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.