vtk-m/vtkm/exec/internal/Variant.h
Kenneth Moreland 21db210a73 Make separate exec and cont versions of Variant
The `Variant` class is templated to hold objects of other types.
Depending on whether those objects of are meant to be used in the
control or execution side, the methods on `Variant` might need to be
declared with (or without) special modifiers. We can sometimes try to
compile the `Variant` methods for both host and device and ask the
device compiler to ignore incompatibilities, but that does not always
work.

To get around that, create two different implementations of `Variant`.
Their API and implementation is exactly the same except one declares its
methods with `VTKM_CONT` and the other its methods `VTKM_EXEC`.
2020-11-09 12:48:10 -07:00

20 lines
717 B
C

//============================================================================
// 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.
//============================================================================
#ifndef vtk_m_exec_internal_Variant_h
#define vtk_m_exec_internal_Variant_h
// These specify exec version of Variant.
#define VTK_M_DEVICE VTKM_EXEC
#define VTK_M_NAMESPACE exec
#include <vtkm/internal/VariantImpl.h>
#endif //vtk_m_exec_internal_Variant_h