Skip to content
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

Prefer numeric_limits from standard library #3360

Merged
merged 3 commits into from
Sep 26, 2019

Conversation

SunBlack
Copy link
Contributor

@SunBlack SunBlack commented Sep 23, 2019

Use std::numeric_limits instead of custom implementation of numeric_limits or numeric_limits without std:: prefix (further preparation for #3235)

--expt-relaxed-constexpr (docu) was necessary, because of:

/media/sf_pcl/gpu/kinfu/src/cuda/utils.hpp(126): error: calling a constexpr __host__ function("epsilon") from a __device__ function("computeRoots3") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

Was not sure if you want to deprecated custom implementation first, but to switch to std::numeric_limits from pcl::device::numeric_limits is not this complicated ;-).

…imits or numeric_limits without std:: prefix
cmake/pcl_find_cuda.cmake Outdated Show resolved Hide resolved
@SunBlack
Copy link
Contributor Author

Added some constexpr and reduced scope of variables (last to prevent Cppcheck warnings).

@taketwo taketwo changed the title Prefer std::numeric_limits Prefer std::numeric_limits Sep 26, 2019
@taketwo taketwo merged commit cd99444 into PointCloudLibrary:master Sep 26, 2019
@SunBlack SunBlack deleted the numeric_limits branch September 26, 2019 20:47
@taketwo taketwo changed the title Prefer std::numeric_limits Prefer numeric_limits from standard library Jan 14, 2020
@taketwo taketwo added the c++14 label Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants