Skip to content

Commit

Permalink
Test manual AoSoA SIMD for 8 and 16 lanes
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber committed Jan 2, 2024
1 parent 40c07af commit c91c597
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion examples/nbody/nbody.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1630,14 +1630,21 @@ set y2tics auto
#endif
#ifdef HAVE_XSIMD
using Simd = xsimd::batch<FP>;
using Simd8 = xsimd::make_sized_batch_t<FP, 8>;
using Simd16 = xsimd::make_sized_batch_t<FP, 16>;
// for (auto innerLoopSimd : {false, true})
// for (auto tiled : {false, true})
// {
// if (innerLoopSimd && tiled)
// continue;
// r += manualAoSoA_SIMD::main<Simd>(plotFile, innerLoopSimd, tiled);
// }
finalPositions.push_back(manualAoSoASIMD::main<Simd>(plotFile, false, false));
if constexpr(Simd::size != 8 && Simd::size != 16)
finalPositions.push_back(manualAoSoASIMD::main<Simd>(plotFile, false, false));
if constexpr(!std::is_void_v<Simd8>)
finalPositions.push_back(manualAoSoASIMD::main<Simd8>(plotFile, false, false));
if constexpr(!std::is_void_v<Simd16>)
finalPositions.push_back(manualAoSoASIMD::main<Simd16>(plotFile, false, false));
// mp_for_each<mp_list_c<std::size_t, 1, 2, 4, 8, 16>>(
// [&](auto lanes)
// {
Expand Down

0 comments on commit c91c597

Please sign in to comment.