Viskores  1.0
UnaryPredicates.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_UnaryPredicates_h
19 #define viskores_UnaryPredicates_h
20 
21 #include <viskores/TypeTraits.h>
23 
24 namespace viskores
25 {
26 
30 {
31  template <typename T>
32  VISKORES_EXEC_CONT bool operator()(const T& x) const
33  {
35  }
36 };
37 
41 {
42  template <typename T>
43  VISKORES_EXEC_CONT bool operator()(const T& x) const
44  {
46  }
47 };
48 
53 struct LogicalNot
54 {
55  template <typename T>
56  VISKORES_EXEC_CONT bool operator()(const T& x) const
57  {
58  return !x;
59  }
60 };
61 
62 } // namespace viskores
63 
64 #endif //viskores_UnaryPredicates_h
viskores::LogicalNot
Predicate that takes a single argument x, and returns True if and only if x is false.
Definition: UnaryPredicates.h:53
VISKORES_EXEC_CONT
#define VISKORES_EXEC_CONT
Definition: ExportMacros.h:60
ExportMacros.h
TypeTraits.h
viskores::TypeTraits
The TypeTraits class provides helpful compile-time information about the basic types used in Viskores...
Definition: TypeTraits.h:69
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores::NotZeroInitialized
Predicate that takes a single argument x, and returns True if it isn't the identity of the Type T.
Definition: UnaryPredicates.h:40
viskores::IsZeroInitialized::operator()
bool operator()(const T &x) const
Definition: UnaryPredicates.h:32
viskores::NotZeroInitialized::operator()
bool operator()(const T &x) const
Definition: UnaryPredicates.h:43
viskores::IsZeroInitialized
Predicate that takes a single argument x, and returns True if it is the identity of the Type T.
Definition: UnaryPredicates.h:29
viskores::LogicalNot::operator()
bool operator()(const T &x) const
Definition: UnaryPredicates.h:56