Arcane  v3.14.10.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
SimdAVX512Generated.h
1// WARNING: This file is generated. Do not edit.
2
3
4/*---------------------------------------------------------------------------*/
5/*---------------------------------------------------------------------------*/
6 // IsEmulated
7
8// Binary operation operator-
9inline AVX512SimdReal operator- (AVX512SimdReal a,AVX512SimdReal b)
10{
11 return AVX512SimdReal(
12 _mm512_sub_pd (a.v0,b.v0)
13 );
14}
15
16inline AVX512SimdReal operator-(AVX512SimdReal a,Real b)
17{
18 return AVX512SimdReal(
19 _mm512_sub_pd (a.v0,_mm512_set1_pd(b))
20 );
21}
22
23inline AVX512SimdReal operator-(Real b,AVX512SimdReal a)
24{
25 return AVX512SimdReal(
26 _mm512_sub_pd (_mm512_set1_pd(b), a.v0)
27 );
28}
29// Binary operation operator+
30inline AVX512SimdReal operator+ (AVX512SimdReal a,AVX512SimdReal b)
31{
32 return AVX512SimdReal(
33 _mm512_add_pd (a.v0,b.v0)
34 );
35}
36
37inline AVX512SimdReal operator+(AVX512SimdReal a,Real b)
38{
39 return AVX512SimdReal(
40 _mm512_add_pd (a.v0,_mm512_set1_pd(b))
41 );
42}
43
44inline AVX512SimdReal operator+(Real b,AVX512SimdReal a)
45{
46 return AVX512SimdReal(
47 _mm512_add_pd (_mm512_set1_pd(b), a.v0)
48 );
49}
50// Binary operation operator*
51inline AVX512SimdReal operator* (AVX512SimdReal a,AVX512SimdReal b)
52{
53 return AVX512SimdReal(
54 _mm512_mul_pd (a.v0,b.v0)
55 );
56}
57
58inline AVX512SimdReal operator*(AVX512SimdReal a,Real b)
59{
60 return AVX512SimdReal(
61 _mm512_mul_pd (a.v0,_mm512_set1_pd(b))
62 );
63}
64
65inline AVX512SimdReal operator*(Real b,AVX512SimdReal a)
66{
67 return AVX512SimdReal(
68 _mm512_mul_pd (_mm512_set1_pd(b), a.v0)
69 );
70}
71// Binary operation operator/
72inline AVX512SimdReal operator/ (AVX512SimdReal a,AVX512SimdReal b)
73{
74 return AVX512SimdReal(
75 _mm512_div_pd (a.v0,b.v0)
76 );
77}
78
79inline AVX512SimdReal operator/(AVX512SimdReal a,Real b)
80{
81 return AVX512SimdReal(
82 _mm512_div_pd (a.v0,_mm512_set1_pd(b))
83 );
84}
85
86inline AVX512SimdReal operator/(Real b,AVX512SimdReal a)
87{
88 return AVX512SimdReal(
89 _mm512_div_pd (_mm512_set1_pd(b), a.v0)
90 );
91}
92namespace math {
93// Binary operation min
94inline AVX512SimdReal min (AVX512SimdReal a,AVX512SimdReal b)
95{
96 return AVX512SimdReal(
97 _mm512_min_pd (a.v0,b.v0)
98 );
99}
100
101inline AVX512SimdReal min(AVX512SimdReal a,Real b)
102{
103 return AVX512SimdReal(
104 _mm512_min_pd (a.v0,_mm512_set1_pd(b))
105 );
106}
107
108inline AVX512SimdReal min(Real b,AVX512SimdReal a)
109{
110 return AVX512SimdReal(
111 _mm512_min_pd (_mm512_set1_pd(b), a.v0)
112 );
113}
114}
115namespace math {
116// Binary operation max
117inline AVX512SimdReal max (AVX512SimdReal a,AVX512SimdReal b)
118{
119 return AVX512SimdReal(
120 _mm512_max_pd (a.v0,b.v0)
121 );
122}
123
124inline AVX512SimdReal max(AVX512SimdReal a,Real b)
125{
126 return AVX512SimdReal(
127 _mm512_max_pd (a.v0,_mm512_set1_pd(b))
128 );
129}
130
131inline AVX512SimdReal max(Real b,AVX512SimdReal a)
132{
133 return AVX512SimdReal(
134 _mm512_max_pd (_mm512_set1_pd(b), a.v0)
135 );
136}
137}
138
139 // IsEmulated
140/*---------------------------------------------------------------------------*/
141/*---------------------------------------------------------------------------*/
142
143namespace math {
144// Unary operation sqrt
145inline AVX512SimdReal sqrt (AVX512SimdReal a)
146{
147 return AVX512SimdReal(_mm512_sqrt_pd(a.v0));
148}
149}
150
151namespace math {
152// Unary operation exp
153inline AVX512SimdReal exp (AVX512SimdReal a)
154{
155 Real* za = (Real*)(&a);
156 return AVX512SimdReal::fromScalar(math::exp(za[0]),math::exp(za[1]),math::exp(za[2]),math::exp(za[3]),math::exp(za[4]),math::exp(za[5]),math::exp(za[6]),math::exp(za[7]));
157}
158}
159
160namespace math {
161// Unary operation log10
162inline AVX512SimdReal log10 (AVX512SimdReal a)
163{
164 Real* za = (Real*)(&a);
165 return AVX512SimdReal::fromScalar(math::log10(za[0]),math::log10(za[1]),math::log10(za[2]),math::log10(za[3]),math::log10(za[4]),math::log10(za[5]),math::log10(za[6]),math::log10(za[7]));
166}
167}
168
__host__ __device__ Real2 min(Real2 a, Real2 b)
Retourne le minimum de deux Real2.
Definition MathUtils.h:336
T max(const T &a, const T &b, const T &c)
Retourne le maximum de trois éléments.
Definition MathUtils.h:392
__host__ __device__ double sqrt(double v)
Racine carrée de v.
Definition Math.h:135
__host__ __device__ double log10(double v)
Logarithme décimal de v.
Definition Math.h:68
__host__ __device__ double exp(double v)
Exponentielle de v.
Definition Math.h:116
Real2 operator*(Real sca, const Real2Proxy &vec)
Multiplication par un scalaire.
Definition Real2Proxy.h:241
Real2 operator/(const Real2Proxy &vec, Real sca)
Division par un scalaire.
Definition Real2Proxy.h:263
double Real
Type représentant un réel.