-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
100 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# About | ||
|
||
Come back later! | ||
This is a passion project in an endeavor to provide a GA library that is as usable and practical as it is instructional. A huge shoutout to Steven De Kininck ([his blog](https://enkimute.github.io/)) for his input and feedback during GAL's development. | ||
|
||
GAL is in its infancy, but if you've found a use for it or would like to contribute, please do contact me. I'd love to hear from you. Feel free to shoot me a pm on the [bivector.net](https://discourse.bivector.net) forums [here](https://discourse.bivector.net/u/ninepoints). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Coding Conventions | ||
|
||
This document describes a number of patterns you should expect to encounter as either a user or a contributor of the library. | ||
|
||
## General Guidelines | ||
|
||
- Like the STL, the canonical casing is `snake_case` for classes, structs, unions, and variables. | ||
- GAL never allocates on the heap. | ||
- No virtual dispatch is used. | ||
- No inheritance is used. | ||
- Don't-pay-for-what-you-don't-use is a manifest property and no *runtime* overhead is imposed unintentionally. | ||
- Zero-initialization is not provided for runtime types | ||
- Division-by-zero is not checked (i.e. during normalization) | ||
- Every feature must have compile times taken into consideration. | ||
- User facing APIs are in the `gal` namespace or in one of the model namespaces. | ||
- Hidden functionality or implementation detail is contained in a nested `detail` namespace. | ||
- Methods are decorated appropriately with attributes and qualifiers (`[[nodiscard]]`, `noexcept`, `const`). | ||
|
||
## Notes to Developers | ||
|
||
- The largely header-only aspect of the library is due to the heavy reliance on `constexpr` which implicitly inlines the function. | ||
- Type names are often kept short and abbreviated to reduce parsing time. This isn't done unless profiling shows it to be necessary. | ||
- The codegen of the final expression reification is extremely sensitive to changes in the code, so if operating in this area, a benchmark is necessary to verify no regression took place. | ||
- When juggling templates, we endeavor (greatly!) to avoid template instantiations wherever possible. By the same token, we avoid relying on `std::tuple`, SFINAE, recursion, and other techniques known to have adverse effects on compile time wherever possible. | ||
- GAL tiptoes around undefined behavior as much as possible, preferring to be standards conforming. The notable exception is the reliance of well-behaved alignment for structs and data members colocated within a union. This is a reasonable expectation for all modern compilers today. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,22 @@ | ||
site_name: Porism | ||
site_name: GAL | ||
theme: cinder | ||
site_url: https://jeremyong.com/gal | ||
repo_url: https://github.com/jeremyong/gal | ||
repo_name: GitHub | ||
site_description: GAL - A fast C++17 geometric algebra library | ||
site_author: Jeremy Ong | ||
copyright: 'Jeremy Ong 2019' | ||
google_analytics: ['UA-10576233-1', 'jeremyong.com'] | ||
|
||
theme: cinder | ||
plugins: [] | ||
|
||
nav: | ||
- 'Home': 'index.md' | ||
- 'Coding Conventions': 'coding-conventions' | ||
- 'About': 'about.md' | ||
|
||
extra_javascript: | ||
- https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-AMS-MML_HTMLorMML | ||
|
||
copyright: 'Jeremy Ong 2019' | ||
|
||
markdown_extensions: | ||
- mdx_math |