Skip to content

Platform Support Matrix

whisprer edited this page Aug 4, 2025 · 4 revisions

Platform Support Matrix - Universal RNG Library

πŸ–₯️ Comprehensive Platform Coverage

Support Status Legend

  • βœ… Full Support: Thoroughly tested, optimal performance
  • 🟑 Partial Support: Works with limitations or reduced performance
  • πŸ”„ In Development: Actively being implemented
  • ❌ Not Supported: Not compatible or not planned

πŸ—οΈ Operating Systems

Operating System Version Status SIMD Support Notes
Windows 10/11 x64 βœ… Full AVX2, SSE4.2 MSVC 2019+, MinGW64
Windows 10/11 ARM64 🟑 Partial NEON (limited) Future ARM development
Linux Ubuntu 18.04+ βœ… Full AVX2, AVX-512* GCC 7+, Clang 5+
Linux CentOS 7+ βœ… Full AVX2, SSE4.2 RHEL compatible
Linux Debian 10+ βœ… Full AVX2, SSE4.2 Stable and testing
Linux Arch Linux βœ… Full AVX2, AVX-512* Rolling release
Linux ARM64/aarch64 πŸ”„ In Dev NEON Raspberry Pi 4+, server
macOS 10.15+ Intel βœ… Full AVX2, SSE4.2 Xcode 11+
macOS 11+ Apple Silicon 🟑 Partial NEON (limited) M1/M2 native building
FreeBSD 12+ πŸ”„ In Dev AVX2 Community contributions
OpenBSD 7+ πŸ”„ In Dev SSE4.2 Community contributions

*AVX-512 support currently disabled due to build system issues

πŸ”§ Compiler Support

Primary Compilers (Fully Tested)

Compiler Version Platform SIMD Optimizations Performance Rating
GCC 7.0+ Linux, MinGW βœ… AVX2, SSE4.2 ⭐⭐⭐⭐⭐ Excellent
GCC 11.0+ Linux βœ… AVX2, AVX-512* ⭐⭐⭐⭐⭐ Best
Clang 5.0+ Linux, macOS βœ… AVX2, SSE4.2 ⭐⭐⭐⭐⭐ Excellent
Clang 13.0+ Linux, macOS βœ… AVX2, AVX-512* ⭐⭐⭐⭐⭐ Best
MSVC 2019 (19.20+) Windows βœ… AVX2, SSE4.2 ⭐⭐⭐⭐ Very Good
MSVC 2022 (19.30+) Windows βœ… AVX2, SSE4.2 ⭐⭐⭐⭐⭐ Excellent

Secondary Compilers (Basic Support)

Compiler Version Platform Status Limitations
Intel ICC 2021+ Linux, Windows 🟑 Partial Excellent optimization, limited testing
MinGW-w64 8.0+ Windows βœ… Full Cross-compilation from Linux
Apple Clang 12+ macOS βœ… Full Xcode integrated compiler
TCC Latest Linux 🟑 Partial Scalar only, for embedded use

πŸ–₯️ CPU Architecture Support

x86-64 (Primary Focus)

CPU Generation SIMD Instructions Support Status Performance Notes
Intel Haswell+ (2013+) AVX2, FMA βœ… Optimal 4+ SIMD speedup
Intel Skylake+ (2015+) AVX2, FMA, AVX-512* βœ… Best Peak performance
AMD Excavator+ (2015+) AVX2, FMA βœ… Optimal Excellent performance
AMD Zen+ (2017+) AVX2, FMA βœ… Best Outstanding performance
Intel Core 2 (2006-2012) SSE4.2 🟑 Limited Scalar fallback
AMD Bulldozer (2011-2015) SSE4.2, AVX 🟑 Limited Reduced performance

ARM Architecture (Emerging Support)

Platform CPU SIMD Support Status Performance Notes
Apple M1/M2 Apple Silicon NEON 🟑 Partial Native ARM64 builds
Raspberry Pi 4 Cortex-A72 NEON πŸ”„ In Dev Community priority
AWS Graviton Cortex-A76 NEON πŸ”„ In Dev Server deployment
Snapdragon Kryo/Cortex NEON πŸ”„ Planned Mobile applications
NVIDIA Jetson Cortex-A78 NEON πŸ”„ Planned Edge computing

Embedded/Specialized

Platform Architecture Status Use Case
RISC-V Various ❌ Not Planned Future consideration
MIPS Various ❌ Not Supported Legacy systems
PowerPC IBM Power ❌ Not Supported Enterprise systems
s390x IBM Z ❌ Not Supported Mainframe systems

πŸ“Š Performance by Platform

Benchmark Results (64-bit Xoroshiro128++ Batch Mode)

Platform CPU Model Compiler Performance (M ops/sec) Speedup
Linux Intel i7-9700K GCC 11 1355 4.2x
Linux AMD Ryzen 5900X GCC 11 1420 4.4x
Windows Intel i7-9700K MSVC 2022 1280 3.9x
Windows AMD Ryzen 5900X MinGW-GCC 1390 4.3x
macOS Intel i7-9750H Clang 13 1200 3.7x
macOS Apple M1 Clang 13 890 2.8x*

