-
Notifications
You must be signed in to change notification settings - Fork 397
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
EAMxx: improve horiz/vert contraction tests #6897
Conversation
for(int i = 0; i < dim0; ++i) { | ||
for(int j = 0; j < dim1; ++j) { | ||
for(int k = 0; k < dim2; ++k) { | ||
mr3(i, j) += v1(i, k) * v2(i, j, k); | ||
} | ||
REQUIRE_THAT(rr3(i, j), Catch::Matchers::WithinRel(mr3(i, j), tol)); |
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.
@bartgol I decided to keep the manual unrolling stuff because I thought it is better to keep utils isolated in their testing (kinda with a reference of frame of basics) instead of using more advanced mathy construction
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.
Sounds good. Personally, I find mathy more readable than impl-rich loops with views access. After all, once the utils are tested, why not using them inside other tests?
But really, this is fine, it's just a matter of taste. :)
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.
Looks good. I have a couple of comments, but nothing too important.
imrpoves contraction testing by using catch2 matchers to allow for tolerance and expand contracted dimensions.
Fixes #6893