-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding OpenMP support to BruteForceConvolver
Just like we perform convolution for individual output pixels in parallel in OpenCL, we now also support OpenMP-accellerated 2d brute-force convolution. The previous incarnation of the brute-force convolution needed some small adjustments to be OpenMP-safe (i.e, declaring variables inside the for loop for proper thread isolation), but the structure of the code overall was already correct, looping first over the output pixels (which now we do with "omp parallel for") and then over the source images. A small new test double-checks that for any data we get the same results when using one thread or two threads. I also separately double-checked that the new code structure produces the same results than the old one for the case of one thread. There is obviously now no such test; that would have required having the two copies of the code living alongside, and therefore a new Convolver class just to cover the one thread case. The preformance when compiled properly was the same, and therefore there was no real reason to keep the old code around. Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
- Loading branch information
Showing
2 changed files
with
36 additions
and
34 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