Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
simd
SIMDPack.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_SIMD_SIMDPACK_H_
36
#define _BLAZE_MATH_SIMD_SIMDPACK_H_
37
38
39
//*************************************************************************************************
40
// Includes
41
//*************************************************************************************************
42
43
#include <
blaze/system/Inline.h
>
44
45
46
namespace
blaze {
47
48
//=================================================================================================
49
//
50
// CLASS DEFINITION
51
//
52
//=================================================================================================
53
54
//*************************************************************************************************
62
template
<
typename
T >
// Type of the SIMD pack
63
class
SIMDPack
64
{
65
public
:
66
//**Conversion operators************************************************************************
69
[[deprecated]]
BLAZE_ALWAYS_INLINE
constexpr
T&
operator~
()
noexcept
;
70
[[deprecated]]
BLAZE_ALWAYS_INLINE
constexpr
const
T&
operator~
()
const
noexcept
;
71
72
constexpr
T&
operator*
()
noexcept
;
73
constexpr
const
T&
operator*
()
const
noexcept
;
75
//**********************************************************************************************
76
77
protected
:
78
//**Special member functions********************************************************************
81
SIMDPack() =
default
;
82
SIMDPack(
const
SIMDPack& ) =
default
;
83
SIMDPack( SIMDPack&& ) =
default
;
84
~SIMDPack() =
default
;
85
SIMDPack& operator=(
const
SIMDPack& ) =
default
;
86
SIMDPack& operator=( SIMDPack&& ) =
default
;
88
//**********************************************************************************************
89
};
90
//*************************************************************************************************
91
92
93
94
95
//=================================================================================================
96
//
97
// CONVERSION OPERATIONS
98
//
99
//=================================================================================================
100
101
//*************************************************************************************************
109
template
<
typename
T >
// Type of the SIMD pack
110
[[deprecated]]
BLAZE_ALWAYS_INLINE
constexpr
T&
SIMDPack<T>::operator~
() noexcept
111
{
112
return
static_cast<
T&
>
( *this );
113
}
114
//*************************************************************************************************
115
116
//*************************************************************************************************
124
template
<
typename
T >
// Type of the SIMD pack
125
[[deprecated]]
BLAZE_ALWAYS_INLINE
constexpr
const
T&
SIMDPack<T>::operator~
() const noexcept
126
{
127
return
static_cast<
const
T&
>
( *this );
128
}
129
//*************************************************************************************************
130
131
//*************************************************************************************************
139
template
<
typename
T >
// Type of the SIMD pack
140
BLAZE_ALWAYS_INLINE
constexpr
T&
SIMDPack<T>::operator*
() noexcept
141
{
142
return
static_cast<
T&
>
( *this );
143
}
144
//*************************************************************************************************
145
146
//*************************************************************************************************
154
template
<
typename
T >
// Type of the SIMD pack
155
BLAZE_ALWAYS_INLINE
constexpr
const
T&
SIMDPack<T>::operator*
() const noexcept
156
{
157
return
static_cast<
const
T&
>
( *this );
158
}
159
//*************************************************************************************************
160
161
162
163
164
//=================================================================================================
165
//
166
// GLOBAL FUNCTIONS
167
//
168
//=================================================================================================
169
170
//*************************************************************************************************
173
template
<
typename
T >
174
T&
crtp_cast
(
SIMDPack<T>
& pack );
175
176
template
<
typename
T >
177
const
T&
crtp_cast
(
const
SIMDPack<T>
& pack );
179
//*************************************************************************************************
180
181
182
//*************************************************************************************************
191
template
<
typename
T >
// Type of the SIMD pack
192
BLAZE_ALWAYS_INLINE
T&
crtp_cast
(
SIMDPack<T>
& pack )
193
{
194
return
*pack;
195
}
196
//*************************************************************************************************
197
198
199
//*************************************************************************************************
208
template
<
typename
T >
// Type of the SIMD pack
209
BLAZE_ALWAYS_INLINE
const
T&
crtp_cast
(
const
SIMDPack<T>
& pack )
210
{
211
return
*pack;
212
}
213
//*************************************************************************************************
214
215
}
// namespace blaze
216
217
#endif
blaze::SIMDPack
Base class for all SIMD data types.
Definition
SIMDPack.h:64
blaze::SIMDPack::operator~
BLAZE_ALWAYS_INLINE constexpr T & operator~() noexcept
Conversion operator for non-constant SIMD packs.
Definition
SIMDPack.h:110
blaze::SIMDPack::operator*
constexpr T & operator*() noexcept
Conversion operator for non-constant SIMD packs.
Definition
SIMDPack.h:140
blaze::crtp_cast
MT & crtp_cast(Matrix< MT, SO > &matrix)
CRTP-based conversion operation for non-constant matrices.
Definition
Matrix.h:479
BLAZE_ALWAYS_INLINE
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition
Inline.h:85
Inline.h
System settings for the inline keywords.
Generated by
1.18.0