Checks if SIMD instructions are supported Determines whether the target architecture has Single Instruction, Multiple Data (SIMD) capabilities for parallel processing. This is a compile-time architectural capability check, not a runtime feature detection.
SIMD Support by Architecture
- x86: MMX, SSE family instructions
- x86_64: SSE, AVX family instructions
- ARMv7: NEON SIMD instructions
- ARMv8: Advanced NEON, optional SVE
- Other architectures: May have limited or no SIMD support
Performance Implications
- Vectorization: Enables parallel processing of data arrays
- Mathematical Operations: Accelerated floating-point calculations
- Media Processing: Efficient image/audio/video processing
- Returns
- true if SIMD instruction support is architecturally available
- Note
- This function is constexpr and evaluates at compile time
-
For runtime SIMD feature detection, see features.hpp
- See also
- hasVectorInstructions() for advanced vector processing
-
ArchitectureInfo::hasSimdSupport() for member function version
algorithm selection
template<typename T>
void process_array(const T* input, T* output, size_t size) {
process_array_simd(input, output, size);
} else {
process_array_scalar(input, output, size);
}
}
- Since
- 1.0.0