Jheisson Argiro López Restrepo <j...@openmailbox.org> wrote on 02/08/2017
03:22:34 PM:
>
> Is the use of the SparsePlaceGroup class scalable? I need the solution
> to work with a large number of nodes.
For tens to hundreds of Places and typical uses of PlaceGroups it should be
ok. The main scalability problem is that the Rail[Place] is stored
explicitly in each SparsePlaceGroup object and operations like indexOf and
contains do a linear search over that Rail[Place].
If it does become an issue, a possible fix would be to implement a new
subclass of PlaceGroup that was specialized for dense ranges of Places (eg
containing 200 Places from Place(10) to Place(209) that just stored Place
(10) and the number 200). You could have more efficient storage and
constant time implementations of indexOf and contains. The default
implementation of PlaceGroup (PlaceGroup.SimplePlaceGroup) is close to
this....but it assumes the dense range starts with Place(0).
There is nothing "special" about PlaceGroup; user programs can define and
use their own subclasses.
>
> I tried to make some like this:
>
> var headersGroup:PlaceGroup = PlaceGroup.make(configNodes.numElems_1);
>
> var explorersGroup:PlaceGroup = PlaceGroup.make(numExplorers);
>
This will make two PlaceGroups containing
headersGroup: Place(0)...Place(configNodes.numElems_1-1)
explorersGroup: Place(0)...Place(numExplorers-1)
If you want the groups to not overlap, you will need to do like Josh's
example where you create two Rails that contain the Places you want in each
group and create a SparsePlaceGroup from each Rail.
--dave
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users