self.home==here This means u need to use ! After the type. Do you compile with -DYNAMIC_CALLS ?
Thanks, Yoav Zibin On 01/06/2010, at 06:05, Christoph Pospiech <christoph.pospi...@de.ibm.com > wrote: > Hi, > > the following should be trivial, but I am stuck at an error message. > Can > someone please fill me in ? > > Here is the code snippet. > > static type ArrayD = Array[double]{rank==1}; > > global def ArrayD_add(s1:ArrayD, s2:ArrayD) > {s2.region() == s1.region()}: ArrayD { > s1.lift(s1, s2, Double.+); > return(s1); > } > > The compiler complains as follows. > -Method lift(x10.array.Array[T]{self.home==here, > self.region==x10.array.Array#this.region}, > x10.array.Array[T]{self.home==here, > self.region==x10.array.Array#this.region}, (x:x10.lang.Double, > y:x10.lang.Double)=> T) in x10.array.Array[x10.lang.Double] > {self==s1, > s1.region.rank==1, > s2.region==s1.region} cannot be called with arguments > (x10.array.Array[x10.lang.Double] > {self==s1, s1.region.rank==1, s2.region==s1.region}, > x10.array.Array[x10.lang.Double]{self==s2, > s2.region==s1.region, s1.region.rank==1}, (x:x10.lang.Double, > y:x10.lang.Double)=> > x10.lang.Double); Invalid Parameter. expected type: > x10.array.Array[x10.lang.Double] > {self.home==here, self.region==s1.region} found: > x10.array.Array[x10.lang.Double]{self==s1, > s1.region.rank==1, s2.region==s1.region} > > Aren't all regions identical ? So, where is the problem ? > > -- > > 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 ------------------------------------------------------------------------------ _______________________________________________ X10-users mailing list X10-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/x10-users