Arcane  v3.14.11.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
SimdSSEGenerated.h
1// WARNING: This file is generated. Do not edit.
2
3
4/*---------------------------------------------------------------------------*/
5/*---------------------------------------------------------------------------*/
6 // IsEmulated
7
8// Binary operation operator-
9inline SSESimdReal operator- (SSESimdReal a,SSESimdReal b)
10{
11 return SSESimdReal(
12 _mm_sub_pd (a.v0,b.v0)
13 , _mm_sub_pd (a.v1,b.v1)
14 );
15}
16
17inline SSESimdReal operator-(SSESimdReal a,Real b)
18{
19 return SSESimdReal(
20 _mm_sub_pd (a.v0,_mm_set1_pd(b))
21 , _mm_sub_pd (a.v1,_mm_set1_pd(b))
22 );
23}
24
25inline SSESimdReal operator-(Real b,SSESimdReal a)
26{
27 return SSESimdReal(
28 _mm_sub_pd (_mm_set1_pd(b), a.v0)
29 , _mm_sub_pd (_mm_set1_pd(b), a.v1)
30 );
31}
32// Binary operation operator+
33inline SSESimdReal operator+ (SSESimdReal a,SSESimdReal b)
34{
35 return SSESimdReal(
36 _mm_add_pd (a.v0,b.v0)
37 , _mm_add_pd (a.v1,b.v1)
38 );
39}
40
41inline SSESimdReal operator+(SSESimdReal a,Real b)
42{
43 return SSESimdReal(
44 _mm_add_pd (a.v0,_mm_set1_pd(b))
45 , _mm_add_pd (a.v1,_mm_set1_pd(b))
46 );
47}
48
49inline SSESimdReal operator+(Real b,SSESimdReal a)
50{
51 return SSESimdReal(
52 _mm_add_pd (_mm_set1_pd(b), a.v0)
53 , _mm_add_pd (_mm_set1_pd(b), a.v1)
54 );
55}
56// Binary operation operator*
57inline SSESimdReal operator* (SSESimdReal a,SSESimdReal b)
58{
59 return SSESimdReal(
60 _mm_mul_pd (a.v0,b.v0)
61 , _mm_mul_pd (a.v1,b.v1)
62 );
63}
64
65inline SSESimdReal operator*(SSESimdReal a,Real b)
66{
67 return SSESimdReal(
68 _mm_mul_pd (a.v0,_mm_set1_pd(b))
69 , _mm_mul_pd (a.v1,_mm_set1_pd(b))
70 );
71}
72
73inline SSESimdReal operator*(Real b,SSESimdReal a)
74{
75 return SSESimdReal(
76 _mm_mul_pd (_mm_set1_pd(b), a.v0)
77 , _mm_mul_pd (_mm_set1_pd(b), a.v1)
78 );
79}
80// Binary operation operator/
81inline SSESimdReal operator/ (SSESimdReal a,SSESimdReal b)
82{
83 return SSESimdReal(
84 _mm_div_pd (a.v0,b.v0)
85 , _mm_div_pd (a.v1,b.v1)
86 );
87}
88
89inline SSESimdReal operator/(SSESimdReal a,Real b)
90{
91 return SSESimdReal(
92 _mm_div_pd (a.v0,_mm_set1_pd(b))
93 , _mm_div_pd (a.v1,_mm_set1_pd(b))
94 );
95}
96
97inline SSESimdReal operator/(Real b,SSESimdReal a)
98{
99 return SSESimdReal(
100 _mm_div_pd (_mm_set1_pd(b), a.v0)
101 , _mm_div_pd (_mm_set1_pd(b), a.v1)
102 );
103}
104namespace math {
105// Binary operation min
106inline SSESimdReal min (SSESimdReal a,SSESimdReal b)
107{
108 return SSESimdReal(
109 _mm_min_pd (a.v0,b.v0)
110 , _mm_min_pd (a.v1,b.v1)
111 );
112}
113
114inline SSESimdReal min(SSESimdReal a,Real b)
115{
116 return SSESimdReal(
117 _mm_min_pd (a.v0,_mm_set1_pd(b))
118 , _mm_min_pd (a.v1,_mm_set1_pd(b))
119 );
120}
121
122inline SSESimdReal min(Real b,SSESimdReal a)
123{
124 return SSESimdReal(
125 _mm_min_pd (_mm_set1_pd(b), a.v0)
126 , _mm_min_pd (_mm_set1_pd(b), a.v1)
127 );
128}
129}
130namespace math {
131// Binary operation max
132inline SSESimdReal max (SSESimdReal a,SSESimdReal b)
133{
134 return SSESimdReal(
135 _mm_max_pd (a.v0,b.v0)
136 , _mm_max_pd (a.v1,b.v1)
137 );
138}
139
140inline SSESimdReal max(SSESimdReal a,Real b)
141{
142 return SSESimdReal(
143 _mm_max_pd (a.v0,_mm_set1_pd(b))
144 , _mm_max_pd (a.v1,_mm_set1_pd(b))
145 );
146}
147
148inline SSESimdReal max(Real b,SSESimdReal a)
149{
150 return SSESimdReal(
151 _mm_max_pd (_mm_set1_pd(b), a.v0)
152 , _mm_max_pd (_mm_set1_pd(b), a.v1)
153 );
154}
155}
156
157 // IsEmulated
158/*---------------------------------------------------------------------------*/
159/*---------------------------------------------------------------------------*/
160
161namespace math {
162// Unary operation sqrt
163inline SSESimdReal sqrt (SSESimdReal a)
164{
165 Real* za = (Real*)(&a);
166 return SSESimdReal::fromScalar(math::sqrt(za[0]),math::sqrt(za[1]),math::sqrt(za[2]),math::sqrt(za[3]));
167}
168}
169
170namespace math {
171// Unary operation exp
172inline SSESimdReal exp (SSESimdReal a)
173{
174 Real* za = (Real*)(&a);
175 return SSESimdReal::fromScalar(math::exp(za[0]),math::exp(za[1]),math::exp(za[2]),math::exp(za[3]));
176}
177}
178
179namespace math {
180// Unary operation log10
181inline SSESimdReal log10 (SSESimdReal a)
182{
183 Real* za = (Real*)(&a);
184 return SSESimdReal::fromScalar(math::log10(za[0]),math::log10(za[1]),math::log10(za[2]),math::log10(za[3]));
185}
186}
187
__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
SSESimdX4Real SSESimdReal
Vecteur de 'double' en implémentation par SSE.
Definition SimdSSE.h:346
Real2 operator/(const Real2Proxy &vec, Real sca)
Division par un scalaire.
Definition Real2Proxy.h:263
double Real
Type représentant un réel.