tatami
C++ API for different matrix representations
Loading...
Searching...
No Matches
parallelize.hpp
Go to the documentation of this file.
1#ifndef TATAMI_PARALLELIZE_HPP
2#define TATAMI_PARALLELIZE_HPP
3
4#include <vector>
5#include <cmath>
6
7#ifndef TATAMI_CUSTOM_PARALLEL
8#include "subpar/subpar.hpp"
9#endif
10
17namespace tatami {
18
41template<bool parallel_ = true, class Function_, typename Index_>
43 if constexpr(parallel_) {
44#ifdef TATAMI_CUSTOM_PARALLEL
46#else
48#endif
49 } else {
50 fun(0, 0, tasks);
51 }
52}
53
54}
55
56#endif
void parallelize_range(int num_workers, Task_ num_tasks, Run_ run_task_range)
Flexible representations for matrix data.
Definition Extractor.hpp:15
void parallelize(Function_ fun, Index_ tasks, int threads)
Definition parallelize.hpp:42
auto consecutive_extractor(const Matrix< Value_, Index_ > *mat, bool row, Index_ iter_start, Index_ iter_length, Args_ &&... args)
Definition consecutive_extractor.hpp:35