Viskores  1.0
Normalize.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_worklet_Normalize_h
19 #define viskores_worklet_Normalize_h
20 
22 
24 
25 namespace viskores
26 {
27 namespace worklet
28 {
29 
31 {
32 public:
34 
35  template <typename T, typename T2>
36  VISKORES_EXEC void operator()(const T& inValue, T2& outValue) const
37  {
38  outValue = viskores::Normal(inValue);
39  }
40 };
41 
43 {
44 public:
46 
47  template <typename T>
48  VISKORES_EXEC void operator()(T& value) const
49  {
50  viskores::Normalize(value);
51  }
52 };
53 }
54 } // namespace viskores::worklet
55 
56 #endif // viskores_worklet_Normalize_h
viskores::worklet::Normalize::ControlSignature
void(FieldInOut) ControlSignature
Definition: Normalize.h:45
viskores::Normal
T Normal(const T &x)
Returns a normalized version of the given vector.
Definition: VectorAnalysis.h:166
WorkletMapField.h
viskores::worklet::WorkletMapField::FieldIn
A control signature tag for input fields.
Definition: WorkletMapField.h:68
viskores::Normalize
void Normalize(T &x)
Changes a vector to be normal.
Definition: VectorAnalysis.h:177
viskores::worklet::WorkletMapField::FieldOut
A control signature tag for output fields.
Definition: WorkletMapField.h:88
viskores::worklet::Normalize::operator()
void operator()(T &value) const
Definition: Normalize.h:48
VectorAnalysis.h
viskores::worklet::Normal::operator()
void operator()(const T &inValue, T2 &outValue) const
Definition: Normalize.h:36
viskores::worklet::WorkletMapField::FieldInOut
A control signature tag for input-output (in-place) fields.
Definition: WorkletMapField.h:107
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores::worklet::Normalize
Definition: Normalize.h:42
viskores::worklet::Normal
Definition: Normalize.h:30
viskores::worklet::Normal::ControlSignature
void(FieldIn, FieldOut) ControlSignature
Definition: Normalize.h:33
viskores::worklet::WorkletMapField
Base class for worklets that do a simple mapping of field arrays.
Definition: WorkletMapField.h:47
VISKORES_EXEC
#define VISKORES_EXEC
Definition: ExportMacros.h:59