mohammed elsaeedy <mohammed.elsae...@kaust.edu.sa> wrote on 07/12/2010
03:43:36 PM:
>
> but my problem is when I want to sum up all the results in a global
linear
> array called result which is at place 0
> when ever i want to add those elements that reside at place 1 to the
values
> of the result array, a bad place exception occurs.
> so how can I pass an array (or the values of the array) that resides at
> place 1 to the result array that resides at place 0?
>

There isn't quite as much support for this in 2.0.4 as there should be.
I'm hoping to make improved support for this kind of operation part of the
Array API for 2.0.5 (was working on it this afternoon).

In 2.0.4, what you need to do is the following series of steps.

        (1) call the raw() method on the array at place 1 to get the backing
Rail.
        (2) either
                (a) use one of the Rail.copyTo/copyFrom methods to copy the
Rail from place 1 to place 0
                (b) convert the Rail to a ValRail, then capture the ValRail in
an "at" to copy it to place 0.
        (3) at place 0, take the copied values from the Rail/ValRail and use
them to update the Array.

What I'm hoping to finish in time for 2.0.5 is to implement copyTo/copyFrom
on Array so you can at least avoid having to know about the raw() method to
copy an Array's data from an Array in one place to another Array in a
second place.

--dave
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to