24 T *CORRELATION_RESTRICT out_dsq)
noexcept {
25#ifdef CORRELATION_SIMD_AVX512
26 detail::avx512::computeDsqBlock(ref_x, ref_y, ref_z, block, out_dsq);
27#elifdef CORRELATION_SIMD_AVX2
39template <
typename AtomRange,
typename T = real_t>
41 if (params.atoms ==
nullptr || params.x_s ==
nullptr || params.y_s ==
nullptr ||
42 params.z_s ==
nullptr) {
45 const std::size_t count = params.end_idx - params.begin_idx;
46 params.x_s->resize(count);
47 params.y_s->resize(count);
48 params.z_s->resize(count);
49 for (std::size_t idx = 0; idx < count; ++idx) {
50 const auto &pos = (*params.atoms)[params.begin_idx + idx].position();
51 (*params.x_s)[idx] =
static_cast<T
>(pos.x());
52 (*params.y_s)[idx] =
static_cast<T
>(pos.y());
53 (*params.z_s)[idx] =
static_cast<T
>(pos.z());
Low-level AVX2 intrinsic kernel implementations.
Low-level AVX-512 intrinsic kernel implementations.
Common parameter containers, POD types, and scalar helpers for SIMD operations.
Low-level Scalar fallback kernel implementations.
void computeDsqBlock(float ref_x, float ref_y, float ref_z, const PositionBlockT< float > &block, float *out_dsq) noexcept
Definition AVX2Kernels.hpp:21
void computeDsqBlock(float ref_x, float ref_y, float ref_z, const PositionBlockT< float > &block, float *out_dsq) noexcept
Definition ScalarKernels.hpp:17
Defines universal mathematical and physical constants.
std::size_t fillPositionBlock(const FillPositionBlockParams< AtomRange, T > ¶ms) noexcept
Populates vectors with standard atom block positions for SIMD.
Definition SIMDDistance.hpp:40
void computeDsqBlock(T ref_x, T ref_y, T ref_z, const PositionBlockT< T > &block, T *out_dsq) noexcept
Computes squared distances from a reference point to a SoA block of positions.
Definition SIMDDistance.hpp:23
Parameter container for fillPositionBlock kernel invocations.
Definition SIMDTypes.hpp:145
Represents a Structure of Arrays (SoA) block of atom positions for SIMD processing.
Definition SIMDTypes.hpp:27