This should be straightforward, at the risk of extra copying. Something 
like:

static def copyTo[T](A:Array[T], p:Place):Array[T]{self.dist == A.region 
->p} {
  val ACopy  = ValRail.make(0.. A.region.size()-1, (i:int) => 
A(A.region.coord(i)));
  at (p)
      return Array.make[T](A.region -> p, (p:Point) => 
ACopy(A.region.ord(p)));
  }
> Hi all,
>
> I have array-structured data that is calculated in one place, which I 
> then want to make available to activities running at other places. 
>
> The obvious way is to make the array the return value of a remote 
> expression.  This creates a remote reference to the array, but then 
> access to each individual element must also be done by a remote 
> expression, which is hardly efficient.  Importantly the array data is 
> calculated once and then never updated, so what is required is a final 
> read-only snapshot of the array.
>
> AFAIK the only array-like class that can be transferred between places 
> is ValRail.  However this does not support arbitrary Regions as do arrays.
>
> Is there an elegant way of transferring complete Array-like objects 
> between places?
>
> Cheers,
>
>   



------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to