Page MenuHomePhabricator

[CUDA] Add math forward declares.
ClosedPublic

Authored by jlebar on Mar 28 2016, 6:56 PM.

Details

Summary

This is necessary for a future patch which will make all constexpr
functions implicitly host+device. cmath may declare constexpr
functions, but these we do *not* want to be host+device. The forward
declares added in this patch prevent this (because the rule will be,
constexpr functions become implicitly host+device unless they're
preceeded by a decl with device).

Diff Detail

Repository
rL LLVM

Event Timeline

jlebar updated this revision to Diff 51867.Mar 28 2016, 6:56 PM
jlebar retitled this revision from to [CUDA] Add math forward declares..
jlebar updated this object.
jlebar added reviewers: rnk, rsmith, tra.
jlebar added a subscriber: cfe-commits.
jlebar updated this revision to Diff 51988.Mar 29 2016, 2:44 PM

Fix typo in wrapper header. (How did this ever work??)

tra accepted this revision.Mar 29 2016, 5:06 PM
tra edited edge metadata.

One nit. LGTM otherwise.

lib/Headers/__clang_cuda_math_forward_declares.h
1 ↗(On Diff #51988)

This should be updated.

This revision is now accepted and ready to land.Mar 29 2016, 5:06 PM
jlebar marked an inline comment as done.Mar 30 2016, 4:18 PM

Thank you for the review, Art!

This revision was automatically updated to reflect the committed changes.