kmeans
A C++ library for k-means
Loading...
Searching...
No Matches
kmeans
parallelize.hpp
Go to the documentation of this file.
1
#ifndef KMEANS_PARALLELIZE_HPP
2
#define KMEANS_PARALLELIZE_HPP
3
9
#ifndef KMEANS_CUSTOM_PARALLEL
10
#include "
subpar/subpar.hpp
"
11
#endif
12
13
namespace
kmeans
{
14
27
template
<
typename
Task_,
class
Run_>
28
void
parallelize
(
int
num_workers
,
Task_
num_tasks
,
Run_
run_task_range
) {
29
#ifndef KMEANS_CUSTOM_PARALLEL
30
// Do NOT make this no-throw as we don't know whether Matrix_::get_observation() might throw.
31
subpar::parallelize(
num_workers
,
num_tasks
, std::move(
run_task_range
));
32
#else
33
KMEANS_CUSTOM_PARALLEL
(
num_workers
,
num_tasks
,
run_task_range
);
34
#endif
35
}
36
37
}
38
39
#endif
kmeans::InitializeVariancePartition
Implements the variance partitioning method of Su and Dy (2007).
Definition
InitializeVariancePartition.hpp:164
kmeans
Namespace for k-means clustering.
Definition
compute_wcss.hpp:12
kmeans::parallelize
void parallelize(int num_workers, Task_ num_tasks, Run_ run_task_range)
Definition
parallelize.hpp:28
subpar.hpp
Generated by
1.9.8