Viskores  1.0
MapArrayPermutation.h
Go to the documentation of this file.
1 //============================================================================
2 // The contents of this file are covered by the Viskores license. See
3 // LICENSE.txt for details.
4 //
5 // By contributing to this file, all contributors agree to the Developer
6 // Certificate of Origin Version 1.1 (DCO 1.1) as stated in DCO.txt.
7 //============================================================================
8 
9 //============================================================================
10 // Copyright (c) Kitware, Inc.
11 // All rights reserved.
12 // See LICENSE.txt for details.
13 //
14 // This software is distributed WITHOUT ANY WARRANTY; without even
15 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 // PURPOSE. See the above copyright notice for more information.
17 //============================================================================
18 #ifndef viskores_cont_internal_MapArrayPermutation_h
19 #define viskores_cont_internal_MapArrayPermutation_h
20 
23 
25 
26 namespace viskores
27 {
28 namespace cont
29 {
30 namespace internal
31 {
32 
35 VISKORES_CONT_EXPORT viskores::cont::UnknownArrayHandle MapArrayPermutation(
36  const viskores::cont::UnknownArrayHandle& inputArray,
37  const viskores::cont::UnknownArrayHandle& permutation,
38  viskores::Float64 invalidValue = viskores::Nan64());
39 
42 template <typename T, typename S>
43 viskores::cont::UnknownArrayHandle MapArrayPermutation(
45  T,
47  viskores::Float64 invalidValue = viskores::Nan64())
48 {
51  input = inputArray;
52  return MapArrayPermutation(input.GetValueArray(), input.GetIndexArray(), invalidValue);
53 }
54 
55 }
56 }
57 } // namespace viskores::cont::internal
58 
59 #endif //viskores_cont_internal_MapArrayPermutation_h
viskores::cont::ArrayHandle
Manages an array-worth of data.
Definition: ArrayHandle.h:313
viskores::cont::ArrayHandlePermutation::GetIndexArray
IndexArrayHandleType GetIndexArray() const
Return the array used for indices.
Definition: ArrayHandlePermutation.h:279
viskores::cont::ArrayHandlePermutation::GetValueArray
ValueArrayHandleType GetValueArray() const
Return the array used for values.
Definition: ArrayHandlePermutation.h:289
UnknownArrayHandle.h
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
ArrayHandlePermutation.h
viskores::cont::StorageTagPermutation
Definition: ArrayHandlePermutation.h:101
viskores::cont::UnknownArrayHandle
An ArrayHandle of an unknown value type and storage.
Definition: UnknownArrayHandle.h:451
viskores::Float64
double Float64
Base type to use for 64-bit floating-point numbers.
Definition: Types.h:169
viskores::cont::ArrayHandlePermutation
Implicitly permutes the values in an array.
Definition: ArrayHandlePermutation.h:242
viskores_cont_export.h