Open main menu

CDOT Wiki β

Changes

GPU621/Group 3

88 bytes added, 18:08, 9 April 2023
no edit summary
OpenMP provides extremely simple implementation, especially the process which we are using in our code. In this process we were able to simply use a ''#pragma parallel for'' declaration for the OpenMP API to parallelize the process. With this we saw at the operations being performed at a quarter of the time it took the serial version of these processes.
 <codesyntaxhighlight lang="cpp">void openMP_imgProcessor::sharpenImg(cv::Mat& image) {
//supressing OpenCV messages
std::streambuf* coutbuf = std::cout.rdbuf();
//stop supressing
std::cout.rdbuf(coutbuf);
}</codesyntaxhighlight lang="cpp">
<codesyntaxhighlight lang="cpp">void openMP_imgProcessor::brightenImg(cv::Mat& image, int brightnessLvl) {
//supressing OpenCV messages
std::streambuf* coutbuf = std::cout.rdbuf();
//stop supressing
std::cout.rdbuf(coutbuf);
}</codesyntaxhighlight lang="cpp">
72
edits