It doesn't inherit Array, Array is actually final.

The purpose of RemoteArray is to allow you to copy to / from a remote array
without having to use a GlobalRef which would not have the properties (like
the number of dimensions) you need in order to make sure the copy makes
sense.  In all other senses, a RemoteArray and a GlobalRef[Array] are
essentially the same.  We did however provide RemoteArray.apply(Int) for
convenience in CUDA programs.


On Mon, Jan 3, 2011 at 10:50 AM, Christoph Pospiech <
[email protected]> wrote:

> On Monday, January 03, 2011 12:12:41 pm Christoph Pospiech wrote:
> > The first constructor appears to be able to turn any Array into a
> > RemoteArray,  if the constructor is called at the place where the Array
> > lives.
> >
> > Now I tried the following.
> >                 finish ateach(pt in Dv_tmp ) {
> >                        val v_1 = new Array[Double]((0..n-1),(0.0) as
> > Double);  v_src(pt) = RemoteArray(v_1);
> >                        val v_2 = new Array[Double]((0..n-1),(0.0) as
> > Double); v_dst(pt) = RemoteArray(v_2);
> > [...some code deleted ...]
> >                 }
> >
> > x10c++ v2.1 complained about this with the following messages.
> > /home/cp/xample/MatMul/mm_X10/src/matmul.x10:100: Method or static
> > constructor  not found for given call.
> >          Call: RemoteArray(x10.array.Array[x10.lang.Double]{self==v_1,
> > v_1.region.rect==true, v_1.region.rank==1, v_1.region.zeroBased==true,
> > v_1!=null})
> > /home/cp/xample/MatMul/mm_X10/src/matmul.x10:102: Method or static
> > constructor  not found for given call.
> >          Call: RemoteArray(x10.array.Array[x10.lang.Double]{self==v_2,
> > v_2.region.rect==true, v_2.region.rank==1, v_2.region.zeroBased==true,
> > v_2!=null})
> > /home/cp/xample/MatMul/mm_X10/src/matmul.x10:174-175: No valid method
> call
> > found for call in given type.
> >
> > Can anyone explain these mysteries to me ?
>
> Hi,
>
> a more general question would be the following. I got the impression that
> RemoteArray is something like an inherited class from Array with the extra
> information home() that points to the place where the RemoteArray lives.
> That would mean that all methods from Array carry over to RemoteArray.
>
> Is this impression correct ? Or in parts correct ?
> --
>
> Mit freundlichen Grüßen / Kind regards
>
> Dr. Christoph Pospiech
> High Performance & Parallel Computing
> Phone:  +49-351 86269826
> Mobile: +49-171-765 5871
> E-Mail: [email protected]
> -------------------------------------
> IBM Deutschland GmbH
> Vorsitzender des Aufsichtsrats: Erich Clementi
> Geschäftsführung: Martin Jetter (Vorsitzender),
> Reinhard Reschke, Dieter Scholz,
> Gregor Pillen, Michael Diemer, Martina Koederitz
> Sitz der Gesellschaft: Ehningen / Registergericht: Amtsgericht Stuttgart,
> HRB
> 14562 WEEE-Reg.-Nr. DE 99369940
>
>
>
> ------------------------------------------------------------------------------
> Learn how Oracle Real Application Clusters (RAC) One Node allows customers
> to consolidate database storage, standardize their database environment,
> and,
> should the need arise, upgrade to a full multi-node Oracle RAC database
> without downtime or disruption
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> X10-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/x10-users
>
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
X10-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to