Commit 7d7c6ab1 authored by Robert Maynard's avatar Robert Maynard
Browse files

Don't allow DeviceTaskTypes to construct tasks from rvalues.

parent 9c668b61
......@@ -258,8 +258,8 @@ class DeviceTaskTypes<vtkm::cont::DeviceAdapterTagCuda>
public:
template <typename WorkletType, typename InvocationType>
static vtkm::exec::internal::TaskSingular<WorkletType, InvocationType> MakeTask(
const WorkletType& worklet,
const InvocationType& invocation,
WorkletType& worklet,
InvocationType& invocation,
vtkm::Id,
vtkm::Id globalIndexOffset = 0)
{
......@@ -269,8 +269,8 @@ public:
template <typename WorkletType, typename InvocationType>
static vtkm::exec::internal::TaskSingular<WorkletType, InvocationType> MakeTask(
const WorkletType& worklet,
const InvocationType& invocation,
WorkletType& worklet,
InvocationType& invocation,
vtkm::Id3,
vtkm::Id globalIndexOffset = 0)
{
......
......@@ -989,8 +989,8 @@ class DeviceTaskTypes
public:
template <typename WorkletType, typename InvocationType>
static vtkm::exec::internal::TaskSingular<WorkletType, InvocationType> MakeTask(
const WorkletType& worklet,
const InvocationType& invocation,
WorkletType& worklet,
InvocationType& invocation,
vtkm::Id,
vtkm::Id globalIndexOffset = 0)
{
......@@ -1000,8 +1000,8 @@ public:
template <typename WorkletType, typename InvocationType>
static vtkm::exec::internal::TaskSingular<WorkletType, InvocationType> MakeTask(
const WorkletType& worklet,
const InvocationType& invocation,
WorkletType& worklet,
InvocationType& invocation,
vtkm::Id3,
vtkm::Id globalIndexOffset = 0)
{
......
......@@ -513,8 +513,8 @@ class DeviceTaskTypes<vtkm::cont::DeviceAdapterTagSerial>
{
public:
template <typename WorkletType, typename InvocationType>
static vtkm::exec::serial::internal::TaskTiling1D MakeTask(const WorkletType& worklet,
const InvocationType& invocation,
static vtkm::exec::serial::internal::TaskTiling1D MakeTask(WorkletType& worklet,
InvocationType& invocation,
vtkm::Id,
vtkm::Id globalIndexOffset = 0)
{
......@@ -522,8 +522,8 @@ public:
}
template <typename WorkletType, typename InvocationType>
static vtkm::exec::serial::internal::TaskTiling3D MakeTask(const WorkletType& worklet,
const InvocationType& invocation,
static vtkm::exec::serial::internal::TaskTiling3D MakeTask(WorkletType& worklet,
InvocationType& invocation,
vtkm::Id3,
vtkm::Id globalIndexOffset = 0)
{
......
......@@ -366,8 +366,8 @@ class DeviceTaskTypes<vtkm::cont::DeviceAdapterTagTBB>
{
public:
template <typename WorkletType, typename InvocationType>
static vtkm::exec::serial::internal::TaskTiling1D MakeTask(const WorkletType& worklet,
const InvocationType& invocation,
static vtkm::exec::serial::internal::TaskTiling1D MakeTask(WorkletType& worklet,
InvocationType& invocation,
vtkm::Id,
vtkm::Id globalIndexOffset = 0)
{
......@@ -375,8 +375,8 @@ public:
}
template <typename WorkletType, typename InvocationType>
static vtkm::exec::serial::internal::TaskTiling3D MakeTask(const WorkletType& worklet,
const InvocationType& invocation,
static vtkm::exec::serial::internal::TaskTiling3D MakeTask(WorkletType& worklet,
InvocationType& invocation,
vtkm::Id3,
vtkm::Id globalIndexOffset = 0)
{
......
......@@ -75,7 +75,7 @@ public:
}
private:
WorkletType Worklet;
typename std::remove_const<WorkletType>::type Worklet;
// This is held by by value so that when we transfer the invocation object
// over to CUDA it gets properly copied to the device. While we want to
// hold by reference to reduce the number of copies, it is not possible
......
......@@ -173,7 +173,7 @@ public:
/// parameters that go along with it
template <typename WorkletType, typename InvocationType>
TaskTiling1D(WorkletType& worklet,
const InvocationType& invocation,
InvocationType& invocation,
const vtkm::Id& globalIndexOffset = 0)
: Worklet(nullptr)
, Invocation(nullptr)
......@@ -263,7 +263,7 @@ public:
template <typename WorkletType, typename InvocationType>
TaskTiling3D(WorkletType& worklet,
const InvocationType& invocation,
InvocationType& invocation,
const vtkm::Id& globalIndexOffset = 0)
: Worklet(nullptr)
, Invocation(nullptr)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment