common/utils: change function return type (int -> bool)

This commit is contained in:
augustin64 2023-05-14 18:15:28 +02:00
parent a7df405d08
commit 772b3511cf
3 changed files with 7 additions and 4 deletions

View File

@ -1,5 +1,6 @@
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
#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

View File

@ -1,3 +1,4 @@
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
#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);
}

View File

@ -1,3 +1,4 @@
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
#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);
}