Hello all,
I am new to x10 and currently I trying to develop a parallel version of my
program with a DistArray
So, I need to store objects of my own class "Tup" (instead of primitive
types) in the distributed array.
I tried to follow the code I found here:
http://sourceforge.net/mailarchive/forum.php?thread_name=CADmVTxxhj%2B29GRR2XF9aw9e7hA3AdSc8_ksA-aLsOAgFS9FaYQ%40mail.gmail.com&forum_name=x10-user<http://sourceforge.net/mailarchive/forum.php?thread_name=CADmVTxxhj%2B29GRR2XF9aw9e7hA3AdSc8_ksA-aLsOAgFS9FaYQ%40mail.gmail.com&forum_name=x10-users>
and I 've got the following inside the caller - class
public var dimx: Int ;
public var R:Region(1);
public val D:Dist;
public var results: DistArray[ArrayBuilder[Tup]](D);
public def this(dimx: Int){
this.dimx = dimx;
this.R = 1..dimx;
this.D = Dist.makeBlock(R);
this.results = DistArray.make[ArrayBuilder[Tup]](D);
}
Till here it compiles ok, but then I try to populate the array...
public def fill(results:DistArray[ArrayBuilder[Tup]]){
finish for( p in results.dist.places()) {
at (p) async {
results(here.id)=new ArrayBuilder[Tup]();
}
}
finish for( p in Place.places()){
at (p) async {
results(here.id).add(new Tup(2, 6));
//processing the strings in Read(here.id);
}
}
}
And get an error:
x10:59: Generated a dynamic check for the method call.
So, my question is, how I can access my objects through the ArrayBuilder in
the DistArray.
Thanks,
Konstantina
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users