VTK  9.5.20251217
vtkmDataArrayUtilities.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright (c) Kitware, Inc.
3// SPDX-FileCopyrightText: Copyright 2019 Sandia Corporation.
4// SPDX-FileCopyrightText: Copyright 2019 UT-Battelle, LLC.
5// SPDX-FileCopyrightText: Copyright 2019 Los Alamos National Security.
6// SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-LANL-USGov
14
15#ifndef vtkmDataArrayUtilities_h
16#define vtkmDataArrayUtilities_h
17
18#include "vtkAcceleratorsVTKmCoreModule.h"
19#include <cstdint> // for int8_t
20
21VTK_ABI_NAMESPACE_BEGIN
22class VTKACCELERATORSVTKMCORE_EXPORT vtkmDataArrayUtilities
23{
24public:
28 static bool IsDeviceAdapterAvailable(int8_t deviceAdapterId);
29
38 static bool IsDevicePointer(const void* ptr, int8_t& deviceAdapterId);
39
43 static bool IsCudaDevicePointer(const void* ptr);
44
48 static bool IsHipDevicePointer(const void* ptr);
49};
50
51VTK_ABI_NAMESPACE_END
52#endif
Utility functions for working with Viskores device arrays.
static bool IsDevicePointer(const void *ptr, int8_t &deviceAdapterId)
Get if the pointer is a device pointer and the device adapter id, which can one of the following valu...
static bool IsCudaDevicePointer(const void *ptr)
Check if the pointer is a CUDA device pointer.
static bool IsDeviceAdapterAvailable(int8_t deviceAdapterId)
Check if a Viskores device adapter is available to use.
static bool IsHipDevicePointer(const void *ptr)
Check if the pointer is a HIP device pointer.