#include #include #include #include #include #include CCTK_FCALL void CCTK_FNAME(TestFortranCrayPointers_sub)(uintptr_t const* restrict pointers, int const* restrict n); void TestFortranCrayPointers_main(CCTK_ARGUMENTS) { /* Set the array size */ int const n = 10; /* Allocate memory */ CCTK_REAL* restrict const a = malloc(n * n * sizeof *a); CCTK_REAL* restrict const b = malloc(n * n * sizeof *b); CCTK_REAL* restrict const c = malloc(n * n * sizeof *c); /* Initialise the arrays */ for (ptrdiff_t i=0; i