Browse Source

gcc-examples/examples/vector_scal: make sure data is copied back to
main memory before accessing it outside StarPU. And give it back to
StarPU once we are done.

Nathalie Furmento 12 years ago
parent
commit
afc87d52c1
1 changed files with 2 additions and 1 deletions
  1. 2 1
      gcc-plugin/examples/vector_scal/vector_scal.c

+ 2 - 1
gcc-plugin/examples/vector_scal/vector_scal.c

@@ -181,8 +181,9 @@ main (void)
     vector_scal (NX, vector, FACTOR);
 
 #pragma starpu wait
-
+#pragma starpu acquire vector
     valid = check (NX, vector, FACTOR);
+#pragma starpu release vector
 
   } /* VECTOR is automatically freed here.  */