Hi,
> Chapel typically doesn't make copies of (class) objects automatically in
> order to guarantee the reference semantics of the object. So yeah, you'd
> have to do something to explicitly replicate/copy it if you wanted a local
> copy. Using the privatization functions would be one approach (and Vass
> might be well-equipped to help advise on that one); alternatively, it
> seems like you could simply have the LocBlock class store its own copy
> when it's constructed(?). I'm not sure what the tradeoff between the two
> would be -- seems like a wash to me, but I could be missing something.
Okay. It seems easier to use privatization since the locate to index function
is critical here, and it's called in the Block class.
I understood that assignment of arrays is by value, like
ArrayA = ArrayB
makes A an independent copy of the array B taken that their domains match,
right? If I wanted A to reference to the B how should I write in that case?
Also, what is the effect of writing
DomainA = DomainB
> I think you'll want to go into the leader iterators and insert timing
> calls after the coforall that creates a task per locale, but before the
> coforall that creates the tasks on the locale. Look for this prototype:
>
> iter BlockDom.these(param tag: iterKind) where tag == iterKind.leader {
>
> It appears that the BlockArr leader iterator forwards to the BlockDom
> case, so doing it here should support timed iterations over either domains
> or arrays. If you guard the timing logic by a config param (and/or
> const), you should be able to compile it out (and/or turn it off) when
> you're not interested in gathering these timings.
Would you expand a bit on this? Namely, where should I stop the timer, and how
should I return the gathered information to the user? Also I'd like to be able
to turn the timings on/off during runtime, how should I pass this argument?
------------------------------------------------------------------------------
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