POSIX Shared Memory Data Structures 1.0
High-performance lock-free data structures for inter-process communication
|
SIMD-optimized utilities for simulation workloads. More...
#include <immintrin.h>
#include <cstddef>
#include <span>
#include <algorithm>
#include "shm_array.h"
Go to the source code of this file.
Classes | |
class | shm_simd::SimdArray< TableType > |
Helper class for SIMD operations on shm_array. More... | |
Namespaces | |
namespace | shm_simd |
Functions | |
bool | shm_simd::is_aligned (const void *ptr, size_t alignment) noexcept |
Check if pointer is aligned to boundary. | |
float | shm_simd::sum_floats (const float *data, size_t count) noexcept |
Vectorized sum of float array using AVX2. | |
float | shm_simd::dot_product (const float *a, const float *b, size_t count) noexcept |
Vectorized dot product of two float arrays. | |
void | shm_simd::scale_floats (float *data, size_t count, float scale) noexcept |
Vectorized array scaling (multiply by scalar) | |
void | shm_simd::fma_floats (const float *a, const float *b, const float *c, float *result, size_t count) noexcept |
Vectorized FMA operation: result = a * b + c. | |
float | shm_simd::min_float (const float *data, size_t count) noexcept |
Find minimum value in float array. | |
float | shm_simd::max_float (const float *data, size_t count) noexcept |
Find maximum value in float array. | |
template<int distance = 1> | |
void | shm_simd::prefetch_read (const void *ptr) noexcept |
Prefetch data for read. | |
void | shm_simd::prefetch_write (void *ptr) noexcept |
Prefetch data for write. | |
void | shm_simd::stream_store_floats (float *dest, const float *src, size_t count) noexcept |
Stream store (bypass cache) for large arrays. | |
SIMD-optimized utilities for simulation workloads.
Provides SIMD-friendly operations for common simulation patterns. Requires C++23 and x86-64 with AVX2 or better.
Definition in file shm_simd_utils.h.