VTK-m  2.0
UnaryPredicates.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_UnaryPredicates_h
11 #define vtk_m_UnaryPredicates_h
12 
13 #include <vtkm/TypeTraits.h>
15 
16 namespace vtkm
17 {
18 
22 {
23  template <typename T>
24  VTKM_EXEC_CONT bool operator()(const T& x) const
25  {
27  }
28 };
29 
33 {
34  template <typename T>
35  VTKM_EXEC_CONT bool operator()(const T& x) const
36  {
38  }
39 };
40 
45 struct LogicalNot
46 {
47  template <typename T>
48  VTKM_EXEC_CONT bool operator()(const T& x) const
49  {
50  return !x;
51  }
52 };
53 
54 } // namespace vtkm
55 
56 #endif //vtk_m_UnaryPredicates_h
vtkm::NotZeroInitialized::operator()
VTKM_EXEC_CONT bool operator()(const T &x) const
Definition: UnaryPredicates.h:35
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::TypeTraits
The TypeTraits class provides helpful compile-time information about the basic types used in VTKm (an...
Definition: TypeTraits.h:61
VTKM_EXEC_CONT
#define VTKM_EXEC_CONT
Definition: ExportMacros.h:52
vtkm::LogicalNot
Predicate that takes a single argument x, and returns True if and only if x is false.
Definition: UnaryPredicates.h:45
vtkm::IsZeroInitialized
Predicate that takes a single argument x, and returns True if it is the identity of the Type T.
Definition: UnaryPredicates.h:21
ExportMacros.h
TypeTraits.h
vtkm::IsZeroInitialized::operator()
VTKM_EXEC_CONT bool operator()(const T &x) const
Definition: UnaryPredicates.h:24
vtkm::NotZeroInitialized
Predicate that takes a single argument x, and returns True if it isn't the identity of the Type T.
Definition: UnaryPredicates.h:32
vtkm::LogicalNot::operator()
VTKM_EXEC_CONT bool operator()(const T &x) const
Definition: UnaryPredicates.h:48