The definition of reduce is: def reduce(op:(T,T)=>T, unit:T):T You pass it a function with a guard: ArrayD_add(s1:Array[Double], s2:Array[Double]) *{s1.region() == s2.region(), s1.rail(), s2.rail()}*: Array[Double]
remove the guard, and it should fit. On Wed, Jun 2, 2010 at 4:36 PM, Christoph Pospiech < christoph.pospi...@de.ibm.com> wrote: > On Wednesday 02 June 2010 06:01:24 pm Yoav Zibin wrote: > > Maybe you do the reduce in a static context (so the error is that you > refer > > to instance method in a static context) ? > > > > Can you try both: > > v = v_dst.reduce(ArrayD_add, v); > > and > > v = v_dst.reduce(*this.*ArrayD_add, v); > > > > If both don't work, email the full code and I'll look into it. > > > > I think the mentioning the static context was a hint to the right > direction. > > But unfortunately, playing around with "this" didn't help. I am appending > the > full code matmul.x10 below. > > I also tried to list both of the functions ArrayD_cp and ArrayD_add "public > static", which made the error at v = v_dst.reduce() disappear. But then the > lift was offending (presumably, it was not listed static). > > As all ArrayD.region() are zero-based Rails, I tried to replace the call to > lift with an ordinary loop - but no avail. I am appending this version > (matmul_v2.x10) as well. > > I hope, one of the two versions can be coerced into a valid X10 program ! > > Thanks very much for your kind help ! > -- > > 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 > > > > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > X10-users mailing list > X10-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/x10-users > > ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ X10-users mailing list X10-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/x10-users