-
Notifications
You must be signed in to change notification settings - Fork 355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SmallMatrix: Matrix class with compile time size #4176
Conversation
d14b4cf
to
6df0eb1
Compare
6df0eb1
to
a2d7c22
Compare
it would be good to have a |
932bd1e
to
5c6ce39
Compare
b1db197
to
6f827e4
Compare
Add amrex::SmallMatrix class with compile time size.
6f827e4
to
11782c6
Compare
Notes on why SmallMatrix matrix{} is zero initialized. SmallMatrix is not an aggregate, because it has a user declared default Why is SmallMatrix's default constructor user-declared not user-provided? Reference: |
Is |
FYI @cemitch99 |
It's uninitialized by default.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is super useful, I think that is all we currently need 🚀 ✨
auto v3 = SmallVector<double,3>::Zero(); | ||
v3[0] = 1.; | ||
v3(1) = 2.; | ||
v3[2] = 3.; | ||
auto m33 = SmallMatrix<double,3,3>::Identity(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, very useful!
Update AMReX to the latest `development` commit, so we can start using the `SmallMatrix` math from AMReX-Codes/amrex#4176
* AMReX: `development` Update AMReX to the latest `development` commit, so we can start using the `SmallMatrix` math from AMReX-Codes/amrex#4176 * Update `pyAMReX` to latest `development` Use latest commit in `development` for breaking AMReX changes.
Add amrex::SmallMatrix class with compile time size.
Useful for, e.g.: