43 #ifdef OGDF_FME_KERNEL_USE_SSE
60 inline ComplexDouble(
float x,
float y) {
reg = _mm_cvtps_pd(_mm_setr_ps((x), (y), 0, 0)); }
82 __m128d b_t = _mm_shuffle_pd(other.
reg, other.
reg, _MM_SHUFFLE2(0, 1));
84 __m128d left = _mm_mul_pd(
reg, other.
reg);
86 __m128d right = _mm_mul_pd(
reg, b_t);
88 left = _mm_mul_pd(left, _mm_setr_pd(1.0, -1.0));
96 __m128d conj_reg = _mm_mul_pd(other.
reg, _mm_setr_pd(1.0, -1.0));
98 __m128d b_t = _mm_shuffle_pd(conj_reg, conj_reg, _MM_SHUFFLE2(0, 1));
100 __m128d left = _mm_mul_pd(
reg, conj_reg);
102 __m128d right = _mm_mul_pd(
reg, b_t);
104 left = _mm_mul_pd(left, _mm_setr_pd(1.0, -1.0));
106 __m128d product = _mm_hadd_pd(left, right);
109 __m128d ell = _mm_mul_pd(conj_reg, conj_reg);
111 ell = _mm_hadd_pd(ell, ell);
126 return ComplexDouble(_mm_mul_pd(
reg, _mm_setr_pd((
double)scalar, (
double)scalar)));
135 __m128d b_t = _mm_shuffle_pd(other.
reg, other.
reg, _MM_SHUFFLE2(0, 1));
137 __m128d left = _mm_mul_pd(
reg, other.
reg);
139 __m128d right = _mm_mul_pd(
reg, b_t);
141 left = _mm_mul_pd(left, _mm_setr_pd(1.0, -1.0));
143 reg = _mm_hadd_pd(left, right);
148 reg = _mm_mul_pd(
reg, _mm_setr_pd(scalar, scalar));
154 __m128d conj_reg = _mm_mul_pd(other.
reg, _mm_setr_pd(1.0, -1.0));
156 __m128d b_t = _mm_shuffle_pd(conj_reg, conj_reg, _MM_SHUFFLE2(0, 1));
158 __m128d left = _mm_mul_pd(
reg, conj_reg);
160 __m128d right = _mm_mul_pd(
reg, b_t);
162 left = _mm_mul_pd(left, _mm_setr_pd(1.0, -1.0));
164 __m128d product = _mm_hadd_pd(left, right);
166 __m128d ell = _mm_mul_pd(conj_reg, conj_reg);
168 ell = _mm_hadd_pd(ell, ell);
170 reg = _mm_div_pd(product, ell);
177 inline double length()
const {
180 __m128d
r = _mm_mul_pd(
reg,
reg);
181 r = _mm_hadd_pd(
r, _mm_setzero_pd());
182 r = _mm_sqrt_sd(
r,
r);
183 _mm_store_sd(&res,
r);
199 inline void operator=(
double* ptr) {
reg = _mm_load_pd(ptr); }
206 inline void load(
const double* ptr) {
reg = _mm_load_pd(ptr); }
212 inline void store(
double* ptr)
const { _mm_store_pd(ptr,
reg); }
268 return (*
this) * other.
conj() / (other.
reg[0] * other.
reg[0] + other.
reg[1] * other.
reg[1]);
351 inline void load(
const double* ptr) {
363 inline void store(
double* ptr)
const {