librapid

A highly optimised C++ library for mathematical applications and neural networks.

https://github.com/librapid/librapid

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.8%) to scientific vocabulary

Keywords

array cpp cpp20 cpp23 cuda gpu high-performance-computing library matrix multidimensional-arrays multithreading parallel-programming pypy pypy3 python python3 simd

Keywords from Contributors

mesh sequences interactive hacking network-simulation
Last synced: 4 months ago · JSON representation ·

Repository

A highly optimised C++ library for mathematical applications and neural networks.

Basic Info
  • Host: GitHub
  • Owner: LibRapid
  • License: mit
  • Language: C++
  • Default Branch: master
  • Homepage: http://librapid.rtfd.io
  • Size: 30.6 MB
Statistics
  • Stars: 172
  • Watchers: 6
  • Forks: 9
  • Open Issues: 10
  • Releases: 22
Topics
array cpp cpp20 cpp23 cuda gpu high-performance-computing library matrix multidimensional-arrays multithreading parallel-programming pypy pypy3 python python3 simd
Created over 4 years ago · Last pushed about 1 year ago
Metadata Files
Readme Contributing Funding License Code of conduct Citation Security

README.md

C++ Version License DiscordPyPI - Downloads


Continuous Integration Documentation Status


Documentation


Simple Demo

What is LibRapid?

LibRapid is an extremely fast, highly-optimised and easy-to-use C++ library for mathematics, linear algebra and more, with an extremely powerful multidimensional array class at it's core. Every part of LibRapid is designed to provide the best possible performance without making the sacrifices that other libraries often do.

Everything in LibRapid is templated, meaning it'll just work with almost any datatype you throw at it. In addition, LibRapid is engineered with compute-power in mind, meaning it's easy to make the most out of the hardware you have. All array operations are vectorised with SIMD instructions, parallelised via OpenMP and can even be run on external devices via CUDA and OpenCL. LibRapid also supports a range of BLAS libraries to make linear algebra operations even faster.

GPU Array

What's more, LibRapid provides lazy evaluation of expressions, allowing us to perform optimisations at compile-time to further improve performance. For example, dot(3 * a, 2 * transpose(b)) will be compiled into a single GEMM call, with alpha=6, beta=0, transA=false and transB=true.

Why use LibRapid?

If you need the best possible performance and an intuitive interface that doesn't sacrifice functionality, LibRapid is for you. You can fine-tune LibRapid's performance via the CMake configuration and change the device used for a computation by changing a single template parameter (e.g. librapid::backend::CUDA for CUDA compute).

Additionally, LibRapid provides highly-optimised vectors, complex numbers, multiprecision arithmetic (via custom forks of MPIR and MPFR) and a huge range of mathematical functions that operate on all of these types. LibRapid also provides a range of linear algebra functions, machine learning activation functions, and more.

When to use LibRapid

  • When you need the best possible performance
  • When you want to write one program that can run on multiple devices
  • When you want to use a single library for all of your mathematical needs
  • When you want a simple interface to develop with

When not to use LibRapid

  • When you need a rigorously tested and documented library
    • LibRapid is still in early development, so it's not yet ready for production use. That said, we still have a wide range of tests which are run on every push to the repository, and we're working on improving the documentation.
  • When you need a well-established library.
    • LibRapid hasn't been around for long, and we've got a very small community.
  • When you need a wider range of functionality.
    • While LibRapid implements a lot of functions, there are some features which are not yet present in the library. If you need these features, you may want to look elsewhere. If you would still like to use LibRapid, feel free to open an issue and I'll do my best to implement it.

Documentation

Latest Documentation \ Develop Branch Docs

LibRapid uses Doxygen to parse the source code and extract documentation information. We then use a combination of Breathe, Exhale and Sphinx to generate a website from this data. The final website is hosted on Read the Docs.

The documentation is rebuilt every time a change is made to the source code, meaning it is always up-to-date.

Current Development Stage

At the current point in time, LibRapid C++ is being developed solely by me (pencilcaseman).

I'm currently a student in my first year of university, so time and money are both tight. I'm working on LibRapid in my spare time, and I'm not able to spend as much time on it as I'd like to.

If you like the library and would like to support its development, feel free to create issues or pull requests, or reach out to me via Discord and we can chat about new features. Any support is massively appreciated.

Roadmap

