diff --git a/src/common/include/utils.h b/src/common/include/utils.h index 585e6c3..0e4603f 100644 --- a/src/common/include/utils.h +++ b/src/common/include/utils.h @@ -1,5 +1,6 @@ -#include #include +#include +#include #ifdef USE_CUDA #ifndef __CUDACC__ @@ -47,7 +48,7 @@ __host__ __device__ * lower_bound <= x < upper_bound * lower_bound <= y < upper_bound */ -int not_outside(int x, int y, int lower_bound, int upper_bound); +bool not_outside(int x, int y, int lower_bound, int upper_bound); /* * Partie entière supérieure de a/b diff --git a/src/common/utils.c b/src/common/utils.c index da2c7f8..93b1671 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -1,3 +1,4 @@ +#include #include #include #ifdef USE_CUDA @@ -30,7 +31,7 @@ int max(int a, int b) { #ifdef __CUDACC__ __host__ __device__ #endif -int not_outside(int x, int y, int lower_bound, int upper_bound) { +bool not_outside(int x, int y, int lower_bound, int upper_bound) { return !(x < lower_bound || y < lower_bound || x >= upper_bound || y>= upper_bound); } diff --git a/src/common/utils.cu b/src/common/utils.cu index da2c7f8..93b1671 100644 --- a/src/common/utils.cu +++ b/src/common/utils.cu @@ -1,3 +1,4 @@ +#include #include #include #ifdef USE_CUDA @@ -30,7 +31,7 @@ int max(int a, int b) { #ifdef __CUDACC__ __host__ __device__ #endif -int not_outside(int x, int y, int lower_bound, int upper_bound) { +bool not_outside(int x, int y, int lower_bound, int upper_bound) { return !(x < lower_bound || y < lower_bound || x >= upper_bound || y>= upper_bound); }