I want to add automatic code formatting via clang-format to alpaka. It is not perfect, but it is easier and more consistent to rely on automatic formatting than to do it all by hand.
Before doing this, I want to apply some changes to the current style and would like to get your feedback:
c++
//#############################################################################
//! The CPU OpenMP 2.0 thread accelerator executor.
//#############################################################################
c++
//#############################################################################
//! The CPU OpenMP 2.0 thread accelerator executor.
I want to fully remove the useless comment header for Copy constructor, Copy assignment operator, ...
~I want to remove the comments after the includes.~
#include <alpaka/acc/Traits.hpp> // acc::traits::AccType
~They were helpful in the past but tend to get out-of-sync. Furthermore, clang-format does not support to align them in the way the are aligned now, which looks really strange.~
Edit: point 3 has been done
any comments?
I like that and the points above look all very good to me ✨
We can also check-in the clang-format config file into https://github.com/ComputationalRadiationPhysics/contributing/blob/master/codingGuideLines/cpp.md if it gets close enough :)
@BenjaminW3 I agree with all point expect
//#############################################################################
//! The CPU OpenMP 2.0 thread accelerator executor.
I would like also to remove //###########
@BenjaminW3 did you succeed with a first .clang-format file draft?
I already have a draft but I wanted to wait for clang 6 because it will introduce some more good formatting features.
Oh that's nice. Just for the courious, do you want to share the draft as a [WIP] in a PR here or in https://github.com/ComputationalRadiationPhysics/contributing ?
Most helpful comment
I already have a draft but I wanted to wait for clang 6 because it will introduce some more good formatting features.