How clusterchallenge/universal works
Project type and purpose
• This is a header-only C++ template library—“Universal”—that provides a rich set of parameterized number systems (posits, elasts, floats, integers, decimals, etc.), command-line tools, example applications, benchmarks, documentation, and CI/CD integration. Its primary purpose is to enable mixed-precision arithmetic research, educational demos, and production use of alternative number formats.
a. Core Library
• /universal: all header files for static and elastic number systems
• src/internal (optional): reference implementations
b. Build System
• CMakeLists.txt, tools/cmake/: generates build targets for library, tools, tests, benchmarks, docs
• .devcontainer/, docker/: scripts and Dockerfiles for containerized builds
c. Command-Line Tools
• tools/cmd/* → executables like “half”, “posit”, “ieee” that inspect number types
• c_api/shim & c_api/pure_c → C-language bindings
d. Examples & Demos
• applications/: numerical examples demonstrating accuracy, performance, roots, PDE, ODE, mixed precision
• education/: educational demos per number system
• playground/: scratch/test code
e. Benchmarks
• benchmark/: performance, accuracy, reproducibility, energy, range
f. Verification & Tests
• static/*/CMakeFiles/*_test: regression suites per number system
• make test / CTest → runs all enabled tests
g. Documentation & Assets
• docs/: markdown, PDFs, images, tutorials
• README.md, PURPOSE.md, CITATION.cff
h. CI/CD & Quality
• .github/workflows/cmake.yml → builds, regression tests, coverage reports
• Codacy, Coveralls, FOSSA badges
i. Distribution
• bin/: prebuilt executables and scripts
• Docker Hub: stillwater/universal container pull
• install scripts: install_cmake.sh, cmake install targets
Relationships and interactions
• Build System ▶ Core Library & Command-Line Tools & Tests & Examples & Benchmarks & Docs
• Core Library ▶ consumed by Command-Line Tools, Examples, Benchmarks, Education, C API
• Command-Line Tools & C API ▶ packaged into bin/ and Docker images
• Examples & Benchmarks ▶ link against Core Library via CMake targets
• Verification Tests ▶ validate Core Library and each number system
• CI/CD ▶ triggers Build System; reports status to GitHub, Codacy, Coveralls, FOSSA
• Dockerfiles ▶ use Build System to produce container images for quick starts
Architectural patterns & principles
• Modular CMake targets: each number system or functional group is its own CMake project for fast builds
• Header-only library: zero runtime linkage, template instantiation at compile time
• Single source of truth: include/universal headers drive all functionality
• Plug-in style CLI tools: share the same template infrastructure
• Containerized development: .devcontainer + docker scripts for reproducible build environments
• CI-as-code: GitHub Actions workflows define build & test pipelines
Technologies and frameworks
• C++20 templates
• CMake v3.23+
• Docker
• GitHub Actions for CI
• Codacy, Coveralls, FOSSA for quality and license scanning
• Bash scripts for build and install automation