1
Fork 0
mirror of https://github.com/Steffo99/unimore-hpc-assignments.git synced 2024-11-26 10:04:23 +00:00

Create workaround for unavailable M_PI

This commit is contained in:
Steffo 2022-11-11 16:42:39 +00:00 committed by GitHub
parent e11b42a518
commit 5bbe60d482
Signed by: github
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,6 +10,13 @@
/* Default data type is double, default size is 4000. */ /* Default data type is double, default size is 4000. */
#include "atax.h" #include "atax.h"
// Workaround for the editor not finding M_PI
// It is exclusive to the GNU C compiler
// https://www.gnu.org/software/libc/manual/html_node/Mathematical-Constants.html
#ifndef M_PI
#define M_PI 3.141
#endif
/* Array initialization. */ /* Array initialization. */
static void init_array(int nx, int ny, static void init_array(int nx, int ny,
DATA_TYPE POLYBENCH_2D(A, NX, NY, nx, ny), DATA_TYPE POLYBENCH_2D(A, NX, NY, nx, ny),