Constantin Fürst
11 months ago
4 changed files with 12 additions and 128 deletions
-
2qdp_project/CMakeLists.txt
-
13qdp_project/src/benchmark/MAX_benchmark.cpp
-
21qdp_project/src/benchmark/pipelines/MAX_scan_filter_pipe.h
-
104qdp_project/src/utils/execution_modes.h
@ -1,104 +0,0 @@ |
|||||
#include <string> |
|
||||
|
|
||||
enum PMode{no_copy = 0, hbm = 1, expl_copy = 2}; |
|
||||
struct mode_manager { |
|
||||
static inline PMode inc(PMode value) { |
|
||||
return static_cast<PMode>(value + 1); |
|
||||
}; |
|
||||
static inline bool pred(PMode value) { |
|
||||
return no_copy <= value && value <= expl_copy; |
|
||||
}; |
|
||||
static std::string string(PMode value) { |
|
||||
switch(value) { |
|
||||
case no_copy: return "no_copy"; |
|
||||
case hbm: return "hbm_pre"; |
|
||||
case expl_copy:return "expl_co"; |
|
||||
} return "no_copy"; |
|
||||
}; |
|
||||
}; |
|
||||
|
|
||||
#define SIMPLE_Q 0 |
|
||||
#define COMPLEX_Q 1 |
|
||||
|
|
||||
#define SCAN_A 0 |
|
||||
#define SCAN_B 1 |
|
||||
#define AGGR_J 2 |
|
||||
|
|
||||
enum NewPMode{DRAM_base = 0, HBM_base = 1, Mixed_base = 2, Prefetch = 3}; |
|
||||
struct new_mode_manager { |
|
||||
/*constexpr static int thread_counts[2][4][3] = { |
|
||||
//simple query |
|
||||
//scan_a, scan_b, aggr_j |
|
||||
{{3, 0, 3}, // DRAM_base |
|
||||
{3, 0, 3}, // HBM_base |
|
||||
{3, 0, 3}, // Mixed_base |
|
||||
{1, 4, 1}},// Prefetching |
|
||||
//complex query |
|
||||
{{1, 4, 1}, // DRAM_base |
|
||||
{1, 4, 1}, // HBM_base |
|
||||
{1, 4, 1}, // Mixed_base |
|
||||
{1, 4, 1}},// Prefetching |
|
||||
};*/ |
|
||||
|
|
||||
/*constexpr static int thread_counts[2][4][3] = { |
|
||||
//simple query |
|
||||
//scan_a, scan_b, aggr_j |
|
||||
{{2, 0, 4}, // DRAM_base |
|
||||
{2, 0, 4}, // HBM_base |
|
||||
{2, 0, 4}, // Mixed_base |
|
||||
{1, 4, 1}},// Prefetching |
|
||||
//complex query |
|
||||
{{1, 4, 1}, // DRAM_base |
|
||||
{1, 4, 1}, // HBM_base |
|
||||
{1, 4, 1}, // Mixed_base |
|
||||
{1, 4, 1}},// Prefetching |
|
||||
};*/ |
|
||||
|
|
||||
constexpr static int thread_counts[2][4][3] = { |
|
||||
// thread counts for both simple and complex querry |
|
||||
// inner layout: { scan_a, scan_b, aggr_j } |
|
||||
|
|
||||
//simple query |
|
||||
{ |
|
||||
{4, 0, 2}, // DRAM_base |
|
||||
{4, 0, 2}, // HBM_base |
|
||||
{4, 0, 2}, // Mixed_base |
|
||||
{4, 4, 4} // Prefetching |
|
||||
}, |
|
||||
|
|
||||
//complex query |
|
||||
{ |
|
||||
{1, 4, 1}, // DRAM_base |
|
||||
{1, 4, 1}, // HBM_base |
|
||||
{1, 4, 1}, // Mixed_base |
|
||||
{4, 4, 4} // Prefetching |
|
||||
} |
|
||||
}; |
|
||||
|
|
||||
static inline NewPMode inc(NewPMode value) { |
|
||||
return static_cast<NewPMode>(value + 1); |
|
||||
}; |
|
||||
static inline bool pred(NewPMode value) { |
|
||||
return DRAM_base <= value && value <= Prefetch; |
|
||||
}; |
|
||||
static int thread_count(uint8_t query_type, NewPMode mode, uint8_t thread_type){ |
|
||||
if(query_type > 1) query_type = 1; |
|
||||
if(thread_type > 2) thread_type = 2; |
|
||||
return (thread_counts[query_type][mode][thread_type]); |
|
||||
}; |
|
||||
static std::string string(NewPMode value) { |
|
||||
switch(value) { |
|
||||
case DRAM_base: |
|
||||
return "DRAM_Baseline"; |
|
||||
case HBM_base: |
|
||||
return "HBM_Baseline"; |
|
||||
case Mixed_base: |
|
||||
return "DRAM_HBM_Baseline"; |
|
||||
case Prefetch: |
|
||||
return "Q-d_Prefetching"; |
|
||||
default: |
|
||||
std::cerr << "[x] Unknown Processing Mode" << std::endl; |
|
||||
exit(-1); |
|
||||
} |
|
||||
}; |
|
||||
}; |
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue