From a6cc487e7450546770e1410d73432ad8e7c770f0 Mon Sep 17 00:00:00 2001 From: Antoni Navarro Date: Wed, 26 Feb 2020 16:11:00 +0100 Subject: [PATCH 1/2] Fix wrong comments --- 02-beginners/dot-product/.config/dot-product.c | 2 +- 02-beginners/dot-product/dot-product.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/02-beginners/dot-product/.config/dot-product.c b/02-beginners/dot-product/.config/dot-product.c index 30e0388..8bff97b 100644 --- a/02-beginners/dot-product/.config/dot-product.c +++ b/02-beginners/dot-product/.config/dot-product.c @@ -38,7 +38,7 @@ double dot_product (long N, long CHUNK_SIZE, double A[N], double B[N]) C[j]+= A[i+ii] * B[i+ii]; } - // OMPSS: This task depends on an single element of C and will resultumulate the result on result. + // OMPSS: This task depends on an single element of C and will accumulate the results on 'result'. #pragma omp task label( increment ) firstprivate( j ) in( C[j;1] ) commutative( result ) result += C[j]; diff --git a/02-beginners/dot-product/dot-product.c b/02-beginners/dot-product/dot-product.c index 38dc761..1817944 100644 --- a/02-beginners/dot-product/dot-product.c +++ b/02-beginners/dot-product/dot-product.c @@ -38,7 +38,7 @@ double dot_product (long N, long CHUNK_SIZE, double A[N], double B[N]) C[j]+= A[i+ii] * B[i+ii]; } - // OMPSS: This task depends on an single element of C and will accumulate it on result. + // OMPSS: This task depends on an single element of C and will accumulate the results on 'result'. #pragma omp task label( increment ) firstprivate( j ) result += C[j]; -- GitLab From d8a02bbac4c2af8eb2851ddda10e9fa33a3ae1ac Mon Sep 17 00:00:00 2001 From: Antoni Navarro Date: Wed, 26 Feb 2020 16:29:02 +0100 Subject: [PATCH 2/2] Remove unused headers from solution folders --- .../cholesky-cuda/.config/cuda_potrf.h | 22 ------------------- 03-gpu-devices/nbody-cuda/.config/nbody.h | 18 --------------- 2 files changed, 40 deletions(-) delete mode 100644 03-gpu-devices/cholesky-cuda/.config/cuda_potrf.h delete mode 100644 03-gpu-devices/nbody-cuda/.config/nbody.h diff --git a/03-gpu-devices/cholesky-cuda/.config/cuda_potrf.h b/03-gpu-devices/cholesky-cuda/.config/cuda_potrf.h deleted file mode 100644 index 3c81fd2..0000000 --- a/03-gpu-devices/cholesky-cuda/.config/cuda_potrf.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef _CUDA_POTRF_H_ -#define _CUDA_POTRF_H_ - -#include - -#ifdef __cplusplus -extern "C"{ -#endif - -int -cuda_dpotrf(cublasHandle_t handle, char uplo, int n, - double *dA, int ldda, int *info); - -int -cuda_spotrf(cublasHandle_t handle, char uplo, int n, - float *dA, int ldda, int *info); - -#ifdef __cplusplus -} -#endif - -#endif // _CUDA_POTRF_H_ \ No newline at end of file diff --git a/03-gpu-devices/nbody-cuda/.config/nbody.h b/03-gpu-devices/nbody-cuda/.config/nbody.h deleted file mode 100644 index fad95af..0000000 --- a/03-gpu-devices/nbody-cuda/.config/nbody.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef nbody_h -#define nbody_h - -#define gravitational_constant 6.6726e-11 /* N(m/kg)2 */ - -typedef struct { - float position_x; /* m */ - float position_y; /* m */ - float position_z; /* m */ - float velocity_x; /* m/s */ - float velocity_y; /* m/s */ - float velocity_z; /* m/s */ - float mass; /* kg */ - float pad; -} Particle; - -#endif /* #ifndef nbody_h */ - -- GitLab