-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
Linearizer #1039
Linearizer #1039
Conversation
... and removing some C++11 syntax in Linearizer.ih
unit test of this class ;) ? For that, you can play with the brand new |
#endif // else defined(Linearizer_RECURSES) | ||
|
||
/* GNU coding style */ | ||
/* vim: set ts=2 sw=2 expandtab cindent cinoptions=>4,n-2,{2,^-2,:2,=2,g0,h2,p5,t0,+2,(0,u0,w1,m1 : */ |
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.
cleanup these editor traces?
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.
Oooops, I will clean this !
(changelog entry ?) |
Concerning the unit test, I will look at it !
|
The bench is accessible through the test file with hidden tag [.bench] (see Catch).
Done. I think that it tests enough different cases, don't you ? :D Tags are available for each space dimension (up to 5) and each storage order, eg: |
I can't reproduce gcc warnings because I don't have the same version as Travis. Changes in HyperRectDomain_Iterator to avoid negate tests with unsigned integer in dimension 1.
}; | ||
|
||
#define TEST_LINEARIZER( N , ORDER ) \ | ||
TEST_CASE( "Testing Linearizer in dimension " #N " with " #ORDER, "[test][dim" #N "][" #ORDER "]" )\ |
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 macro based test case generator ;)
unfortunately, there is no such thing in catch yet catchorg/Catch2#358
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.
And there is also a pull request about templated test case: catchorg/Catch2#382
It is maybe possible to do cartesian product with macro ? ;)
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.
Yeah I saw this PR too (but stalled since many months)... and for me, macro programming is like juggling with activated grenades.. 😄
thanks a lot ! |
It provides linearization of point inside a given
HyperRectDomain
(with storage order specifier) and the reverse process (index to point). It replaces the linearizer used byImageContainerBySTLVector
and provides additional features: