-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfig.h
More file actions
60 lines (50 loc) · 1.36 KB
/
Config.h
File metadata and controls
60 lines (50 loc) · 1.36 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef PATTERNMATCHING_CONFIG_H
#define PATTERNMATCHING_CONFIG_H
#include <vector>
namespace Config {
// Thread da testare
inline std::vector<int> getThreadCounts() {
return {1, 2, 4,8};
}
inline std::vector<size_t> getChunkSizes() {
return {16, 64, 256, 1024, 4096};
}
// Strategie di scheduling
enum class ScheduleType {
STATIC,
STATIC_CHUNKED,
DYNAMIC,
GUIDED,
AUTO
};
inline std::vector<int> getChunkSizesForScheduling() {
return {16, 64, 256, 1024, 4096};
}
inline std::vector<ScheduleType> getSchedulingStrategies() {
return {
ScheduleType::STATIC,
ScheduleType::STATIC_CHUNKED,
ScheduleType::DYNAMIC,
ScheduleType::GUIDED,
ScheduleType::AUTO
};
}
enum class DistanceType {
SAD_BASIC,
SAD_EARLY_TERMINATION,
SAD_SIMD
};
inline std::vector<DistanceType> getDistanceTypes() {
return {
DistanceType::SAD_BASIC,
DistanceType::SAD_EARLY_TERMINATION,
DistanceType::SAD_SIMD
};
}
// Configurazione benchmark
constexpr int NUM_WARMUP_RUNS = 2;
constexpr int NUM_MEASUREMENT_RUNS = 10;
// Prevenzione false sharing
constexpr size_t CACHE_LINE_SIZE = 64;
}
#endif //PATTERNMATCHING_CONFIG_H