Skip to content

Commit f45085c

Browse files
committed
ConvertColorToGrayScaleTest: Allow compilation without TBB
Signed-off-by: Michael Jackson <[email protected]>
1 parent 0afaa68 commit f45085c

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

Source/RESTClient/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ set(RESTClient_HDRS
5252
${RESTClient_SOURCE_DIR}/mrestrequestmanager.h
5353
${RESTClient_SOURCE_DIR}/mrestrequestptr.h
5454
${RESTClient_SOURCE_DIR}/mrestrequestqueue.h
55-
${RESTClient_SOURCE_DIR}/RESTClientDLLExport
55+
${RESTClient_SOURCE_DIR}/RESTClientDLLExport.h
5656
${RESTClient_SOURCE_DIR}/SIMPLClientRequest.h
5757
${RESTClient_SOURCE_DIR}/SIMPLRestClient.h
5858
${RESTClient_SOURCE_DIR}/userptr.h

Source/SIMPLib/CoreFilters/Testing/Cxx/ConvertColorToGrayScaleTest.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@
5555
#include "SIMPLib/Testing/SIMPLTestFileLocations.h"
5656
#include "SIMPLib/Testing/UnitTestSupport.hpp"
5757

58-
#include <tbb/parallel_for.h>
59-
6058

6159
class ConvertColorToGrayScaleTest
6260
{
@@ -350,12 +348,11 @@ class ConvertColorToGrayScaleTest
350348
std::vector<uint8_t> colorArray{algorithmMap[algoMapIndex]};
351349

352350
int wrongValues = 0;
353-
tbb::parallel_for(tbb::blocked_range<size_t>(0, colorArray.size()), [&](const tbb::blocked_range<size_t>& r) {
354-
for(size_t index = r.begin(); index < r.end(); ++index)
355-
{
356-
wrongValues += (testArray->getValue(index) == colorArray[index]) ? 0 : 1;
357-
}
358-
});
351+
for(size_t index = 0; index < colorArray.size(); ++index)
352+
{
353+
wrongValues += (testArray->getValue(index) == colorArray[index]) ? 0 : 1;
354+
}
355+
359356
return wrongValues;
360357
}
361358

0 commit comments

Comments
 (0)