-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Extend templation in GenVector to better support vectorised Vc types. #394
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
Merged
vgvassilev
merged 54 commits into
root-project:master
from
cjones051073:GenVector-AddTemplates
Mar 15, 2017
Merged
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
76a8f9d
Template the GenVector Plane3D, Transform3D and Translation3D classes…
cjones051073 7e9c2b7
Use the 'using namespace std' trick with Cartesian3D and Plane3D to f…
cjones051073 b15d62a
Extend the 'using namespace std' trick to a few more classes
cjones051073 2b2fc17
Change class to typename
cjones051073 2e74f0d
Explicitly cast some constants to the scalar type (needed for Vc types)
cjones051073 c3175c6
Remove empty implementation files
cjones051073 9bdfb8e
Template the Boost classes
cjones051073 c97245c
Remove empty implementation files for Boost classes
cjones051073 f12d368
Clean up some indentations
cjones051073 bbbbbd0
Add some missing template types to the Boost classes
cjones051073 9a0ee77
Remove empty Boost implementation file
cjones051073 371d50d
Small cleanups
cjones051073 dcb0b30
Clean up some initialisations
cjones051073 29e7e30
Merge branch 'master' of github.com:root-mirror/root into GenVector-A…
cjones051073 14e73b4
Add Scalar/Vector Plane3D::Normalise() methods using SFINAE
cjones051073 27bbb57
Merge branch 'master' of github.com:root-mirror/root into GenVector-A…
cjones051073 196a00b
Roll back some changes for now, as they are causing problems in the t…
cjones051073 0ad5828
Merge branch 'master' of github.com:root-mirror/root into GenVector-A…
cjones051073 1928c75
Add specific vectorised implementations of a few methods
cjones051073 5ccdaea
Extend ostream operator for Displacement and Position vectors to supp…
cjones051073 ef1aea9
Fix the vector abs method (not fabs) and Vector Unit() for vectorised…
cjones051073 6cac16a
Merge branch 'master' of github.com:root-mirror/root into GenVector-A…
cjones051073 68ba28a
Merge branch 'master' of github.com:root-mirror/root into GenVector-A…
cjones051073 939b7cb
Merge branch 'master' of github.com:root-mirror/root into GenVector-A…
cjones051073 d9b810b
Merge branch 'master' of github.com:root-mirror/root into GenVector-A…
cjones051073 776ce1a
Add override qualifier
cjones051073 fbe74d2
Merge branch 'master' of github.com:root-mirror/root into GenVector-A…
cjones051073 12b43b0
Fix initialisation bug
cjones051073 8367bdf
remove space
cjones051073 0f404ba
Some small changes following review comments
cjones051073 65a701d
remove spaces
cjones051073 4ba8a1b
Merge branch 'master' of github.com:root-mirror/root into GenVector-A…
cjones051073 ff94a5a
Merge branch 'master' of github.com:root-mirror/root into GenVector-A…
cjones051073 b8ca822
Fix formatting using clang-format
cjones051073 b32cb6a
some more 'using namespace std' updates
cjones051073 febe783
Fix more clang format issues
cjones051073 a628a2a
fix (hopefully) one more clang format issue
cjones051073 89b2d26
clang format is picky...
cjones051073 6bf0368
Merge branch 'master' of github.com:root-mirror/root into GenVector-A…
cjones051073 bd96bd0
revert changes in VectorUtils.h
cjones051073 dea8d05
Add new test for GenVector with Vc types
cjones051073 a18221a
extend test to 96 photons
cjones051073 eb0b8ed
reorder headers
cjones051073 7da1945
remove comment that number of test photons must be multiple of 8, as …
cjones051073 a271eab
Add <cmath> header includes
cjones051073 decbe11
revert back to using std:: as it seems to cause issues with gcc build…
cjones051073 58c6315
Include Vc before ROOT in test application. Needed for std:: support...
cjones051073 17f42a3
Add some more missing std::
cjones051073 434396d
More math updates
cjones051073 b145899
Change enable_if implementation in GenVector
cjones051073 ad8d3a5
update comment
cjones051073 b018a03
Extend the GenVector Vc test with a timing test that asserts that the…
cjones051073 bb1e386
add fabs on timing diff and extend Vc genvector expected diff to 25%
cjones051073 1786383
do not return a failure from the Vc speed test, as test could be run …
cjones051073 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Extend the 'using namespace std' trick to a few more classes
- Loading branch information
commit b15d62aebad03d5c5d4e4219c919a9ca29ebff0d
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Hm, what is the advantage of the
using namespace std;pattern, instead of usingreturn std::sqrt...?Uh oh!
There was an error while loading. Please reload this page.
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.
It is required to support Vc types. For Vc types you need to use the versions of sqrt etc. shipped as part of that library. Using std::sqrt does not allow this. The namespace trick means you use the std:: versions when appropriate, but also allows other implementations when not.
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.
Huh, thanks for explaining! Neat and subtle at the same time. Btw, there is an inherited extra space after the open paren.
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.
Btw, it's @lmoneta's call but I'd prefer to have a short comment saying what the pattern does, or maybe a #define R__enable_vc_types using namespace std; This would make this easier to read by an unarmed eye.
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.
I dislike preprocessor directives unless absolutely required, and I don't think here adding one really helps. To my eye the pattern as is is clear, but as you say its up to @lmoneta . I would be OK with adding some sort of comment somewhere ?
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.
I think a comment would be as clear and more concise than a ifdef
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.
Hi,
I don't understand this. Are you sure it is needed for Vc ? In the past I have seen Vc replacing automatically its vectorised function implementations in the std namespace
Uh oh!
There was an error while loading. Please reload this page.
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.
I am sure I ran into some issue that lead me to doing this... Also note the templation is in principle there for other types than Vc. This change in principle supports types that do not extend the math functions under std::, as well as those that do.