diff --git a/tests/src/choose_classic_markers.cpp b/tests/src/choose_classic_markers.cpp index 3a78a5d..6a5cef9 100644 --- a/tests/src/choose_classic_markers.cpp +++ b/tests/src/choose_classic_markers.cpp @@ -1,5 +1,4 @@ #include -#include "custom_parallel.h" #include "singlepp/choose_classic_markers.hpp" #include "tatami/tatami.hpp" diff --git a/tests/src/classify_integrated.cpp b/tests/src/classify_integrated.cpp index a18fc03..d945290 100644 --- a/tests/src/classify_integrated.cpp +++ b/tests/src/classify_integrated.cpp @@ -1,5 +1,4 @@ #include -#include "custom_parallel.h" #include "singlepp/classify_integrated.hpp" #include "singlepp/classify_single.hpp" diff --git a/tests/src/classify_single.cpp b/tests/src/classify_single.cpp index be3b9e4..78ceab0 100644 --- a/tests/src/classify_single.cpp +++ b/tests/src/classify_single.cpp @@ -1,5 +1,4 @@ #include -#include "custom_parallel.h" #include "singlepp/classify_single.hpp" #include "tatami/tatami.hpp" diff --git a/tests/src/custom_parallel.h b/tests/src/custom_parallel.h deleted file mode 100644 index 940016a..0000000 --- a/tests/src/custom_parallel.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef CUSTOM_PARALLEL_H -#define CUSTOM_PARALLEL_H -#ifdef TEST_SINGLEPP_CUSTOM_PARALLEL - -#include -#include -#include - -template -void singlepp_parallelize(Function f, size_t n, int nthreads) { - size_t jobs_per_worker = std::ceil(static_cast(n) / nthreads); - size_t start = 0; - std::vector jobs; - jobs.reserve(nthreads); - - for (int w = 0; w < nthreads; ++w) { - size_t end = std::min(n, start + jobs_per_worker); - if (start >= end) { - break; - } - jobs.emplace_back(f, w, start, end - start); - start += jobs_per_worker; - } - - for (auto& job : jobs) { - job.join(); - } -} - -#define SINGLEPP_CUSTOM_PARALLEL singlepp_parallelize -#endif -#endif