On Tuesday 01 June 2010 07:26:02 pm Dr. Christoph Pospiech wrote: > On Tuesday 01 June 2010 02:06:08 pm Yoav Zibin wrote: > > self.home==here > > This means u need to use ! After the type. > > > > Following the recent posts, I tried the following. > > global def ArrayD_add(s1:Array[double]!, > s2:Array[double]!) > {s1.region() == s2.region()}: Array[double] { > s1.lift(s1, s2, Double.+); > return(s1); > } > > This seems to compile OK. > > BTW, while leaving the typedef in the code (and using it elsewhere) I had > to remove it from the function definition, as it seem to blow up my > workspace (compile ran out of memory). >
Originally, I want to do the following. // Finally, we set up a distribution // with one point per place val Dv_tmp:Dist = Dist.makeUnique(D.places()); val v_dst : DistArray[Array[Double]] = DistArray.make[Array[double]](Dv_tmp); finish ateach(pt in Dv_tmp ) { v_dst(pt) = new Array[double](n, (q:Point) => {(0.0) as double}); } // Of course the values for v_dst(pt)(q) change later // but they stay at the same Place. // Basically one Array[double] at each place. val v : Array[double] = v_dst.reduce(??, unit); The ArrayD_add function was supposed to go into the location marked with ??. But now I am stating that both arguments have home == here, which is definitely not the case for v_dst(pt), pt in Dv_tmp. I guess I need to add some communication by hand, say along the lines of something like Array[double].raw().copyFrom() ? Suggestions welcome ! -- Mit freundlichen Grüßen / Kind regards Dr. Christoph Pospiech High Performance & Parallel Computing Phone: +49-351 86269826 Mobile: +49-171-765 5871 E-Mail: christoph.pospi...@de.ibm.com ------------------------------------- IBM Deutschland GmbH Vorsitzender des Aufsichtsrats: Erich Clementi Geschäftsführung: Martin Jetter (Vorsitzender), Reinhard Reschke, Christoph Grandpierre, Klaus Lintelmann, Michael Diemer, Martina Koederitz Sitz der Gesellschaft: Ehningen / Registergericht: Amtsgericht Stuttgart, HRB 14562 WEEE-Reg.-Nr. DE 99369940 ------------------------------------------------------------------------------ _______________________________________________ X10-users mailing list X10-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/x10-users