add prefetching for the sequentiel laplace

This commit is contained in:
Stefan Lankes 2011-10-22 06:13:16 -07:00
parent e54b0e132b
commit 97a648020a

View file

@ -219,6 +219,12 @@ int laplace(void *arg)
for (i = 1; i < n + 1; i++) {
// over all rows
for (j = 1; j < m + 1; j++) {
#if !USE_SVM
if (j % CACHE_LINE == 1) {
asm volatile ("movl %0, %%eax" :: "r"(&(NewValues[I + i][J + j])) : "%eax");
}
#endif
#if 1
NewValues[I + i][J + j] =
(OldValues[I + i - 1][J + j] +
@ -241,8 +247,8 @@ int laplace(void *arg)
NewValues = OldValues;
OldValues = tmp;
//RCCE_TNS_barrier(&RCCE_COMM_WORLD);
RCCE_barrier(&RCCE_COMM_WORLD);
RCCE_TNS_barrier(&RCCE_COMM_WORLD);
//RCCE_barrier(&RCCE_COMM_WORLD);
#ifdef _USE_GFX
if ((my_rank == 0) && (t % 50 == 0)) {