forked from dschoerk/GPU_Arch_SS19
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstreaming_min_max_algorithms.cpp
More file actions
30 lines (27 loc) · 1.28 KB
/
Copy pathstreaming_min_max_algorithms.cpp
File metadata and controls
30 lines (27 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "streaming_min_max_algorithms.h"
#include "streaming_min_max_lemire.h"
#include "streaming_min_max_cuda_plain_malloc.h"
#include "streaming_min_max_cuda_plain_tiled.h"
#include "streaming_min_max_cuda_plain_page_locked.h"
#include "streaming_min_max_cuda_plain_page_locked_shared.h"
#include "streaming_min_max_thrust.h"
#include "streaming_min_max_thrust_naive.h"
#include "streaming_min_max_cuda_streams.h"
// ugly hack workaround because C++17 does not allow for brace initialization
// of containers containing non-copyable types - pfffff
static std::unique_ptr<streaming_min_max_algorithm_interface> algorithms_array[]
{
std::make_unique<streaming_min_max_lemire>(),
std::make_unique<streaming_min_max_cuda_plain_malloc>(),
std::make_unique<streaming_min_max_cuda_plain_page_locked>(),
std::make_unique<streaming_min_max_cuda_plain_page_locked_shared>(),
std::make_unique<streaming_min_max_thrust_naive>(),
std::make_unique<streaming_min_max_thrust>(),
std::make_unique<streaming_min_max_cuda_plain_tiled>()
//std::make_unique<streaming_min_max_cuda_streams>()
};
std::vector<std::unique_ptr<streaming_min_max_algorithm_interface> > algorithms
{
std::make_move_iterator(std::begin(algorithms_array)),
std::make_move_iterator(std::end(algorithms_array))
};