Blaze  3.6
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 
45 #include <blaze/system/Inline.h>
46 
47 
48 namespace blaze {
49 
50 //=================================================================================================
51 //
52 // CLASS DEFINITION
53 //
54 //=================================================================================================
55 
56 //*************************************************************************************************
60 struct Noop
61 {
62  //**********************************************************************************************
68  template< typename T >
69  BLAZE_ALWAYS_INLINE BLAZE_DEVICE_CALLABLE decltype(auto) operator()( const T& a ) const
70  {
71  return a;
72  }
73  //**********************************************************************************************
74 
75  //**********************************************************************************************
80  template< typename T >
81  static constexpr bool simdEnabled() { return true; }
82  //**********************************************************************************************
83 
84  //**********************************************************************************************
89  static constexpr bool paddingEnabled() { return true; }
90  //**********************************************************************************************
91 
92  //**********************************************************************************************
98  template< typename T >
99  BLAZE_ALWAYS_INLINE decltype(auto) load( const T& a ) const
100  {
102  return a;
103  }
104  //**********************************************************************************************
105 };
106 //*************************************************************************************************
107 
108 } // namespace blaze
109 
110 #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
static constexpr bool paddingEnabled()
Returns whether the operation supports padding, i.e. whether it can deal with zeros.
Definition: Noop.h:89
Generic wrapper for the null function.
Definition: Noop.h:60
Constraint on the data type.
static constexpr bool simdEnabled()
Returns whether SIMD is enabled for the specified data type T.
Definition: Noop.h:81
decltype(auto) BLAZE_ALWAYS_INLINE load(const T &a) const
Returns the given SIMD vector without modifications.
Definition: Noop.h:99
Macro for CUDA compatibility.
#define BLAZE_DEVICE_CALLABLE
Conditional macro that sets host and device attributes when compiled with CUDA.
Definition: HostDevice.h:94
System settings for the inline keywords.