Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
functors
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
43
#include <utility>
44
#include <
blaze/math/constraints/SIMDPack.h
>
45
#include <
blaze/system/HostDevice.h
>
46
#include <
blaze/system/Inline.h
>
47
48
49
namespace
blaze {
50
51
//=================================================================================================
52
//
53
// CLASS DEFINITION
54
//
55
//=================================================================================================
56
57
//*************************************************************************************************
61
struct
Noop
62
{
63
//**********************************************************************************************
69
template
<
typename
T >
70
BLAZE_ALWAYS_INLINE
BLAZE_DEVICE_CALLABLE
decltype
(
auto
)
operator
()( T&& a )
const
71
{
72
return
std::forward<T>( a );
73
}
74
//**********************************************************************************************
75
76
//**********************************************************************************************
81
template
<
typename
T >
82
static
constexpr
bool
simdEnabled
() {
return
true
; }
83
//**********************************************************************************************
84
85
//**********************************************************************************************
90
static
constexpr
bool
paddingEnabled
() {
return
true
; }
91
//**********************************************************************************************
92
93
//**********************************************************************************************
99
template
<
typename
T >
100
BLAZE_ALWAYS_INLINE
decltype
(
auto
)
load
(
const
T& a )
const
101
{
102
BLAZE_CONSTRAINT_MUST_BE_SIMD_PACK
( T );
103
return
a;
104
}
105
//**********************************************************************************************
106
};
107
//*************************************************************************************************
108
109
}
// namespace blaze
110
111
#endif
HostDevice.h
Macro for CUDA compatibility.
SIMDPack.h
Constraint on the data type.
BLAZE_CONSTRAINT_MUST_BE_SIMD_PACK
#define BLAZE_CONSTRAINT_MUST_BE_SIMD_PACK(T)
Constraint on the data type.
Definition
SIMDPack.h:60
BLAZE_ALWAYS_INLINE
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition
Inline.h:85
BLAZE_DEVICE_CALLABLE
#define BLAZE_DEVICE_CALLABLE
Conditional macro that sets host and device attributes when compiled with CUDA.
Definition
HostDevice.h:94
blaze::Noop
Generic wrapper for the null function.
Definition
Noop.h:62
blaze::Noop::paddingEnabled
static constexpr bool paddingEnabled()
Returns whether the operation supports padding, i.e. whether it can deal with zeros.
Definition
Noop.h:90
blaze::Noop::simdEnabled
static constexpr bool simdEnabled()
Returns whether SIMD is enabled for the specified data type T.
Definition
Noop.h:82
blaze::Noop::load
BLAZE_ALWAYS_INLINE decltype(auto) load(const T &a) const
Returns the given SIMD vector without modifications.
Definition
Noop.h:100
Inline.h
System settings for the inline keywords.
Generated by
1.18.0