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.
run_taskFunction to execute each task for each worker.

By default, this is an alias to subpar::parallelize_simple(). Its purpose is to enable irlba-specific customization to the parallelization scheme without affecting other libraries that use subpar. If the IRLBA_CUSTOM_PARALLEL macro is defined, it will be used instead of subpar::parallelize_simple() whenever parallelize() is called. Any user-defined macro should follow the same requirements as the SUBPAR_CUSTOM_PARALLELIZE_SIMPLE override for subpar::parallelize_simple().