Library to implement schemes on n-dimensionnal manifolds.
Namespaces | Functions
parallel_for.hpp File Reference

Helper to parallelize operations using pthreads. More...

#include <thread>
#include <forward_list>
#include <Eigen/Sparse>
Include dependency graph for parallel_for.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.




static std::pair< std::vector< int >, std::vector< int > > Manicore::distributeLoad (size_t nb_elements, unsigned nb_threads)
 Function to distribute elements (considered as jobs) over threads. It returns a pair of vectors indicating the start and end element of each thread. More...
static void Manicore::parallel_for (unsigned nb_elements, std::function< void(size_t start, size_t end)> functor, bool use_threads=true)
 Generic function to execute threaded processes. More...
template<typename FType >
Eigen::SparseMatrix< double > Manicore::parallel_assembly (size_t nb_elements, std::pair< size_t, size_t > systemSize, FType localAssembly, bool use_threads=true)
 Function to assemble a global sparse matrix from a procedure that compute local contributions. More...

Detailed Description

Helper to parallelize operations using pthreads.