mirror of
https://github.com/augustin64/projet-tipe
synced 2025-01-23 15:16:26 +01:00
common/utils: change function return type (int
-> bool
)
This commit is contained in:
parent
a7df405d08
commit
772b3511cf
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user