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

Add device-friendly numeric_limits-like struct #134

Open
bartgol opened this issue Sep 14, 2021 · 0 comments
Open

Add device-friendly numeric_limits-like struct #134

bartgol opened this issue Sep 14, 2021 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers kokkos std_meta

Comments

@bartgol
Copy link
Contributor

bartgol commented Sep 14, 2021

It happens often that one needs stuff from std::numeric_limits<ScalarT>, like epsilon or max. Unfortunately, those methods are not device friendly. EKAT could implement a device friendly version of those, which defaults to std::numeric_limits on host.

This would allow to avoid several nvcc warnings of the form

warning: calling a constexpr __host__ function("min") from a __host__ __device__ function("operator()") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.
@bartgol bartgol added enhancement New feature or request good first issue Good for newcomers kokkos std_meta labels Sep 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers kokkos std_meta
Projects
None yet
Development

No branches or pull requests

1 participant