[CUDA] Make min/max shims host+device.
Needs ReviewPublic

Authored by jlebar on Mon, Jun 11, 10:36 AM.

Details

Reviewers
rsmith
Summary

Fixes PR37753: min/max can't be called from host device
functions in C++14 mode.

Testcase in a separate test-suite commit.

jlebar created this revision.Mon, Jun 11, 10:36 AM
tra added a subscriber: tra.Tue, Jun 12, 11:21 AM

Last comment in the bug pointed out that those overloads should be constexpr in c++14. Maybe in a separate patch, though.

https://bugs.llvm.org/show_bug.cgi?id=37753#c5

Last comment in the bug pointed out that those overloads should be constexpr in c++14. Maybe in a separate patch, though.

Yeah, would prefer to do it in a separate patch. It's possible that having constexpr min/max in C++14 mode *without a C++14 standard library* will cause problems. (Don't mean to FUD it -- we should try. I just would like to be able to roll them back separately. :)

In D48036#1131279, @tra wrote:

Ack.

Patches sent (see dependency chain in phab).

@rsmith friendly ping on this one.