Moved DEBUG option to config files

This commit is contained in:
saundersp
2023-07-14 23:57:58 +02:00
parent e6194ac485
commit 399024da7a
12 changed files with 280 additions and 268 deletions

View File

@ -2,16 +2,7 @@
#include "data.hpp"
#include "toolbox.hpp"
#include "ViolaJones.hpp"
#define NB_THREADS 1024
#define NB_THREADS_2D_X 32
#define NB_THREADS_2D_Y 32
__device__ constexpr const size_t M = 5; //log2(NB_THREADS_2D_Y));
#define NB_THREADS_3D_X 16
#define NB_THREADS_3D_Y 16
#define NB_THREADS_3D_Z 4
#include "config.hpp"
static __global__ void __test_working_kernel__(const np::Array<size_t> d_x, np::Array<size_t> d_y, const size_t length) {
const size_t i = blockIdx.x * blockDim.x + threadIdx.x;
@ -22,7 +13,7 @@ static __global__ void __test_working_kernel__(const np::Array<size_t> d_x, np::
void test_working(const size_t& length) noexcept {
const size_t size = length * sizeof(size_t);
#ifdef __DEBUG
#if __DEBUG
print("Estimating memory footprint at : " + format_byte_size(2 * size));
#endif
@ -64,7 +55,7 @@ void test_working_2d(const size_t& N1, const size_t& N2) noexcept {
const size_t length = N1 * N2;
const size_t size = length * sizeof(size_t);
#ifdef __DEBUG
#if __DEBUG
print("Estimating memory footprint at : " + format_byte_size(2 * size));
#endif
@ -107,7 +98,7 @@ void test_working_3d(const size_t& N1, const size_t& N2, const size_t& N3) noexc
const size_t length = N1 * N2 * N3;
const size_t size = length * sizeof(size_t);
#ifdef __DEBUG
#if __DEBUG
print("Estimating memory footprint at : " + format_byte_size(2 * size));
#endif