irlba
A C++ library for IRLBA
Loading...
Searching...
No Matches
parallel.hpp File Reference

Classes for parallelized multiplication. More...

#include "utils.hpp"
#include <vector>
#include "Eigen/Dense"
#include "subpar/subpar.hpp"
Include dependency graph for parallel.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  irlba::EigenThreadScope
 Restrict the number of available threads for Eigen. More...
 

Functions

template<typename Task_ , class Run_ >
void irlba::parallelize (Task_ num_tasks, Run_ run_task)
 

Detailed Description

Classes for parallelized multiplication.

Function Documentation

◆ parallelize()

template<typename Task_ , class Run_ >
void irlba::parallelize ( Task_ num_tasks,
Run_ run_task )
Template Parameters
Task_Integer type for the number of tasks.
Run_Function to execute each task.
Parameters
num_tasksNumber of tasks. This is equal to the number of threads in the context of ParallelSparseMatrix.
run_taskFunction to execute each task within its own worker.

By default, this is an alias to subpar::parallelize_simple(). However, if the IRLBA_CUSTOM_PARALLEL function-like macro is defined, it is called instead. Any user-defined macro should accept the same arguments as subpar::parallelize_simple().