It seems to me (indeed, it is obvious), that only loops involving random-access iterators can be parallelized, since OpenMP needs an integer to represent the iterator.
basi-type iterators cannot be made random access, but this should be easily possible for the basi_fast-type ones (cf. quantumtrajectory::master::BaseFast)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It seems to me (indeed, it is obvious), that only loops involving random-access iterators can be parallelized, since OpenMP needs an integer to represent the iterator.
basi-type iterators cannot be made random access, but this should be easily possible for the basi_fast-type ones (cf. quantumtrajectory::master::BaseFast)
I think now that this whole thing should be implemented in terms of the Thrust library. (cf. https://github.com/thrust/\)
The way to use thrust in g++ with OpenMP backend:
https://github.com/thrust/thrust/wiki/Device-Backends#additional-details
And the algorithm that we need:
http://thrust.github.io/doc/group__modifying.html