The roadmap is a rough outline of what I want to get implemented in the library and by what point, but please don't count on features being implemented quickly -- I can't promise I'll have the time to implement everything as soon as I'd like... (I'll try my best though!)

If you have any feature requests or suggestions, feel free to create an issue describing it. I'll try to get it working as soon as possible. If you really need something implemented quickly, a small donation would be appreciated, and would allow me to bump it to the top of my to-do list.

Dependencies

LibRapid has a few dependencies to improve functionality and performance. Some of these are optional, and can be configured with a CMake option. The following is a list of the external dependencies and their purpose (these are all submodules of the library -- you don't need to install anything manually):

Submodules
External
  • OpenMP - Multi-threading library
  • CUDA - GPU computing library
  • OpenCL - Multi-device computing library
  • OpenBLAS - Highly optimised BLAS library
  • MPIR - Arbitrary precision integer arithmetic
  • MPFR - Arbitrary precision real arithmetic
  • FFTW - Fast(est) Fourier Transform library

Star History

Star History Chart

Contributors

Contributors

Support

Thanks to JetBrains for providing LibRapid with free licenses for their amazing tools!

JetBrains

Owner

  • Name: LibRapid
  • Login: LibRapid
  • Kind: organization
  • Email: pencilcaseman@gmail.com

An optimised set of libraries for multiple languages.

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use LibRapid in a paper, please consider citing it as below."
authors:
- family-names: "Davis"
  given-names: "Toby"
title: "LibRapid: Optimised Mathematics for C++"
version: 0.7.5
date-released: "2023-10-22"
type: software
url: "https://github.com/LibRapid/librapid"
license: MIT
license-url: "https://github.com/LibRapid/librapid/blob/master/LICENSE.md"
repository-code: "https://github.com/LibRapid/librapid"

GitHub Events

Total
  • Issues event: 5
  • Watch event: 5
  • Issue comment event: 5
  • Push event: 1
  • Fork event: 2
Last Year
  • Issues event: 5
  • Watch event: 5
  • Issue comment event: 5
  • Push event: 1
  • Fork event: 2

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 2,736
  • Total Committers: 6
  • Avg Commits per committer: 456.0
  • Development Distribution Score (DDS): 0.068
Past Year
  • Commits: 2
  • Committers: 1
  • Avg Commits per committer: 2.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Toby Davis p****n@g****m 2,551
dependabot[bot] 4****] 164
Maximilian 5****r 16
tcmetzger 3****r 2
athulmekkoth a****1@g****m 2
Maximilian 5****f 1

Issues and Pull Requests

Last synced: 5 months ago

All Time
  • Total issues: 51
  • Total pull requests: 109
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 6 days
  • Total issue authors: 2
  • Total pull request authors: 4
  • Average comments per issue: 0.55
  • Average comments per pull request: 0.72
  • Merged pull requests: 84
  • Bot issues: 0
  • Bot pull requests: 46
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 1
Top Authors
Issue Authors
  • Pencilcaseman (50)
  • dsyme (4)
  • samuel-emrys (1)
Pull Request Authors
  • Pencilcaseman (58)
  • dependabot[bot] (55)
  • fossabot (1)
  • tcmetzger (1)
Top Labels
Issue Labels
c++ (40) enhancement (37) documentation (19) bug (15) help wanted (14) code cleanup (11) good first issue (8) Requires Rewrite (8) BREAKING (7) integrations (4) optimisation (4) python (4) github_actions (3) dependencies (2) duplicate (1) invalid (1) question (1) wontfix (1)
Pull Request Labels
dependencies (60) python (36) github_actions (24) enhancement (12) c++ (12) optimisation (12) code cleanup (11) integrations (9) documentation (8) BREAKING (1) Requires Rewrite (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 2,061 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 95
  • Total maintainers: 1
pypi.org: librapid

A high-performance library for arrays and numeric calculations

  • Homepage: https://tobydavis.dev/librapid
  • Documentation: https://librapid.readthedocs.io/en/latest/
  • License: MIT License Copyright (c) 2021-2023 Toby Davis Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • Latest release: 0.7.5
    published about 2 years ago
  • Versions: 95
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 2,061 Last month
Rankings
Stargazers count: 5.9%
Downloads: 8.1%
Dependent packages count: 10.1%
Average: 11.6%
Forks count: 12.6%
Dependent repos count: 21.5%
Maintainers (1)
Last synced: 5 months ago

Dependencies

.github/workflows/create-release.yaml actions
  • actions/checkout v3 composite
  • marvinpinto/action-automatic-releases latest composite
.github/workflows/run-carbonate.yaml actions
  • ./carbonate * composite
  • actions/checkout v3 composite
docs/environment.yaml conda
  • doxygen 1.9.1.*
  • pip
  • python 3.9.*
.github/workflows/continuous-integration.yaml actions
  • KyleMayes/install-llvm-action v1 composite
  • actions/checkout v4 composite
  • actions/download-artifact v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
  • codecov/codecov-action v3 composite
  • dfm/rtds-action v1 composite
  • lukka/get-cmake latest composite
  • maxim-lobanov/setup-xcode v1.5.1 composite
docs/requirements.txt pypi
  • breathe ==4.35.0
  • exhale ==0.3.6
  • furo ==2022.9.29
  • linkify-it-py *
  • myst-parser *
  • numpydoc ==1.5.0
  • pydata-sphinx-theme ==0.13.3
  • regex *
  • rtds-action *
  • sphinx ==4.5.0
  • sphinx-autobuild *
  • sphinx-copybutton *
  • sphinx-design *
  • sphinx-favicon ==1.0.1
  • sphinx-panels ==0.6.0