*Apple M1 results preliminary - NEON optimization in progress

πŸ”§ Platform-Specific Configuration

Windows Development

Visual Studio Setup

# Install Visual Studio 2022 with C++ workload
# Or install Build Tools only
winget install Microsoft.VisualStudio.2022.BuildTools

# Configure for AVX2
cmake -G "Visual Studio 17 2022" -A x64 `
    -DCMAKE_CXX_FLAGS="/O2 /arch:AVX2 /DNDEBUG"

MinGW-w64 Setup

# Install via MSYS2
pacman -S mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake

# Configure for maximum performance
cmake -G "MinGW Makefiles" `
    -DCMAKE_CXX_FLAGS="-O3 -march=native -mavx2 -mtune=native"

Windows-Specific Issues

Known Issues:
- Shared library (.dll) build needs symbol export fixes
- AVX-512 detection disabled on Windows
- Path length limitations with deep build directories

Workarounds:
- Use static libraries for now: -DBUILD_SHARED_LIBS=OFF
- Enable long path support: gpedit.msc β†’ Computer Config β†’ Administrative Templates

Linux Development

Ubuntu/Debian Setup

# Install development tools
sudo apt update
sudo apt install build-essential cmake ninja-build

# Install modern compilers
sudo apt install gcc-11 g++-11 clang-13

# Configure with GCC
cmake -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_BUILD_TYPE=Release

CentOS/RHEL Setup

# Enable development tools
sudo dnf groupinstall "Development Tools"
sudo dnf install cmake ninja-build

# Install newer GCC if needed
sudo dnf install gcc-toolset-11
scl enable gcc-toolset-11 bash

Linux-Specific Optimizations

# CPU frequency scaling for benchmarks
echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

# NUMA optimization for multi-socket systems
numactl --cpunodebind=0 --membind=0 ./rng_benchmark

# Huge pages for large batch operations
echo always | sudo tee /sys/kernel/mm/transparent_hugepage/enabled

macOS Development

Xcode Setup

# Install Xcode command line tools
xcode-select --install

# Install Homebrew dependencies
brew install cmake ninja

# Configure for Intel Macs
cmake -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_BUILD_TYPE=Release

Apple Silicon Configuration

# Native ARM64 build
cmake -DCMAKE_OSX_ARCHITECTURES=arm64 `
    -DENABLE_AVX2=OFF -DENABLE_NEON=ON `
    -DCMAKE_BUILD_TYPE=Release

# Universal binary (Intel + ARM)
cmake -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" `
    -DCMAKE_BUILD_TYPE=Release

πŸ› Known Platform Issues

Windows Issues

Issue: MSVC Linker Errors with SIMD

Error: LNK2019 unresolved external symbol __builtin_*

Solution:

# Use MSVC intrinsics instead of GCC builtins
if(MSVC)
    target_compile_definitions(universal_rng PRIVATE USE_MSVC_INTRINSICS=1)
endif()

Issue: MinGW Path Length Limitations

Error: File path too long

Solution:

# Use short build directory names
mkdir bld && cd bld
cmake -G "MinGW Makefiles" ..

Linux Issues

Issue: Old GCC Version

Error: C++17 features not supported

Solution:

# Install newer GCC or use Clang
sudo apt install gcc-11 g++-11
# OR
sudo apt install clang-13

Issue: Missing SIMD Support

Error: AVX2 instructions not available

Diagnosis:

# Check CPU capabilities
grep avx2 /proc/cpuinfo
# Check compiler flags
g++ -Q --help=target | grep avx2

macOS Issues

Issue: Apple Silicon SIMD Limitations

Current: NEON implementation incomplete

Status:

Tracking: ARM NEON optimization in development
Workaround: Use scalar implementation with -DFORCE_SCALAR=ON
Timeline: NEON support planned for next major release

Issue: Xcode Version Compatibility

Error: Unsupported C++17 features

Solution:

# Update Xcode command line tools
sudo xcode-select --install --reset

πŸš€ Platform-Specific Optimizations

Intel-Specific Optimizations

Skylake and Newer

# Enable all available optimizations
set(CMAKE_CXX_FLAGS "-O3 -march=skylake -mtune=skylake -mavx2 -mfma")

Haswell/Broadwell

# Conservative AVX2 optimization
set(CMAKE_CXX_FLAGS "-O3 -march=haswell -mtune=haswell -mavx2")

AMD-Specific Optimizations

Zen Architecture

# Optimize for Zen microarchitecture
set(CMAKE_CXX_FLAGS "-O3 -march=znver1 -mtune=znver1 -mavx2")

Zen 2/3 Architecture

# Latest Zen optimizations
set(CMAKE_CXX_FLAGS "-O3 -march=znver2 -mtune=znver2 -mavx2")

