Skip to content
Snippets Groups Projects
Commit 9ec6cbd9 authored by Wiebe van Breukelen's avatar Wiebe van Breukelen
Browse files

Swapped radec2lmn::operator() remainder lmn indexing

parent 9bb73a49
No related branches found
No related tags found
2 merge requests!27Fix radec2lmn indexing,!24Fixed AVX2 support for radec2lmn.
...@@ -184,9 +184,9 @@ void radec2lmn::operator()(Arch, const Direction &reference, const C &ra, ...@@ -184,9 +184,9 @@ void radec2lmn::operator()(Arch, const Direction &reference, const C &ra,
double sin_dec = std::sin(dec[i]); double sin_dec = std::sin(dec[i]);
double cos_dec = std::cos(dec[i]); double cos_dec = std::cos(dec[i]);
lmn(i, 0) = cos_dec * sin_delta_ra; lmn(0, i) = cos_dec * sin_delta_ra;
lmn(i, 1) = sin_dec * cos_dec0 - cos_dec * sin_dec0 * cos_delta_ra; lmn(1, i) = sin_dec * cos_dec0 - cos_dec * sin_dec0 * cos_delta_ra;
lmn(i, 2) = sin_dec * sin_dec0 + cos_dec * cos_dec0 * cos_delta_ra; lmn(2, i) = sin_dec * sin_dec0 + cos_dec * cos_dec0 * cos_delta_ra;
} }
} }
...@@ -197,7 +197,7 @@ inline void Directions::radec2lmn<Directions::computation_strategy::MULTI_SIMD>( ...@@ -197,7 +197,7 @@ inline void Directions::radec2lmn<Directions::computation_strategy::MULTI_SIMD>(
const Direction &reference, xt::xtensor<double, 2> &lmn) { const Direction &reference, xt::xtensor<double, 2> &lmn) {
xt::xtensor<double, 2> lmn_tmp({3, ra.size()}); xt::xtensor<double, 2> lmn_tmp({3, ra.size()});
xsimd::dispatch(xsimd::radec2lmn{})(reference, ra, dec, lmn_tmp, xsimd::dispatch(xsimd::radec2lmn{})(reference, ra, dec, lmn_tmp,
xsimd::aligned_mode()); xsimd::unaligned_mode());
lmn = xt::transpose(lmn_tmp); lmn = xt::transpose(lmn_tmp);
} }
#endif #endif
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment