a2flo/floor

A C++ Compute/Graphics Library and Toolchain enabling same-source CUDA/Host/Metal/OpenCL/Vulkan C++ programming and execution.

What it solves

It eliminates the need to write separate code for different hardware accelerators by providing a unified API and device language. This allows developers to write a single C++ source that can be executed across various backends including CUDA, Metal, OpenCL, Vulkan, and the host CPU.

How it works

The project consists of a unified compute and graphics host API and a specialized C++ device language. To achieve this cross-platform compatibility, it utilizes a modified clang/LLVM/libc++ 14.0 toolchain. The library provides shared math and constexpr utilities that work on both the host and device, with specific backend implementations for the supported hardware.

Who it’s for

Systems programmers and graphics/compute engineers who need to deploy high-performance kernels across multiple GPU and CPU architectures without maintaining multiple codebase versions.

Highlights

  • Cross-Backend Support: Single-source programming for CUDA, Host, Metal, OpenCL, and Vulkan.
  • Unified Language: Uses a modified LLVM toolchain to provide a consistent device language.
  • Broad Compute Coverage: All supported backends currently provide compute capabilities.
  • Graphics Integration: Provides graphics support specifically for Metal and Vulkan.

Related

  • Project
  • Project
  • Project
  • Project
  • Project