/* mat-opt-prefetch.c * * Matrix multiplication with remote data prefetching to local data, * and with or without local-shared pointers casting (according to * OPT_PTRCAST). */ elem_t blocal[P][M]; #define STRUCTSIZE 6 typedef struct { elem_t a[STRUCTSIZE]; } cpstruct; int main() { int i,j,l; elem_t sum; #ifdef OPT_PTRCAST elem_t *pa, *pc; #endif double time0, time1; #ifdef DEBUG if(!MYTHREAD) { fprintf(stderr, "threadof(&a)=%i\n", upc_threadof(&a)); for(i=0; i