[GPU] Remove hand-rolled static_assert#4797
Conversation
|
Line 9 in f8a48dd Currently we search for version 9. Its also the minimum version on our CI. So I would say you can go ahead and remove it? |
|
Thank you so much, @larshg, for pointing this out. It always fills me with join if I can remove unneeded code. Thanks to your comment, we can even remove an entire file. |
|
Seems its 10.2 currently thats lowest on CI: https://dev.azure.com/PointCloudLibrary/pcl/_build/results?buildId=19278&view=logs&j=149f4e41-9368-548e-d6d4-ff21d16f0ace&t=419be3d8-25a4-545d-da3e-1be8b204b16c&l=236 |
| * Author: Anatoly Baskeheev, Itseez Ltd, (myname.mysurname@mycompany.com) | ||
| */ | ||
|
|
||
| //TODO: Once PCL requires min CUDA7 (allows c++11 on device), remove file |
There was a problem hiding this comment.
Instead of removing, let's deprecate the header for PCL 1.15 release
There was a problem hiding this comment.
Thanks for your comment! I added a deprecated attribute. Did you had this in mind? Is there another way to mark pending deprecation?
| template<> struct Static<true> | ||
|
|
||
| template <> | ||
| struct [[deprecated("This class will be replaced at PCL release 1.15 by " |
There was a problem hiding this comment.
Please also add a deprecation for the file itself. PCL_DEPRECATED_HEADER
There was a problem hiding this comment.
Thanks for the comment, Kunal! I have added the deprecation notice. Is that what you had in mind?
static_assert
|
@FabianSchuetze Are you interested in continuing this pull request? Seems like it is almost done |
|
Thanks for your message, @mvieth . I am happy to continue with this PR and I tried to address Kunal's suggestion. The build failed twice, do you maybe have an idea how that is related to the code changes? |
|
Seems like and odd failing unit test with following error: /Users/runner/work/1/s/test/search/test_organized.cpp:259: Failure So I think we can just ignore it. |
|
I'm getting the following errors: Seems one-argument is first supported when c++17 is enabled on VS. See also: https://stackoverflow.com/questions/65056159/i-dont-know-why-this-static-assert-code-doesnt-work |
|
I restarted the test and it should pass now, but yes, otherwise we can ignore it. |
|
@FabianSchuetze Do you have time to continue this PR (add a simple message string for each static_assert)? Otherwise I might take over |
The PR contains cosmetic changes to make the GPU code easier to read. The GPU code relies on template metaprogramming for a static check, but more concise c++11 functionality can replace these checks. Once PCL requires CUDA7 as the minimum CUDA version, we can remove the implementation of this static check altogether and replace the last remaining call with c++11 code.