ViolaJones/cpp/config.hpp
2024-03-21 00:50:13 +01:00

47 lines
1.5 KiB
C++

#pragma once
#include <array>
#define DATA_DIR "../data"
#define OUT_DIR "./out"
#define MODEL_DIR "./models"
#ifdef __CUDACC__
#define NB_THREADS 1024
#define NB_THREADS_2D_X 32
#define NB_THREADS_2D_Y 32
#define NB_THREADS_3D_X 16
#define NB_THREADS_3D_Y 16
#define NB_THREADS_3D_Z 4
#define M static_cast<size_t>(log2f(NB_THREADS_2D_Y))
#endif
// Save state to avoid recalculation on restart
#define SAVE_STATE true
// Redo the state even if it's already saved
#define FORCE_REDO false
// Use GPU to greatly accelerate runtime
#define 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
// [[maybe_unused]] constexpr const std::array TS{ 1 };
// [[maybe_unused]] constexpr const std::array TS{ 1, 5, 10 };
[[maybe_unused]] constexpr const std::array TS{ 1, 5, 10, 25, 50 };
// [[maybe_unused]] constexpr const std::array TS{ 1, 5, 10, 25, 50, 100, 200, 300 };
// [[maybe_unused]] constexpr const std::array TS{ 1, 5, 10, 25, 50, 100, 200, 300, 400, 500, 1000 };
// Enable verbose output (for debugging purposes)
#define __DEBUG false
// Debugging options
#if __DEBUG
#define IDX_INSPECT 4548
#define IDX_INSPECT_OFFSET 100
#endif