POSIX Shared Memory Data Structures 1.0
High-performance lock-free data structures for inter-process communication
Loading...
Searching...
No Matches
shm_simd::SimdArray< TableType > Class Template Reference

Helper class for SIMD operations on shm_array. More...

#include <shm_simd_utils.h>

Public Member Functions

 SimdArray (shm_array< float, TableType > &array)
 
float sum () const noexcept
 
float min () const noexcept
 
float max () const noexcept
 
void scale (float factor) noexcept
 
float dot (const shm_array< float, TableType > &other) const noexcept
 

Detailed Description

template<typename TableType = shm_table>
class shm_simd::SimdArray< TableType >

Helper class for SIMD operations on shm_array.

Template Parameters
TableTypeMetadata table type
Example:
shm_array<float> data(shm, "data", 10000);
SimdArray simd(data);
float sum = simd.sum();
simd.scale(2.0f);
Fixed-size array in shared memory with zero-overhead access.
Definition shm_array.h:63
Helper class for SIMD operations on shm_array.
float sum() const noexcept

Definition at line 313 of file shm_simd_utils.h.

Constructor & Destructor Documentation

◆ SimdArray()

template<typename TableType = shm_table>
shm_simd::SimdArray< TableType >::SimdArray ( shm_array< float, TableType > &  array)
inlineexplicit

Definition at line 318 of file shm_simd_utils.h.

Member Function Documentation

◆ dot()

template<typename TableType = shm_table>
float shm_simd::SimdArray< TableType >::dot ( const shm_array< float, TableType > &  other) const
inlinenoexcept

◆ max()

template<typename TableType = shm_table>
float shm_simd::SimdArray< TableType >::max ( ) const
inlinenoexcept

◆ min()

template<typename TableType = shm_table>
float shm_simd::SimdArray< TableType >::min ( ) const
inlinenoexcept

◆ scale()

template<typename TableType = shm_table>
void shm_simd::SimdArray< TableType >::scale ( float  factor)
inlinenoexcept

◆ sum()

template<typename TableType = shm_table>
float shm_simd::SimdArray< TableType >::sum ( ) const
inlinenoexcept

The documentation for this class was generated from the following file: