mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-10-05 09:59:12 +00:00
21db210a73
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`.
20 lines
717 B
C
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_cont_internal_Variant_h
|
|
#define vtk_m_cont_internal_Variant_h
|
|
|
|
// These specify cont version of Variant.
|
|
#define VTK_M_DEVICE VTKM_CONT
|
|
#define VTK_M_NAMESPACE cont
|
|
|
|
#include <vtkm/internal/VariantImpl.h>
|
|
|
|
#endif //vtk_m_cont_internal_Variant_h
|