Hello,
> class MyDist {
> var policy;
> ...
> proc MyDist(policy, ...) {
> // Is the following line necessary?
> this.policy = policy;
> }
> }
I am not sure what this gives you. However, if it works better than
having all policy code right in MyDist, by all means go for it.
For a generic field like 'policy' above, it is automatically initialized
from like-named constructor argument, so that line is not necessary.
> Another question: In block distribution, the local blocks (domain is
> LocBlockDist.myChunk) don't cover just the bounding box, but rather the whole
> space representable by the used index type and rank. Brad already wrote about
> this, but would you mind expanding a bit on this issue? I did use the
> BlockDist as a starting point for MyDist, and have rewritten the chunk
> calculation. I did a test where I changed myChunks to cover just the bounding
> box and my test programs didn't break, so where is this actually needed?
Correct, our BlockDist specifies index-to-locale mapping regardless of a
specific domain. This mapping extends to infinity (or, rather min/max
for the index type) in all directions.
Here is an example where this comes handy. You can create {1..n,1..n}
and {0..n+1,0..n+1} both distributed over the same BlockDist object, and
the shared indices will map to the same locale for both domains.
Your domain map does not have to be the same way, however - it is your
choice.
Vassily
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users