mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-08 13:23:51 +00:00
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:
commit
177ef28d81
@ -62,19 +62,19 @@ void process_partition_tbb(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
|
||||
//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.
|
||||
//
|
||||
vtkm::cont::GetRuntimeDeviceTracker().ForceDevice(vtkm::cont::DeviceAdapterTagOpenMP{});
|
||||
|
||||
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();
|
||||
|
||||
//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
|
||||
//when the queue is empty and we are shutting down
|
||||
if (task != nullptr)
|
||||
@ -84,7 +84,8 @@ void process_partition_openMP(RuntimeTaskQueue& queue)
|
||||
|
||||
//Step 4. Notify the queue that we finished processing this task
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user