Loading [MathJax]/extensions/tex2jax.js
VTK  9.4.20250412
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
15#ifndef vtkConduitArrayUtilitiesDevice_h
16#define vtkConduitArrayUtilitiesDevice_h
17
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 "vtkm/cont/DeviceAdapterTag.h" // for vtkm::cont::DeviceAdapterId
25#include <string> // for std::string
26
27VTK_ABI_NAMESPACE_BEGIN
28class vtkCellArray;
29class vtkDataArray;
30
31class VTKIOCATALYSTCONDUIT_EXPORT vtkConduitArrayUtilitiesDevice : public vtkObject
32{
33public:
36 void PrintSelf(ostream& os, vtkIndent indent) override;
37
38 static vtkSmartPointer<vtkDataArray> MCArrayToVTKmAOSArray(const conduit_node* mcarray,
39 bool force_signed, const vtkm::cont::DeviceAdapterId& deviceAdapterId);
40 static vtkSmartPointer<vtkDataArray> MCArrayToVTKmSOAArray(const conduit_node* mcarray,
41 bool force_signed, const vtkm::cont::DeviceAdapterId& deviceAdapterId);
42 static bool IfVTKmConvertVTKMonoShapedCellArray(vtkIdType numberOfPoints, int cellType,
43 vtkIdType cellSize, vtkDataArray* connectivity, vtkCellArray* cellArray);
44 static bool IfVTKmConvertVTKMixedCellArray(vtkIdType numberOfPoints, vtkDataArray* offsets,
45 vtkDataArray* shapes, vtkDataArray* elements, vtkCellArray* cellArray);
46 static bool CanRunOn(const vtkm::cont::DeviceAdapterId& deviceAdapterId);
47
48protected:
51
52private:
54 void operator=(const vtkConduitArrayUtilitiesDevice&) = delete;
55};
56
57VTK_ABI_NAMESPACE_END
58
59#endif
object to represent cell connectivity
helper to convert Conduit arrays stored on acceleration devices to VTKm arrays.
static bool CanRunOn(const vtkm::cont::DeviceAdapterId &deviceAdapterId)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkConduitArrayUtilitiesDevice() override
static vtkConduitArrayUtilitiesDevice * New()
static bool IfVTKmConvertVTKMonoShapedCellArray(vtkIdType numberOfPoints, int cellType, vtkIdType cellSize, vtkDataArray *connectivity, vtkCellArray *cellArray)
static vtkSmartPointer< vtkDataArray > MCArrayToVTKmAOSArray(const conduit_node *mcarray, bool force_signed, const vtkm::cont::DeviceAdapterId &deviceAdapterId)
static vtkSmartPointer< vtkDataArray > MCArrayToVTKmSOAArray(const conduit_node *mcarray, bool force_signed, const vtkm::cont::DeviceAdapterId &deviceAdapterId)
static bool IfVTKmConvertVTKMixedCellArray(vtkIdType numberOfPoints, vtkDataArray *offsets, vtkDataArray *shapes, vtkDataArray *elements, vtkCellArray *cellArray)
abstract superclass for arrays of numeric data
a simple class to control print indentation
Definition vtkIndent.h:108
abstract base class for most VTK objects
Definition vtkObject.h:162
Hold a reference to a vtkObjectBase instance.
int vtkIdType
Definition vtkType.h:332