Toby Davis - LibRapid

High-Performance C++

LibRapid is a high-performance C++ library for machine learning, numerical computing and more. Every aspect of LibRapid is designed with performance in mind, from the low-level algorithms to the high-level API.

LibRapid also supports OpenCL and CUDA backends, allowing you to run your code on GPUs, FPGAs and other accelerators. Changing the backend you want to use is as simple as adding a second template argument to the Array class. For example, librapid::Array<float, librapid::Backend::CUDA> will create an Array on the GPU, accelerated by CUDA. LibRapid can automatically detect OpenCL and CUDA on your system, so there is no need to spend hours configuring your build system.

Making efficient use of SIMD vectorization, multithreading and cache locality, LibRapid is capable of performing faster than many other popular libraries, including Eigen and XTensor.

LibRapid also integrates nicely with BLAS libraries, such as OpenBLAS and Intel's Math Kernel Library, for even greater performance. Additionally, these libraries are automatically detected by LibRapid's CMake build system, so you don't have to worry about configuring them yourself. LibRapid can even download pre-built OpenBLAS binaries for you, so you can get started right away without installing anything.

Intuitive, Modern API

LibRapid's API is designed to be as intuitive as possible, providing users with a familiar experience. LibRapid uses expressive classes and functions, operator overloading and compile-time function selection to ensure that your code is as concise and readable as it can be.

LibRapid also folds combined operations into a single function call, reducing the number of temporary objects created and improving performance. Even BLAS operations are often folded into a single function call, eliminating the need for complex functions like gemm and gemv.

Functions in LibRapid also work on a wide variety of types, including floating point values, complex numbers, arrays, matrices, vectors and more. This allows you to write generic code that works on any type of data without sacrificing performance.

LibRapid Example

Cross-Platform

LibRapid is designed to be cross-platform, and is tested on Windows, Linux and MacOS with GCC, Clang and MSVC. Every time code is pushed to the repository, LibRapid is compiled, tested and benchmarked on all of these platforms and compilers, ensuring that LibRapid is always working as expected.

Open Source

LibRapid is completely open-source, and is licensed under the MIT License, so you can use it in your personal and commercial projects without any restrictions.

Any contributions to LibRapid are greatly appreciated and allow me to continue improving the library. Donations are also welcome (though code contributions are preferred), and can be made via GitHub Sponsors or PayPal.