Parcourir la 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 il y a 12 ans
Parent
commit
afc87d52c1
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  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.  */