SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
parallel.hpp File Reference
#include <exception>
#include <vector>
Include dependency graph for parallel.hpp:
This graph shows which files directly or indirectly include this file:

Namespaces

namespace  mfem
 
namespace  serif
 
namespace  serif::utils
 
namespace  serif::utils::parallel
 
namespace  serif::utils::parallel::detail
 

Typedefs

using serif::utils::parallel::detail::Body = void (*)(void* context, int index, int worker)
 

Functions

int serif::utils::parallel::worker_count () noexcept
 Workers an element loop may use: OpenMP's thread limit (OMP_NUM_THREADS), or 1 without OpenMP or inside an enclosing parallel region.
 
void serif::utils::parallel::detail::run (int count, void *context, Body body)
 Run body for every index; body must not throw. Compiled in libserif so OpenMP never depends on the caller's flags.
 
template<typename BodyT>
void serif::utils::parallel::for_each_index (const int count, BodyT &&body)
 Call body(index, worker) once for every index in [0, count), possibly concurrently.
 
void serif::utils::parallel::element_transformation (const ::mfem::Mesh &mesh, int element, ::mfem::IsoparametricTransformation &transformation)
 Mesh::GetElementTransformation(element, transformation), safe in concurrent element loops.