I realized that I had missed the import statements. But, adding the import
statement didn't change the error messages.

import x10.lang.*;
import x10.util.*;

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

abstract class Adder[S, T]{T <: Reducible[S]} {

  public abstract def getT() : T;

  public def computeGlobalSum(localSums :
DistArray[Int]{self.dist.region.rank == 1}) {
    val globalSum = finish (getT()) {
      foreach (p in localSums.dist.places()) {
        at (p) {
          offer localSums.apply(Point.make(p.id));
        }
      }
    };

    return globalSum;
  }
}


On Mon, Jul 19, 2010 at 6:41 PM, Mohsen Vakilian <reprogram...@gmail.com>wrote:

> I built the x10 compiler from trunk today (7/19) and used it to compile the
> attached piece of code. The code implements a class that is parameterized by
> a type that implements the Reducible interface. But, there are problems when
> using the reducer in the finish statement. I've attached the error messages
> that I get from the compiler. Could any one help me in fixing my program?
------------------------------------------------------------------------------
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