Skip to content

Releases: Total-Random/pcg-cpp

v1.0

22 Dec 16:22

Choose a tag to compare

🚀 Release 1.0: Modernized & Robust PCG-CPP

Welcome to the first official stable release of the pcg-cpp library maintained by Total-Random.
This version marks a comprehensive modernization of the original PCG library by Melissa O'Neill, focusing on cross-platform compatibility, performance optimizations, and a professional developer experience.


🌟 Key Features & Improvements

1. Modern CMake Build System

  • Replaced legacy Makefiles with a robust, industry-standard CMake system.
  • Added full support for find_package(pcg-cpp), making integration into other projects effortless.
  • Native support for ctest to run the full suite of 42 correctness tests automatically.
  • Hardware-specific optimizations are automatically configured for MSVC, GCC, and Clang.

2. Native Windows ARM64 Support

  • Optimized 128-bit multiplication for ARM64 architectures using __umulh intrinsics.
  • Verified compatibility with modern Windows-on-ARM devices
    (Surface Pro, Apple Silicon via VMs).

3. Performance & Memory Optimizations

  • Empty Base Class Optimization (EBCO):
    Implemented __declspec(empty_bases) for MSVC, ensuring the smallest possible memory footprint for RNG objects.
  • Optimized unxorshift:
    Integrated community performance patches for inverse xorshift operations.
  • Zero-Overhead:
    Maintained the strict C++ philosophy of providing high-level abstractions without runtime costs.

4. Enterprise-Grade Compatibility (MSVC Fixes)

Resolved long-standing compiler errors and warnings on Visual Studio:

  • Fixed C2678 (ambiguous operator) in set_stream.
  • Fixed C1090 (PDB API call failure) during parallel builds.
  • Eliminated shadowing warnings (is_mcg) and type conversion warnings
    (C4244, C4127).
  • Ensured Clean Build status with strict warning levels
    (/W4 for MSVC, -Wall for GCC/Clang).

5. C++ Standard Compliance

  • Made result_type in seed_seq_from public to strictly follow the SeedSequence concept required by the C++ Standard Library (STL).
  • Guaranteed seamless interoperability with standard engines like std::mt19937.

⚙️ Automated Quality Assurance (CI)

Implemented GitHub Actions CI/CD pipeline, automatically testing every commit on:

  • Windows: MSVC 2019 / 2022 / 2026
  • Linux: GCC 11 / 12 / 13 / 14 and Clang 15 / 16 / 17
  • macOS: Apple Clang (latest)

📦 Quick Start

git clone https://github.com/Total-Random/pcg-cpp.git
cd pcg-cpp
cmake -B build
cmake --build build

# Run correctness tests
cd build && ctest -C Release