47 lines
1.5 KiB
C++
47 lines
1.5 KiB
C++
#pragma once
|
|
#include <array>
|
|
|
|
#define DATA_DIR "../data"
|
|
#define OUT_DIR "./out"
|
|
#define MODEL_DIR "./models"
|
|
|
|
#ifdef __CUDACC__
|
|
constexpr size_t NB_THREADS = 1024;
|
|
constexpr size_t NB_THREADS_2D_X = 32;
|
|
constexpr size_t NB_THREADS_2D_Y = 32;
|
|
constexpr size_t NB_THREADS_3D_X = 16;
|
|
constexpr size_t NB_THREADS_3D_Y = 16;
|
|
constexpr size_t NB_THREADS_3D_Z = 4;
|
|
#define M static_cast<size_t>(log2f(NB_THREADS_2D_Y))
|
|
#endif
|
|
|
|
// Save state to avoid recalculation on restart
|
|
constexpr bool SAVE_STATE = true;
|
|
// Redo the state even if it's already saved
|
|
constexpr bool FORCE_REDO = false;
|
|
|
|
// Use GPU to greatly accelerate runtime
|
|
constexpr bool GPU_BOOSTED = true;
|
|
// Depending on what you set, the output label will be as follow :
|
|
// ┌─────────────┬───────┐
|
|
// │ GPU_BOOSTED │ LABEL │
|
|
// ├─────────────┼───────┤
|
|
// │ true │ GPU │
|
|
// │ false │ CPU │
|
|
// └─────────────┴───────┘
|
|
|
|
// Number of weak classifiers
|
|
// constexpr std::array TS{ 1 };
|
|
// constexpr std::array TS{ 1, 5, 10 };
|
|
constexpr std::array TS{ 1, 5, 10, 25, 50 };
|
|
// constexpr std::array TS{ 1, 5, 10, 25, 50, 100, 200, 300 };
|
|
// constexpr std::array TS{ 1, 5, 10, 25, 50, 100, 200, 300, 400, 500, 1000 };
|
|
|
|
// Enable verbose output (for debugging purposes)
|
|
constexpr bool __DEBUG = false;
|
|
// Debugging options
|
|
#if __DEBUG
|
|
constexpr size_t IDX_INSPECT = 4548;
|
|
constexpr size_t IDX_INSPECT_OFFSET = 100;
|
|
#endif
|