forked from ComputationalRadiationPhysics/haseongpu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added OpenMP support for host-side loops
see ComputationalRadiationPhysics#51 Some observations: - we have only trivial (and fast) loops - the other loops are integral steps of the simulation and can not be parallelized (sequential steps and maybe with device-code) - one of the parsing loops uses cudaSetDevice, not sure if it's possible to parallelize that in a good way. - parallelizing std::vector is ok as long as the length is fixed (no reallocation). That means, we may not use vector.push_back() or vector.insert() inside a loop with OpenMP pragmas. Compiler might not complain... Only "easy" loops were parallelized, only basic pragmas were used. Might give some speedup one day, but if not... no problem. Pragmas and code changes are non-intrusive enough to keep it maintainable.
- Loading branch information
Showing
4 changed files
with
54 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters