Hi,

I'm new to X10 and currently coding with X10DT 2.2.2. Trying to implement some 
simple numerical analysis algorithm, which involves matrix vector 
multiplication. I've done it in the "concurrent" way (spawn thread using async) 
and the performance is not very good. Now I would like to try the "distributed" 
approach. However, I don't know how to create and traverse a 2-d DistArray.

I actually found the following code snippet in the mailing list regarding to 
"performance issue with matrix vector multiply program", which is exactly what 
I need.
......

    val r = [1..1000,1..1000] as Region;
    val d = Dist.makeBlock(r);
    val da = DistArray.make[float](d);
    val start = System.nanoTime();
    var tmp:float = 0;
    for ((i,j) in (da|here)) {
        tmp += da(i,j);
    }

......
However, when I did it in the same way, my Eclipse refused to take "for ((i,j) 
in (da|here))". Any idea where the problem is?

Thanks
Ye
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to