This is an archive of the discontinued LLVM Phabricator instance.

Make hip math headers easier to use from C
ClosedPublic

Authored by JonChesterfield on Jul 23 2020, 4:35 PM.

Details

Summary

Make hip math headers easier to use from C

Motivation is a step towards using the hip math headers to implement math.h
for openmp, which needs to work with C as well as C++. NFC for C++ code.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald Transcript

I'm fine with this @yaxunl should accept though.

clang/lib/Headers/__clang_hip_math.h
561

Nit: You mix the C and C++ math declarations in this file, while possible, I somehow thing the cuda_{cmath/math} split is nicer.

yaxunl added inline comments.Jul 24 2020, 10:40 AM
clang/lib/Headers/__clang_hip_math.h
98

typo ?

558

typo

561

right

1185

typo

  • Fix missing underscores
JonChesterfield marked 4 inline comments as done.Jul 24 2020, 11:14 AM
JonChesterfield added inline comments.
clang/lib/Headers/__clang_hip_math.h
561

Open to me implementing that in a later patch?

yaxunl accepted this revision.Jul 24 2020, 12:25 PM

LGTM. Thanks.

clang/lib/Headers/__clang_hip_math.h
561

If you could work on it that would be great.

This revision is now accepted and ready to land.Jul 24 2020, 12:25 PM
This revision was automatically updated to reflect the committed changes.