Merge topic 'fixPrintMultiBackEndExample'

72f1846bf missed a comment change.
bda8a1580 change comments as well.
2858186dd Print statement was wrong for openMP

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2095
This commit is contained in:
Dave Pugmire 2020-05-19 16:44:28 +00:00 committed by Kitware Robot
commit 177ef28d81

@ -62,19 +62,19 @@ void process_partition_tbb(RuntimeTaskQueue& queue)
void process_partition_openMP(RuntimeTaskQueue& queue) void process_partition_openMP(RuntimeTaskQueue& queue)
{ {
//Step 1. Set the device adapter to this thread to TBB. //Step 1. Set the device adapter to this thread to openMP.
//This makes sure that any vtkm::filters used by our //This makes sure that any vtkm::filters used by our
//task operate only on TBB. The "global" thread tracker //task operate only on openMP. The "global" thread tracker
//is actually thread-local, so we can use that. //is actually thread-local, so we can use that.
// //
vtkm::cont::GetRuntimeDeviceTracker().ForceDevice(vtkm::cont::DeviceAdapterTagOpenMP{}); vtkm::cont::GetRuntimeDeviceTracker().ForceDevice(vtkm::cont::DeviceAdapterTagOpenMP{});
while (queue.hasTasks()) while (queue.hasTasks())
{ {
//Step 2. Get the task to run on TBB //Step 2. Get the task to run on openMP
auto task = queue.pop(); auto task = queue.pop();
//Step 3. Run the task on TBB. We check the validity //Step 3. Run the task on openMP. We check the validity
//of the task since we could be given an empty task //of the task since we could be given an empty task
//when the queue is empty and we are shutting down //when the queue is empty and we are shutting down
if (task != nullptr) if (task != nullptr)
@ -84,7 +84,8 @@ void process_partition_openMP(RuntimeTaskQueue& queue)
//Step 4. Notify the queue that we finished processing this task //Step 4. Notify the queue that we finished processing this task
queue.completedTask(); queue.completedTask();
std::cout << "finished a partition on tbb (" << std::this_thread::get_id() << ")" << std::endl; std::cout << "finished a partition on openMP (" << std::this_thread::get_id() << ")"
<< std::endl;
} }
} }