vtk-m/vtkm/cont/internal/VirtualObjectTransfer.h

55 lines
1.8 KiB
C
Raw Normal View History

2017-03-29 14:48:43 +00:00
//============================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE. See the above copyright notice for more information.
//
// Copyright 2017 Sandia Corporation.
// Copyright 2017 UT-Battelle, LLC.
// Copyright 2017 Los Alamos National Security.
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
// Laboratory (LANL), the U.S. Government retains certain rights in
// this software.
//============================================================================
#ifndef vtk_m_cont_internal_VirtualObjectTransfer_h
#define vtk_m_cont_internal_VirtualObjectTransfer_h
2017-05-18 14:29:41 +00:00
namespace vtkm
{
namespace cont
{
namespace internal
{
2017-03-29 14:48:43 +00:00
template <typename VirtualObject, typename TargetClass, typename DeviceAdapter>
struct VirtualObjectTransfer
#ifdef VTKM_DOXYGEN_ONLY
{
/// Takes a void* to host copy of the target object, transfers it to the
/// device, binds it to the VirtualObject, and returns a void* to an internal
/// state structure.
///
2017-05-18 14:29:41 +00:00
static void* Create(VirtualObject& object, const void* hostTarget);
2017-03-29 14:48:43 +00:00
/// Performs cleanup of the device state used to track the VirtualObject on
/// the device.
///
2017-05-18 14:29:41 +00:00
static void Cleanup(void* deviceState);
2017-03-29 14:48:43 +00:00
/// Update the device state with the state of target
2017-05-18 14:29:41 +00:00
static void Update(void* deviceState, const void* target);
2017-03-29 14:48:43 +00:00
}
#endif
;
}
}
} // vtkm::cont::internal
#endif // vtkm_cont_internal_VirtualObjectTransfer_h