Ticket #2184 (closed: wontfix)
EventWorkspace: iterator to go through all events (?)
Reported by: | Janik Zikovsky | Owned by: | Janik Zikovsky |
---|---|---|---|
Priority: | minor | Milestone: | Iteration 27 |
Component: | Mantid | Keywords: | |
Cc: | 3y9@… | Blocked By: | |
Blocking: | Tester: | Nick Draper |
Description
Will allow operations (weights, etc.) to be applied to all events in a single loop.
A forward iterator would be the quickest ( O(1) to go forward ). But it is not possible to parallelize a forward iterator with OpenMP.
If made a random-access iterator, then you could do a OpenMP for loop; but unfortunately each access will have complexity ( O(log M) ) where M is the number of spectra.
Therefore, a mix of both methods might be necessary - split into X ForwardIterators that operate in parallel, where X is the number of available cores?
Change History
comment:1 Changed 10 years ago by Janik Zikovsky
- Status changed from new to verify
- Resolution set to wontfix
comment:2 Changed 10 years ago by Nick Draper
- Status changed from verify to verifying
- Tester set to Nick Draper
We found with histogram workspaces that iterators were generally slower than nested loops, even when optimised we could not beat the speed of a nested loop.
Also as you said, for loops work well with openMP