24#ifndef MORPHEUS_OPENMP_UTILS_HPP
25#define MORPHEUS_OPENMP_UTILS_HPP
27#include <Morpheus_Macros.hpp>
28#if defined(MORPHEUS_ENABLE_OPENMP)
36T _split_work(
const T load,
const T workers,
const T worker_id) {
37 const T unifload = load / workers;
38 const T rem = load - unifload * workers;
42 if (worker_id <= rem) {
43 bound = (unifload + 1) * worker_id;
45 bound = (unifload + 1) * rem + unifload * (worker_id - rem);
52void atomic_add(T* out, T val) {
57template <
typename T =
int>
61 { t = omp_get_num_threads(); }
Generic Morpheus interfaces.
Definition: dummy.cpp:24