This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP][NFC] Introduce helper functions to hide casts and such
ClosedPublic

Authored by jdoerfert on Dec 27 2022, 11:23 PM.

Diff Detail

Event Timeline

jdoerfert created this revision.Dec 27 2022, 11:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 27 2022, 11:23 PM
jdoerfert requested review of this revision.Dec 27 2022, 11:23 PM
tianshilei1992 added inline comments.Dec 28 2022, 1:25 AM
openmp/libomptarget/include/Utilities.h
235

Since we have a helper, better to use the ugly C++ style cast.

jdoerfert added inline comments.Dec 28 2022, 9:27 AM
openmp/libomptarget/include/Utilities.h
235

Will do.

kevinsala added inline comments.Dec 28 2022, 10:38 AM
openmp/libomptarget/include/Utilities.h
234

Nit.

235

Shouldn't be End - Begin?

247

Not sure if included indirectly somewhere else, but probably this will need #include <memory>.

openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h
135
jdoerfert added inline comments.Dec 28 2022, 11:01 AM
openmp/libomptarget/include/Utilities.h
235

Yeah, my bad.

247

I'll add it.

openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h
135

I got the names wrong above, logic is right.

jdoerfert abandoned this revision.Dec 28 2022, 5:30 PM

We actually have two of the three already. Will submit the last one cleaned up according to comments.

jdoerfert updated this revision to Diff 486656.Jan 5 2023, 12:56 PM

The existing functions are in the device runtime, so not usable. Addressed comments.

This revision is now accepted and ready to land.Jan 5 2023, 1:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 15 2023, 11:44 AM