ARM-Specific Optimizations

Apple Silicon

# Native ARM64 with NEON
set(CMAKE_CXX_FLAGS "-O3 -march=armv8-a+simd -mtune=apple-a14")

ARM Cortex-A

# Generic ARM optimization
set(CMAKE_CXX_FLAGS "-O3 -march=armv8-a+simd -mtune=cortex-a72")

πŸ“¦ Package Manager Support

System Package Managers

Platform Package Manager Status Package Name
Ubuntu/Debian APT πŸ”„ Planned libuniversal-rng-dev
CentOS/RHEL DNF/YUM πŸ”„ Planned universal-rng-devel
Arch Linux Pacman πŸ”„ Planned universal-rng
macOS Homebrew πŸ”„ Planned universal-rng
Windows vcpkg πŸ”„ Planned universal-rng

Language-Specific Managers

Language Package Manager Status Integration
C++ Conan πŸ”„ Planned Conan recipe
C++ vcpkg πŸ”„ Planned Port file
Rust Cargo πŸ”„ Future Rust bindings
Python pip πŸ”„ Future Python wrapper
JavaScript npm πŸ”„ Future WASM bindings

🎯 Platform Roadmap

Short-term (Next 6 months)

  • βœ… Complete Windows MSVC optimization
  • πŸ”„ Finish ARM NEON implementation
  • πŸ”„ Resolve AVX-512 build system issues
  • πŸ”„ Add FreeBSD support

Medium-term (6-12 months)

  • πŸ”„ Package manager integration (vcpkg, Homebrew)
  • πŸ”„ Apple Silicon performance optimization
  • πŸ”„ ARM64 server platform support
  • πŸ”„ Cross-compilation improvements

Long-term (1+ years)

  • πŸ”„ Mobile platform support (Android, iOS)
  • πŸ”„ Embedded system support
  • πŸ”„ WebAssembly compilation
  • πŸ”„ GPU acceleration (CUDA, OpenCL)

πŸ§ͺ Testing Matrix

Continuous Integration Coverage

Platform Compiler Architecture Frequency
Ubuntu 20.04 GCC 9, 11 x86_64 Every commit
Ubuntu 22.04 GCC 11, Clang 13 x86_64 Every commit
Windows 2019 MSVC 2019 x86_64 Every commit
Windows 2022 MSVC 2022 x86_64 Every commit
macOS 11 Clang 13 x86_64 Every commit
macOS 12 Clang 14 x86_64, ARM64 Every commit

Manual Testing Platforms

Platform Testing Frequency Maintainer
CentOS 8 Weekly Community
Arch Linux Weekly Community
FreeBSD 13 Monthly Community
Raspberry Pi 4 Monthly Community

πŸ“ž Platform-Specific Support

Getting Help by Platform

Windows Issues

  • GitHub Issues: Tag with platform:windows
  • Common Solutions: Check troubleshooting guide first
  • MSVC Specific: Include compiler version and build log

Linux Issues

  • GitHub Issues: Tag with platform:linux
  • Distribution Specific: Include distro and version
  • Compiler Problems: Include gcc --version output

macOS Issues

  • GitHub Issues: Tag with platform:macos
  • Architecture Specific: Specify Intel vs Apple Silicon
  • Xcode Problems: Include Xcode and command line tools version

Contributing Platform Support

Adding New Platform Support

  1. Fork repository and create platform branch
  2. Add platform detection in CMake files
  3. Implement SIMD support for platform architecture
  4. Add CI integration if possible
  5. Submit PR with platform documentation

Platform Maintainership

Interested in maintaining a specific platform? Contact maintainers about:

  • Regular testing and issue triage
  • Platform-specific optimization
  • Documentation updates
  • User support

πŸ“‹ Platform Selection Guide

For Maximum Performance

Intel Skylake+ with Linux + GCC 11: Peak SIMD performance, best optimization

For Development

Any modern platform: All major platforms supported for development

For Production Deployment

  • Linux servers: Best performance and stability
  • Windows servers: Good performance with MSVC
  • Cloud platforms: Excellent on AWS, Azure, GCP

For Embedded/Edge

  • ARM64 Linux: Good performance with NEON (in development)
  • x86-64 embedded: Full AVX2 support available

Choose your platform based on performance requirements, development environment, and deployment constraints. The library adapts to provide optimal performance on each supported platform.

PLEASE DO BEAR IN CONSTANT MIND ABOVE ALL ELSE: CURRENT STATE OF DEVELOPMENT THE C++ STD LIBRARY EMPLOYING MERSENNE TWISTER STILL OUTPERFORMS SINGLE CALCULATION OPERATIONS FOR NON-SIMD BOOSTED COMPUTERS. THESE LIBRARIES FULLY REQUIRE AT LEAST AVX2 MINIMUM TO BENEFIT OVER THE STD GENERATION METHODS WHEN CONSIDERING SINGLE NUMBER GENERATION TASKS.

Clone this wiki locally