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.
|
|
|
|
//
|
2017-09-20 21:33:44 +00:00
|
|
|
// Copyright 2017 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
|
2017-03-29 14:48:43 +00:00
|
|
|
// Copyright 2017 UT-Battelle, LLC.
|
|
|
|
// Copyright 2017 Los Alamos National Security.
|
|
|
|
//
|
2017-09-20 21:33:44 +00:00
|
|
|
// Under the terms of Contract DE-NA0003525 with NTESS,
|
2017-03-29 14:48:43 +00:00
|
|
|
// 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
|