Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
Loading...
Searching...
No Matches
kcenon::monitoring::simd_config Struct Reference

Configuration for SIMD aggregator. More...

#include <simd_aggregator.h>

Collaboration diagram for kcenon::monitoring::simd_config:
Collaboration graph

Public Member Functions

bool validate () const
 Validate configuration.
 

Public Attributes

bool enable_simd = true
 Enable SIMD acceleration.
 
size_t vector_size = 8
 SIMD vector width for processing.
 
size_t alignment = 32
 Memory alignment for SIMD operations.
 
bool use_fma = true
 Use fused multiply-add if available.
 

Detailed Description

Configuration for SIMD aggregator.

Definition at line 81 of file simd_aggregator.h.

Member Function Documentation

◆ validate()

bool kcenon::monitoring::simd_config::validate ( ) const
inline

Validate configuration.

Returns
true if configuration is valid

Definition at line 91 of file simd_aggregator.h.

91 {
92 // Vector size must be power of 2
93 if (vector_size == 0 || (vector_size & (vector_size - 1)) != 0) {
94 return false;
95 }
96 // Alignment must be power of 2
97 if (alignment == 0 || (alignment & (alignment - 1)) != 0) {
98 return false;
99 }
100 return true;
101 }
size_t alignment
Memory alignment for SIMD operations.
size_t vector_size
SIMD vector width for processing.

References alignment, and vector_size.

Referenced by TEST_F(), and TEST_F().

Here is the caller graph for this function:

Member Data Documentation

◆ alignment

size_t kcenon::monitoring::simd_config::alignment = 32

Memory alignment for SIMD operations.

Definition at line 84 of file simd_aggregator.h.

Referenced by TEST_F(), TEST_F(), and validate().

◆ enable_simd

bool kcenon::monitoring::simd_config::enable_simd = true

Enable SIMD acceleration.

Definition at line 82 of file simd_aggregator.h.

Referenced by kcenon::monitoring::simd_aggregator::should_use_simd(), TEST_F(), TEST_F(), and TEST_F().

◆ use_fma

bool kcenon::monitoring::simd_config::use_fma = true

Use fused multiply-add if available.

Definition at line 85 of file simd_aggregator.h.

◆ vector_size

size_t kcenon::monitoring::simd_config::vector_size = 8

SIMD vector width for processing.

Definition at line 83 of file simd_aggregator.h.

Referenced by kcenon::monitoring::simd_aggregator::should_use_simd(), TEST_F(), TEST_F(), and validate().


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