Don't use patched version of TBB on newer versions.

We have a patched version of TBB's parallel_for.h in our files that
fixes a problem with using std::swap. This issue has since been fixed in
TBB, so for newer versions we should revert back to TBB's
implementation.
This commit is contained in:
Kenneth Moreland 2015-08-04 09:14:24 -06:00
parent 91ce7b12c1
commit ce8ecf9e8b
2 changed files with 13 additions and 2 deletions

@ -22,7 +22,13 @@ set(headers
ArrayManagerExecutionTBB.h ArrayManagerExecutionTBB.h
DeviceAdapterAlgorithmTBB.h DeviceAdapterAlgorithmTBB.h
DeviceAdapterTagTBB.h DeviceAdapterTagTBB.h
parallel_sort.h
) )
if("${TBB_VERSION_MAJOR}.${TBB_VERSION_MINOR}" VERSION_LESS 4.3)
if("${TBB_VERSION_MAJOR}.${TBB_VERSION_MINOR}" VERSION_LESS 4.2)
message_error("VTK-m not tested with TBB before version 4.1. Please upgrade your TBB library.")
endif()
set(headers ${headers} parallel_sort.h)
endif()
vtkm_declare_headers(${headers}) vtkm_declare_headers(${headers})

@ -52,10 +52,15 @@ VTKM_BOOST_POST_INCLUDE
#define NOMINMAX #define NOMINMAX
#endif #endif
#include <tbb/tbb_stddef.h>
#if (TBB_VERSION_MAJOR == 4) && (TBB_VERSION_MINOR == 2)
//we provide an patched implementation of tbb parallel_sort //we provide an patched implementation of tbb parallel_sort
//that fixes ADL for std::swap. This patch has been submitted to Intel //that fixes ADL for std::swap. This patch has been submitted to Intel
//and should be included in future version of TBB. //and is fixed in TBB 4.2 update 2.
#include <vtkm/cont/tbb/internal/parallel_sort.h> #include <vtkm/cont/tbb/internal/parallel_sort.h>
#else
#include <tbb/parallel_sort.h>
#endif
#include <tbb/blocked_range.h> #include <tbb/blocked_range.h>
#include <tbb/blocked_range3d.h> #include <tbb/blocked_range3d.h>