Explorar o código

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 %!s(int64=12) %!d(string=hai) anos
pai
achega
afc87d52c1
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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.  */