Hi guys,
can somebody clear this up for me please.
I can not get my head around this element manipulation in distributed arrays
in 2.0.

Here is the overly simplified code but represents my problem,
so please tell me what am I doing wrong and what it should be.

I am having trouble understanding accessing elements of the array and their
distributed location.

Thank you.

public static def main(args:Rail[String]!){

   R: Region = 1..4;
   D: Dist = Dist.makeCyclic(R);

   val data_squares = Array.make[Int](D, ((i):Point) => i*i);

   for (val p: Point in D) {
       Console.OUT.println( "Array index: " + p + " distributed place :" +
D(p));

      // this is the problem part, but this is how I understood arrays

      Console.OUT.println( "Array element: " + data_squares(p));

     // how can I access e.g. data_squares(3) and its value and place.
     // using 2.0 java back end on eclipse
  }
}
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to