Christoph Pospiech <christoph.pospi...@de.ibm.com> wrote on 09/07/2010
08:16:00 AM:
>
> suppose, we have the following code snippet.
>
> finish ateach (pt in v_src ) {
> /* ... some lines left out ... */
> /**
> * Scatter the vector v
> */
> v_src(pt).copyFrom(j_min(pt),
> v,j_min(pt),j_len(pt));
> /* ... some more lines left out ... */
> }
>
> I have read in the method description for class Array[T], method copyfrom
(),
> that "If the source Array is in a different place, then this copy
isperformed
> asynchronously and the resulting activity will be registered with the
> dynamically enclosing finish." Is there another "silent" finish around
the
> copyfrom call, or does this mean that I cannot expect v_src() to have the
> right values prior to the closing curly bracket in
> "finish ateach (pt in v_src ) { ...}" ?
> --
>
The "finish ateach" is the dynamically enclosing finish, so that is the
point at which the copyFrom will be know to have finished. If you need it
to be completed sooner, then you will need to add another finish. There is
no internal/"silent" finish. If you need it to be done completely
synchronously, you have the option of writing "finish v_src.(pt).copyFrom
(....)".
We will be changing the name of the function to asyncCopyFrom/asyncCopyTo
in X10 2.1 to emphasize that the copy is asynchronous.
--dave
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:
Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users