{"id":13830949,"url":"https://github.com/ga-developers/ga-benchmark","last_synced_at":"2025-07-09T13:30:51.823Z","repository":{"id":83703036,"uuid":"142754862","full_name":"ga-developers/ga-benchmark","owner":"ga-developers","description":"A benchmark for Geometric Algebra libraries, library generators, and code optimizers.","archived":false,"fork":false,"pushed_at":"2021-09-22T11:47:09.000Z","size":9383,"stargazers_count":22,"open_issues_count":1,"forks_count":4,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-11-20T12:46:11.943Z","etag":null,"topics":["benchmark","clifford-algebras","cpp","geometric-algebra","geometric-algebra-libraries"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ga-developers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-07-29T11:22:38.000Z","updated_at":"2024-06-20T06:13:52.000Z","dependencies_parsed_at":"2024-01-13T16:24:48.288Z","dependency_job_id":null,"html_url":"https://github.com/ga-developers/ga-benchmark","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ga-developers/ga-benchmark","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ga-developers%2Fga-benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ga-developers%2Fga-benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ga-developers%2Fga-benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ga-developers%2Fga-benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ga-developers","download_url":"https://codeload.github.com/ga-developers/ga-benchmark/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ga-developers%2Fga-benchmark/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264467915,"owners_count":23612999,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","clifford-algebras","cpp","geometric-algebra","geometric-algebra-libraries"],"created_at":"2024-08-04T10:01:13.383Z","updated_at":"2025-07-09T13:30:51.274Z","avatar_url":"https://github.com/ga-developers.png","language":"C++","readme":"# ga-benchmark\n\nThis repository is a joint effort to define standards and methodologies for benchmarking Geometric Algebra libraries, library generators, and code optimizers.\n\nThe goal of this project is to help physicists, chemists, engineers, and computer scientists to choose the Geometric Algebra solution that best suits their practical needs, as well as to push further the improvement of the compared solutions and to motivate the development of new tools.\n\nThe current version compares seven C++ solutions:\n\n- Gaalet (https://sourceforge.net/projects/gaalet)\n- Gaalop (http://www.gaalop.de)\n- Garamon (https://github.com/vincentnozick/garamon)\n- GATL (https://github.com/laffernandes/gatl)\n- GluCat (https://github.com/penguian/glucat)\n- TbGAL (https://github.com/Prograf-UFF/tbgal)\n- Versor (http://versor.mat.ucsb.edu)\n\nBut it is easy to include new ones!\n\nThe solutions are compared considering four models of geometry:\n\n- Conformal (2D and 3D)\n- Euclidean (2D, 3D, 4D, and 5D)\n- Homogeneous (2D, 3D, and 4D)\n- Minkowski (2D and 3D)\n\nten unary operations:\n\n- Clifford conjugation\n- Dualization\n- Grade Involution\n- Inversion\n- Normalization\n- Reversion\n- Squared reverse norm\n- Unary minus\n- Unary plus\n- Undualization\n\ntwelve binary operations:\n\n- Addition\n- Commutator product\n- Dot product\n- Geometric product\n- Hestenes inner product\n- Inverse geometric product\n- Left contraction\n- Outer product\n- Regressive product\n- Right contraction\n- Scalar product\n- Subtraction\n\nand one algorithm:\n\n- Inverse kinematics assuming the conformal model of 3D Euclidean space\n\nThe project documentation is structured as follows:\n\n1. [Requirements](#1-requirements)\n2. [Building and Running](#2-building-and-running)\n3. [Ploting Results](#3-ploting-results)\n4. [Latest Results](#4-latest-results)\n5. [Further Knowledge](#5-further-knowledge)\n   - [Gaalet](#gaalet)\n   - [Gaalop](#gaalop)\n   - [Garamon](#garamon)\n   - [GATL](#gatl)\n   - [GluCat](#glucat)\n   - [TbGAL](#tbgal)\n   - [Versor](#versor)\n   - [How ga-benchmark Recognizes a Solution](#how-ga-benchmark-recognizes-a-solution)\n6. [License](#6-license)\n\n## 1. Requirements\n\nMake sure that you have all the following tools, libraries, library generators, and code optimizers installed and working before attempting to use **ga-benchmark**.\n\nRequired tools:\n\n- Your favorite [C++17](https://en.wikipedia.org/wiki/C%2B%2B17) compiler\n- [CMake](https://cmake.org)\n- [Python 3](https://www.python.org) interpreter\n- [Jupyter Notebook](https://jupyter.org)\n\nRequired C++ libraries:\n\n- [Google Benchmark](https://github.com/google/benchmark)\n- Threads (`pthread` library on Linux, `shlwapi` library on Windows, and `kstat` library on Solaris)\n\nRequired Python modules:\n\n- `argparse`\n- `ipywidgets`\n- `json`\n- `scipy`\n- `shutil`\n- `tqdm`\n- `typing`\n\nExpected Geometric Algebra libraries, library generators, and code optimizers:\n\n- [Gaalet: Geometric Algebra ALgorithms Expression Templates](https://sourceforge.net/projects/gaalet)\n- [Gaalop: Geometic Algebra Algorithms Optimizer](http://www.gaalop.de)\n- [Garamon: Geometric Algebra Recursive and Adaptive Monster](https://github.com/vincentnozick/garamon)\n- [GATL: Geometric Algebra Template Library](https://github.com/laffernandes/gatl)\n- [GluCat: Clifford Algebra Templates](https://github.com/penguian/glucat)\n- [TbGAL: Tensor-based Geometric Algebra Library](https://github.com/Prograf-UFF/tbgal)\n- [Versor](http://versor.mat.ucsb.edu)\n\nThe [Further Knowledge](#6-further-knowledge) section describes how to install the expected libraries, library generators, and code optimizers, and how to make **ga-benchmark** recognize the existence of a solution to be compared, including custom ones not listed above. Notice that Gaalop and Garamon must be instrumented.\n\n## 2. Building and Running\n\nUse the [git clone](https://git-scm.com/docs/git-clone) command to download the project:\n\n```bash\ngit clone https://github.com/ga-developers/ga-benchmark.git ga-benchmark\ncd ga-benchmark\n```\n\nThe basic steps for configuring and building **ga-benchmark** look like this:\n\n```bash\nmkdir build\ncd build\ncmake -DCMAKE_BUILD_TYPE=Release ..\ncmake --build . --parallel 8\n```\n\nCall the `test` target to run the benchmark:\n\n```bash\ncmake --build . --target test\n```\n\nBuilding and running **ga-benchmark** may take several hours. Please be patient and keep the computer allocated exclusively for the execution of the tests.\n\n## 3. Ploting Results\n\nAfter running **ga-benchmark**, use the Jupyter Notebook [`ga-benchmark/gabm_results.ipynb`](gabm_results.ipynb) to see tables and charts that compare solutions. Those tables and charts are produced by functions defined in the [`ga-benchmark/gabm.py`](gabm.py) file.\n\nAlternatively, you can generate the tables and charts from the command line. Assuming that the current folder is `ga-benchmark/build` and you want to save resulting charts and tables to the `ga-benchmark/results` folder, call:\n\n```bash\ncd ..\npython -m gabm -i ./build -o ./results\n```\n\nIf everything is alright, then results are in the `ga-benchmark/results` folder. This is the folder structure expected by the repository [`https://github.com/ga-developers/ga-benchmark-runs`](https://github.com/ga-developers/ga-benchmark-runs), since it also includes a copy of the input JSON files.\n\n## 4. Latest Results\n\nThe latest results are available here: [`https://github.com/ga-developers/ga-benchmark-runs`](https://github.com/ga-developers/ga-benchmark-runs). Please, help us to keep it updated.\n\n## 5. Further Knowledge\n\nIf your system does not include the expected libraries, library generators, and code optimizers listed above, then you must install them following the instructions provided by the developers.\n\nThe commands below summarize the installation process of each of the expected solutions. However, one should note that the process may have changed with the release of new versions.\n\nHere, we assume that `ga-benchmark` is the current folder and Linux operating system. The installation procedures will place the expected solutions inside the `ga-benchmark/libs` folder.\n\n### Gaalet\n\n```bash\nsvn checkout https://svn.code.sf.net/p/gaalet/code/trunk libs/Gaalet/repository\nmkdir -p libs/Gaalet/install/include/gaalet\ncp libs/Gaalet/repository/include/cpp0x/* libs/Gaalet/install/include/gaalet\n```\n\n### Gaalop\n\n```bash\nsudo apt install xmaxima\nsudo apt install default-jre\nmkdir -p libs/Gaalop/download\nwget -O libs/Gaalop/download/GaalopPrecompiler.tar.gz \"http://www.gaalop.de/wp-content/uploads/x86-64/GaalopPrecompiler-2.0.1447-Linux.tar.gz\"\ntar xf libs/Gaalop/download/GaalopPrecompiler.tar.gz -C libs/Gaalop/download\nmkdir -p libs/Gaalop/install/usr/local/bin/GaalopPrecompiler\nmv libs/Gaalop/download/GaalopPrecompiler-2.0.1447-Linux/* libs/Gaalop/install/usr/local/bin/GaalopPrecompiler\nrmdir libs/Gaalop/download/GaalopPrecompiler-2.0.1447-Linux\n```\n\nSee [Gaalop's download page](http://www.gaalop.de/download/) for a list of prebuilt binaries of the precompiler for Linux and Windows.\n\n### Garamon\n\n```bash\nsudo apt install libeigen3-dev\ngit clone https://github.com/vincentnozick/garamon.git libs/Garamon/repository\nmkdir libs/Garamon/repository/build\nmkdir libs/Garamon/install\ncd libs/Garamon/repository/build\ncmake ..\nmake\nfor conf in ../../../../source/Garamon/algebras/*.conf\ndo\n  ./garamon_generator $conf\n  filename=$(basename -- \"$conf\")\n  cd output/garamon_\"${filename%.*}\"\n  mkdir build\n  cd build\n  cmake -DCMAKE_BUILD_TYPE=Release ..\n  make\n  make DESTDIR=../../../../../install install\n  cd ../../..\ndone\ncd ../../../..\n```\n\n### GATL\n\n```bash\ngit clone https://github.com/laffernandes/gatl.git libs/GATL/repository\nmkdir libs/GATL/repository/cpp/build\nmkdir libs/GATL/install\ncd libs/GATL/repository/cpp/build\ncmake -DCMAKE_INSTALL_PREFIX=\"$(cd ../../../install; pwd -P)\" ..\ncd ../../../../..\n```\n\n### GluCat\n\n```bash\nsudo apt install libeigen3-dev\nsudo apt install libboost-all-dev\ngit clone https://github.com/penguian/glucat.git libs/GluCat/repository\ncd libs/GluCat/repository\nmake -f admin/Makefile.common cvs\n./configure --disable-pyclical\nmake\nmake DESTDIR=$(realpath ../install) install\ncd ../../..\n```\n\n### TbGAL\n\n```bash\nsudo apt install libeigen3-dev\ngit clone https://github.com/Prograf-UFF/TbGAL.git libs/TbGAL/repository\nmkdir libs/TbGAL/repository/build\nmkdir libs/TbGAL/install\ncd libs/TbGAL/repository/build\ncmake -DCMAKE_INSTALL_PREFIX=\"$(cd ../../install; pwd -P)\" ..\ncd ../../../..\n```\n\n### Versor\n\n```bash\ngit clone https://github.com/wolftype/versor.git libs/Versor/repository\nmkdir libs/Versor/repository/build\nmkdir libs/Versor/install\ncd libs/Versor/repository/build\ncmake -DCMAKE_BUILD_TYPE=Release ..\nmake\nmake DESTDIR=../../install install\ncd ../../../..\n```\n\n### How **ga-benchmark** Recognizes a Solution\n\nA given libraries, library generators, and code optimizers will be recognized by **ga-benchmark** if and only if the `ga-benchmark/source` folder includes a subfolder with the benchmark code of the given solution. The [`ga-benchmark/source/README.md`](source/README.md) file presents detailed instructions about how to prepare such subfolder.\n\n## 6. License\n\nThis software is licensed under the GNU General Public License v3.0. See the [`LICENSE`](LICENSE) file for details.\n","funding_links":[],"categories":["C++"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fga-developers%2Fga-benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fga-developers%2Fga-benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fga-developers%2Fga-benchmark/lists"}