VTK  9.7.1
vtkConduitArrayUtilitiesDevice.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
14 #ifndef vtkConduitArrayUtilitiesDevice_h
15 #define vtkConduitArrayUtilitiesDevice_h
16 
17 #include "vtkDeprecation.h" // for VTK_DEPRECATED_IN_9_6_0
18 #include "vtkIOCatalystConduitModule.h" // for exports
19 #include "vtkObject.h"
20 #include "vtkSmartPointer.h" // for vtkSmartPointer
21 
22 #include "conduit.h" // for conduit_node
23 
24 #include "viskores/cont/DeviceAdapterTag.h" // for viskores::cont::DeviceAdapterId
25 #include <string> // for std::string
26 
27 VTK_ABI_NAMESPACE_BEGIN
28 class vtkCellArray;
29 class vtkDataArray;
30 
31 class VTKIOCATALYSTCONDUIT_EXPORT vtkConduitArrayUtilitiesDevice : public vtkObject
32 {
33 public:
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37 
38  static vtkSmartPointer<vtkDataArray> MCArrayToVTKmAOSArray(
39  const conduit_node* mcarray, const viskores::cont::DeviceAdapterId& deviceAdapterId);
40  static vtkSmartPointer<vtkDataArray> MCArrayToVTKmSOAArray(
41  const conduit_node* mcarray, const viskores::cont::DeviceAdapterId& deviceAdapterId);
42 
43  VTK_DEPRECATED_IN_9_6_0("Use the overload without force_signed parameter.")
44  static vtkSmartPointer<vtkDataArray> MCArrayToVTKmAOSArray(const conduit_node* mcarray,
45  bool vtkNotUsed(force_signed), const viskores::cont::DeviceAdapterId& deviceAdapterId)
46  {
47  return MCArrayToVTKmAOSArray(mcarray, deviceAdapterId);
48  }
49  VTK_DEPRECATED_IN_9_6_0("Use the overload without force_signed parameter.")
50  static vtkSmartPointer<vtkDataArray> MCArrayToVTKmSOAArray(const conduit_node* mcarray,
51  bool vtkNotUsed(force_signed), const viskores::cont::DeviceAdapterId& deviceAdapterId)
52  {
53  return MCArrayToVTKmSOAArray(mcarray, deviceAdapterId);
54  }
55  static bool IfVTKmConvertVTKMonoShapedCellArray(vtkIdType numberOfPoints, int cellType,
56  vtkIdType cellSize, vtkDataArray* connectivity, vtkCellArray* cellArray);
57  static bool IfVTKmConvertVTKMixedCellArray(vtkIdType numberOfPoints, vtkDataArray* offsets,
58  vtkDataArray* shapes, vtkDataArray* elements, vtkCellArray* cellArray);
59  static bool CanRunOn(const viskores::cont::DeviceAdapterId& deviceAdapterId);
60 
61 protected:
64 
65 private:
67  void operator=(const vtkConduitArrayUtilitiesDevice&) = delete;
68 };
69 
70 VTK_ABI_NAMESPACE_END
71 
72 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:52
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
struct conduit_node_impl conduit_node
helper to convert Conduit arrays stored on acceleration devices to Viskores arrays.
int vtkIdType
Definition: vtkType.h:363
#define VTK_DEPRECATED_IN_9_6_0(reason)
a simple class to control print indentation
Definition: vtkIndent.h:28
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
object to represent cell connectivity
Definition: vtkCellArray.h:177
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...