Don't allow DeviceTaskTypes to construct tasks from rvalues.

This commit is contained in:
Robert Maynard 2018-01-18 13:51:30 -05:00
parent 6aca828a00
commit ef611239f6
6 changed files with 19 additions and 19 deletions

@ -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)