VTK-m  2.0
MapArrayPermutation.h
Go to the documentation of this file.
1 //============================================================================
2 // Copyright (c) Kitware, Inc.
3 // All rights reserved.
4 // See LICENSE.txt for details.
5 //
6 // This software is distributed WITHOUT ANY WARRANTY; without even
7 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8 // PURPOSE. See the above copyright notice for more information.
9 //============================================================================
10 #ifndef vtk_m_cont_internal_MapArrayPermutation_h
11 #define vtk_m_cont_internal_MapArrayPermutation_h
12 
15 
16 #include <vtkm/cont/vtkm_cont_export.h>
17 
18 namespace vtkm
19 {
20 namespace cont
21 {
22 namespace internal
23 {
24 
27 VTKM_CONT_EXPORT vtkm::cont::UnknownArrayHandle MapArrayPermutation(
28  const vtkm::cont::UnknownArrayHandle& inputArray,
29  const vtkm::cont::UnknownArrayHandle& permutation,
30  vtkm::Float64 invalidValue = vtkm::Nan64());
31 
34 template <typename T, typename S>
35 vtkm::cont::UnknownArrayHandle MapArrayPermutation(
38  inputArray,
39  vtkm::Float64 invalidValue = vtkm::Nan64())
40 {
43  input = inputArray;
44  return MapArrayPermutation(input.GetValueArray(), input.GetIndexArray(), invalidValue);
45 }
46 
47 }
48 }
49 } // namespace vtkm::cont::internal
50 
51 #endif //vtk_m_cont_internal_MapArrayPermutation_h
vtkm::cont::ArrayHandlePermutation::GetIndexArray
VTKM_CONT IndexArrayHandleType GetIndexArray() const
Definition: ArrayHandlePermutation.h:262
vtkm::cont::ArrayHandle
Manages an array-worth of data.
Definition: ArrayHandle.h:283
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::cont::UnknownArrayHandle
An ArrayHandle of an unknown value type and storage.
Definition: UnknownArrayHandle.h:406
vtkm::cont::StorageTagPermutation
Definition: ArrayHandlePermutation.h:93
UnknownArrayHandle.h
ArrayHandlePermutation.h
vtkm::cont::ArrayHandlePermutation
Implicitly permutes the values in an array.
Definition: ArrayHandlePermutation.h:227
vtkm::cont::ArrayHandlePermutation::GetValueArray
VTKM_CONT ValueArrayHandleType GetValueArray() const
Definition: ArrayHandlePermutation.h:267
vtkm::Float64
double Float64
Definition: Types.h:155