mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-20 02:55:47 +00:00
Merge branch 'make_sure_to_use_cuda_execution_policy' into 'master'
All occurrences of thrust invocation uses an execution policy. See merge request !162
This commit is contained in:
commit
3980b5966c
@ -29,6 +29,9 @@ VTKM_THIRDPARTY_PRE_INCLUDE
|
||||
#include <thrust/system/cuda/vector.h>
|
||||
#include <thrust/device_malloc_allocator.h>
|
||||
#include <thrust/copy.h>
|
||||
|
||||
#include <thrust/system/cuda/execution_policy.h>
|
||||
|
||||
VTKM_THIRDPARTY_POST_INCLUDE
|
||||
|
||||
#include <vtkm/exec/cuda/internal/ArrayPortalFromThrust.h>
|
||||
@ -164,6 +167,7 @@ public:
|
||||
{
|
||||
storage->Allocate(static_cast<vtkm::Id>(this->Array.size()));
|
||||
::thrust::copy(
|
||||
thrust::cuda::par,
|
||||
this->Array.data(),
|
||||
this->Array.data() + static_cast<difference_type>(this->Array.size()),
|
||||
vtkm::cont::ArrayPortalToIteratorBegin(storage->GetPortal()));
|
||||
|
@ -28,8 +28,12 @@
|
||||
|
||||
#include <vtkm/opengl/internal/TransferToOpenGL.h>
|
||||
|
||||
// Disable warnings we check vtkm for but Thrust does not.
|
||||
VTKM_THIRDPARTY_PRE_INCLUDE
|
||||
#include <thrust/copy.h>
|
||||
#include <thrust/device_ptr.h>
|
||||
#include <thrust/system/cuda/execution_policy.h>
|
||||
VTKM_THIRDPARTY_POST_INCLUDE
|
||||
|
||||
namespace vtkm {
|
||||
namespace opengl {
|
||||
@ -123,7 +127,9 @@ public:
|
||||
|
||||
//Perhaps a direct call to thrust copy should be wrapped in a vtkm
|
||||
//compatble function
|
||||
::thrust::copy(vtkm::cont::cuda::internal::IteratorBegin(portal),
|
||||
::thrust::copy(
|
||||
thrust::cuda::par,
|
||||
vtkm::cont::cuda::internal::IteratorBegin(portal),
|
||||
vtkm::cont::cuda::internal::IteratorEnd(portal),
|
||||
thrust::cuda::pointer<ValueType>(beginPointer));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user