Noop.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_FUNCTORS_NOOP_H_
36 #define _BLAZE_MATH_FUNCTORS_NOOP_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
44 #include <blaze/system/Inline.h>
45 
46 
47 namespace blaze {
48 
49 //=================================================================================================
50 //
51 // CLASS DEFINITION
52 //
53 //=================================================================================================
54 
55 //*************************************************************************************************
59 struct Noop
60 {
61  //**********************************************************************************************
64  explicit inline Noop()
65  {}
66  //**********************************************************************************************
67 
68  //**********************************************************************************************
74  template< typename T >
75  BLAZE_ALWAYS_INLINE decltype(auto) operator()( const T& a ) const
76  {
77  return a;
78  }
79  //**********************************************************************************************
80 
81  //**********************************************************************************************
86  template< typename T >
87  static constexpr bool simdEnabled() { return true; }
88  //**********************************************************************************************
89 
90  //**********************************************************************************************
96  template< typename T >
97  BLAZE_ALWAYS_INLINE decltype(auto) load( const T& a ) const
98  {
100  return a;
101  }
102  //**********************************************************************************************
103 };
104 //*************************************************************************************************
105 
106 } // namespace blaze
107 
108 #endif
#define BLAZE_CONSTRAINT_MUST_BE_SIMD_PACK(T)
Constraint on the data type.In case the given data type T is not a SIMD pack, a compilation error is ...
Definition: SIMDPack.h:60
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
Generic wrapper for the null function.
Definition: Noop.h:59
Constraint on the data type.
static constexpr bool simdEnabled()
Returns whether SIMD is enabled for the specified data type T.
Definition: Noop.h:87
decltype(auto) BLAZE_ALWAYS_INLINE load(const T &a) const
Returns the given SIMD vector without modifications.
Definition: Noop.h:97
Noop()
Default constructor of the Noop functor.
Definition: Noop.h:64
System settings for the inline keywords.