Arcane  v3.14.10.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
SimdEMULGenerated.h
1// WARNING: This file is generated. Do not edit.
2
3
4/*---------------------------------------------------------------------------*/
5/*---------------------------------------------------------------------------*/
6
7// Emulated Binary operation operator-
8inline EMULSimdReal operator- (EMULSimdReal a,EMULSimdReal b)
9{
10 return EMULSimdReal::fromScalar(a.v0 - b.v0,a.v1 - b.v1);
11}
12
13inline EMULSimdReal operator-(EMULSimdReal a,Real b)
14{
15 return EMULSimdReal::fromScalar(a.v0 - b,a.v1 - b);
16}
17
18inline EMULSimdReal operator-(Real a,EMULSimdReal b)
19{
20 return EMULSimdReal::fromScalar(a - b.v0,a - b.v1);
21}
22// Emulated Binary operation operator+
23inline EMULSimdReal operator+ (EMULSimdReal a,EMULSimdReal b)
24{
25 return EMULSimdReal::fromScalar(a.v0 + b.v0,a.v1 + b.v1);
26}
27
28inline EMULSimdReal operator+(EMULSimdReal a,Real b)
29{
30 return EMULSimdReal::fromScalar(a.v0 + b,a.v1 + b);
31}
32
33inline EMULSimdReal operator+(Real a,EMULSimdReal b)
34{
35 return EMULSimdReal::fromScalar(a + b.v0,a + b.v1);
36}
37// Emulated Binary operation operator*
38inline EMULSimdReal operator* (EMULSimdReal a,EMULSimdReal b)
39{
40 return EMULSimdReal::fromScalar(a.v0 * b.v0,a.v1 * b.v1);
41}
42
43inline EMULSimdReal operator*(EMULSimdReal a,Real b)
44{
45 return EMULSimdReal::fromScalar(a.v0 * b,a.v1 * b);
46}
47
48inline EMULSimdReal operator*(Real a,EMULSimdReal b)
49{
50 return EMULSimdReal::fromScalar(a * b.v0,a * b.v1);
51}
52// Emulated Binary operation operator/
53inline EMULSimdReal operator/ (EMULSimdReal a,EMULSimdReal b)
54{
55 return EMULSimdReal::fromScalar(a.v0 / b.v0,a.v1 / b.v1);
56}
57
58inline EMULSimdReal operator/(EMULSimdReal a,Real b)
59{
60 return EMULSimdReal::fromScalar(a.v0 / b,a.v1 / b);
61}
62
63inline EMULSimdReal operator/(Real a,EMULSimdReal b)
64{
65 return EMULSimdReal::fromScalar(a / b.v0,a / b.v1);
66}
67namespace math {
68// Emulated Binary operation min
69inline EMULSimdReal min (EMULSimdReal a,EMULSimdReal b)
70{
71 return EMULSimdReal::fromScalar(min(a.v0,b.v0),min(a.v1,b.v1));
72}
73
74inline EMULSimdReal min(EMULSimdReal a,Real b)
75{
76 return EMULSimdReal::fromScalar(min(a.v0,b),min(a.v1,b));
77}
78
79inline EMULSimdReal min(Real a,EMULSimdReal b)
80{
81 return EMULSimdReal::fromScalar(min(a,b.v0),min(a,b.v1));
82}
83}
84namespace math {
85// Emulated Binary operation max
86inline EMULSimdReal max (EMULSimdReal a,EMULSimdReal b)
87{
88 return EMULSimdReal::fromScalar(max(a.v0,b.v0),max(a.v1,b.v1));
89}
90
91inline EMULSimdReal max(EMULSimdReal a,Real b)
92{
93 return EMULSimdReal::fromScalar(max(a.v0,b),max(a.v1,b));
94}
95
96inline EMULSimdReal max(Real a,EMULSimdReal b)
97{
98 return EMULSimdReal::fromScalar(max(a,b.v0),max(a,b.v1));
99}
100}
101
102 // IsEmulated
103/*---------------------------------------------------------------------------*/
104/*---------------------------------------------------------------------------*/
105
106namespace math {
107// Unary operation sqrt
108inline EMULSimdReal sqrt (EMULSimdReal a)
109{
110 Real* za = (Real*)(&a);
111 return EMULSimdReal::fromScalar(math::sqrt(za[0]),math::sqrt(za[1]));
112}
113}
114
115namespace math {
116// Unary operation exp
117inline EMULSimdReal exp (EMULSimdReal a)
118{
119 Real* za = (Real*)(&a);
120 return EMULSimdReal::fromScalar(math::exp(za[0]),math::exp(za[1]));
121}
122}
123
124namespace math {
125// Unary operation log10
126inline EMULSimdReal log10 (EMULSimdReal a)
127{
128 Real* za = (Real*)(&a);
129 return EMULSimdReal::fromScalar(math::log10(za[0]),math::log10(za[1]));
130}
131}
132
__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.