From 521a1bb7299238c64afda7057542f8f2f1662e6e Mon Sep 17 00:00:00 2001 From: julienChemillier Date: Sat, 13 May 2023 15:50:01 +0200 Subject: [PATCH] Add definition of 'convolution_not_outside' --- src/cnn/convolution.c | 4 ---- src/cnn/include/convolution.h | 7 +++++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/cnn/convolution.c b/src/cnn/convolution.c index 9459d76..bd1c1ab 100644 --- a/src/cnn/convolution.c +++ b/src/cnn/convolution.c @@ -9,10 +9,6 @@ int convolution_not_outside(int x, int y, int lower_bound, int upper_bound) { - // On renvoie true si et seulement si _ et _: - // lower_bound <= x < upper_bound - // lower_bound <= y < upper_bound - return !(x < lower_bound || y < lower_bound || x >= upper_bound || y>= upper_bound); } diff --git a/src/cnn/include/convolution.h b/src/cnn/include/convolution.h index ebc3ad1..e9d0b0e 100644 --- a/src/cnn/include/convolution.h +++ b/src/cnn/include/convolution.h @@ -1,5 +1,12 @@ #include "struct.h" +/* +On renvoie true si et seulement si _ et _: +lower_bound <= x < upper_bound +lower_bound <= y < upper_bound +*/ +int convolution_not_outside(int x, int y, int lower_bound, int upper_bound); + /* * Effectue la convolution naïvement sur le processeur */