12#ifndef ARCANE_SIMDMATHUTILS_H
13#define ARCANE_SIMDMATHUTILS_H
17#include "arcane/utils/SimdOperation.h"
35 u.y * v.z - u.z * v.y,
36 u.z * v.x - u.x * v.z,
37 u.x * v.y - u.y * v.x);
46 return (u.x * v.y - u.y * v.x);
52 return SimdReal(u.x * v.x + u.y * v.y + u.z * v.z);
56dot(
const SimdReal2& u,
const SimdReal2& v)
58 return SimdReal(u.x * v.x + u.y * v.y);
61ARCCORE_DEPRECATED_2021(
"Use normL2() instead")
63abs(const SimdReal3& sr)
68 Real3 r(sr.x[si], sr.y[si], sr.z[si]);
74ARCCORE_DEPRECATED_2021(
"Use normL2() instead")
76abs(const SimdReal2& sr)
81 Real2 r(sr.x[si], sr.y[si]);
88normL2(
const SimdReal3& sr)
93 Real3 r(sr.x[si], sr.y[si], sr.z[si]);
100normL2(
const SimdReal2& sr)
105 Real2 r(sr.x[si], sr.y[si]);
140 t.x.x * v.x.y + t.x.y * v.y.y + t.x.z * v.z.y,
141 t.x.x * v.x.z + t.x.y * v.y.z + t.x.z * v.z.z),
142 SimdReal3(t.y.x * v.x.x + t.y.y * v.y.x + t.y.z * v.z.x,
143 t.y.x * v.x.y + t.y.y * v.y.y + t.y.z * v.z.y,
144 t.y.x * v.x.z + t.y.y * v.y.z + t.y.z * v.z.z),
145 SimdReal3(t.z.x * v.x.x + t.z.y * v.y.x + t.z.z * v.z.x,
146 t.z.x * v.x.y + t.z.y * v.y.y + t.z.z * v.z.y,
147 t.z.x * v.x.z + t.z.y * v.y.z + t.z.z * v.z.z));
Represents a vectorized Real2.
Represents a vectorized Real2x2.
Represents a vectorized Real3.
Represents a vectorized Real3x3.
SimdInfo::SimdReal SimdReal
SIMD vector of real numbers.
#define ENUMERATE_SIMD_REAL(_iter)
Macro to iterate over the indices of a SIMD real or derived vector (Real2, Real3, ....
__host__ __device__ Real dot(Real2 u, Real2 v)
Dot product of u by v in .
__host__ __device__ Real2 min(Real2 a, Real2 b)
Returns the minimum of two Real2.
T max(const T &a, const T &b, const T &c)
Returns the maximum of three elements.
__host__ __device__ Real cross2D(Real3 u, Real3 v)
Vector cross product of u by v in .
__host__ __device__ Real3 cross(Real3 v1, Real3 v2)
Cross product of two 3-component vectors.
Real3x3 prodTens(Real3 u, Real3 v)
Tensor product of two Real3 vectors.
__host__ __device__ Real3x3 matrixProduct(const Real3x3 &t, const Real3x3 &v)
Matrix-matrix product between two tensors.
__host__ __device__ Real mixteMul(Real3 u, Real3 v, Real3 w)
Mixed product of u, v and w.
__host__ __device__ Real3x3 matrixTranspose(const Real3x3 &t)
Transpose the matrix.
Namespace for mathematical functions.