From c6d4e10b09319d48a5ef28dfa524192b077fe2c4 Mon Sep 17 00:00:00 2001 From: "enzo.decarvalhobittencourt" <ezdecarvalho@gmail.com> Date: Fri, 22 Dec 2023 12:46:44 +0100 Subject: [PATCH] fixed stupid bug + fixed some typos --- Projet/CODE/apm/src/apm_gpu.cu | 2 +- Projet/CODE/apm/src/apm_omp.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Projet/CODE/apm/src/apm_gpu.cu b/Projet/CODE/apm/src/apm_gpu.cu index 85d58e5..da72bab 100644 --- a/Projet/CODE/apm/src/apm_gpu.cu +++ b/Projet/CODE/apm/src/apm_gpu.cu @@ -94,7 +94,7 @@ levenshtein_cu(char *find, char *buf, int len, int n_bytes, { int tId = blockIdx.x * blockDim.x + threadIdx.x;//global thread id - if (tId >= n_bytes - len) + if (tId > n_bytes - len) { return; //we are past the buffer length - do not process } diff --git a/Projet/CODE/apm/src/apm_omp.c b/Projet/CODE/apm/src/apm_omp.c index 0893108..cac8370 100644 --- a/Projet/CODE/apm/src/apm_omp.c +++ b/Projet/CODE/apm/src/apm_omp.c @@ -75,7 +75,7 @@ open_input_file(struct openfile *file, char *filename) int read_input_file(struct openfile *file, size_t recovering) { - // how mutch do we realy go back + // how much do we really go back size_t go_back = MIN(file->buf_start, recovering); // we read the min between the max size of the buffer @@ -100,7 +100,7 @@ void close_input_file(struct openfile *file) { int res = close(file->fd); - __checkErrors(res < 0, "Faile to close file descriptor (%d)\n.", file->fd); + __checkErrors(res < 0, "Failed to close file descriptor (%d)\n.", file->fd); free(file->buf); } -- GitLab