umappp
A C++ library for UMAP
Loading...
Searching...
No Matches
parallelize.hpp
Go to the documentation of this file.
1#ifndef UMAPPP_PARALLELIZE_HPP
2#define UMAPPP_PARALLELIZE_HPP
3
9#ifndef UMAPPP_CUSTOM_PARALLEL
10#include "subpar/subpar.hpp"
11#endif
12
13namespace umappp {
14
34template<typename Task_, class Run_>
35int parallelize(const int num_workers, const Task_ num_tasks, Run_ run_task_range) {
36#ifndef UMAPPP_CUSTOM_PARALLEL
37 // Don't make this nothrow_ = true, there's too many allocations and the
38 // derived methods for the nearest neighbors search could do anything...
39 return subpar::parallelize_range(num_workers, num_tasks, std::move(run_task_range));
40#else
41 return UMAPPP_CUSTOM_PARALLEL(num_workers, num_tasks, run_task_range);
42#endif
43}
44
45}
46
47#endif
48
int parallelize_range(int num_workers, const Task_ num_tasks, const Run_ run_task_range)
Functions for creating UMAP embeddings.
Definition initialize.hpp:22
int parallelize(const int num_workers, const Task_ num_tasks, Run_ run_task_range)
Definition parallelize.hpp:35