"Kröhnert,Manfred" <manfred.kroehn...@kit.edu> wrote on 06/01/2011 12:16:04
PM:
>
> I have an Array of size m * n and I am currently distributing it
> using a DistArray
> with a distribution created through Dist.makeBlock().
> This distributes the values evenly over all places.
>
> What I would like to have is a distribution which creates the
> following layout (k being a natural number):
>
> Place 0: k * m values
> Place 1: k * m values
> ...
> Place MaxPlaces - 1: k * m values
> Place MaxPlaces: all the remaining values (also a multiple of m)
>
> Is this possible to achieve with the current 2.1.2 release (or the
> pending 2.2) ?
> >From reading through the documentation I was not able to figure this
out.
There isn't a built-in distribution that does this. However, all
distributions in X10 are simply normal X10 classes that are subclasses of
the x10.array.Dist class. I think it should be fairly straightforward to
implement this functionality by writing your own subclass of
x10.array.Dist. I'd start by copying x10.array.BlockDist and then just
changing the bodies of the two methods blockRegionForPlace and
mapIndexToPlace to get the mapping you want. I think that should be all
you would need to do. You then use your new Dist subclass to create a
DistArray, and you should be in business.
--dave
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users