Explorar el 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 hace 12 años
padre
commit
afc87d52c1
Se han modificado 1 ficheros con 2 adiciones y 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.  */