[Openmp-dev] coding style
Johannes Doerfert via Openmp-dev
openmp-dev at lists.llvm.org
Thu Jun 18 06:57:06 PDT 2020
On 6/18/20 6:47 AM, Jon Chesterfield via Openmp-dev wrote:
>>
>> * Shilei asked what coding style should be used for openmp
>> libraries. Currently it is inconsistent an example is device_id
>> * Suggestion is to use llvm style coding for new code as it would
>> involve lot of work to retroactively fix all the code.
>> * The rewrite of the device rtl should already be following llvm
>> style.
>>
> I'd like us to run clang-format with the llvm config across all of
> libomptarget. Failing that, at least over all of deviceRTL.
I'm fine doing that for deviceRTL in one swoop, it is changed and moved
anyway.
We can decide for the others later.
> Any objections? Any time spent on whitespace in reviews is time badly spent.
Yes, and just running clang format on the code makes things way easier ;)
> There's also the current_naming_system vs int V difference. If anyone knows
> a tool that will convert between the two reliably I'd like us to run that
> too. We may have API stability conflicts there though.
As with the above, deviceRTL can be our first candidate for a change,
not really any API stability problem there.
The public APIs have to stay, and I do prefer the style we have for them
actually.
Tthe internal ones could be renamed, also helping to make the
distinction clear.
Cheers,
Johannes
More information about the Openmp-dev
mailing list