Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enum class fix for fmt 8.x #285

Merged
merged 1 commit into from
May 2, 2022
Merged

Enum class fix for fmt 8.x #285

merged 1 commit into from
May 2, 2022

Conversation

COM8
Copy link
Contributor

@COM8 COM8 commented May 2, 2022

Since fmt 8.0.0 enum classes are not being implicitly converted to int any more.
Refference: fmtlib/fmt#1841

Since I have to use fmt 8.0 and therefore can not use the one provided by Kompute, I defined a format extension for kp::Tensor::TensorDataTypes and kp::Tensor::TensorTypes.

I'm not too sure if they are required in both classes Tensor.hpp and Kompute.hpp.
Also let me know if the formatting of the code is fine that way, since I was not able to find any guidelines (e.g. a .clang-format file).

Since fmt 8.0.0 enum classes are not being implicitly converted to int any more.
Refference: fmtlib/fmt#1841

Signed-off-by: Fabian Sauter <sauter.fabian@mailbox.org>
@COM8
Copy link
Contributor Author

COM8 commented May 2, 2022

Also fixes #282

@axsaucedo
Copy link
Member

Nice one @COM8 - looks good. In regards to your question, we don't have a .clang-format, we should really add one as currently the format is done through the makefile:

kompute/Makefile

Lines 200 to 201 in 221ad18

format:
$(CLANG_FORMAT_BIN) -i -style="{BasedOnStyle: mozilla, IndentWidth: 4}" src/*.cpp src/include/kompute/*.hpp test/*cpp

@axsaucedo axsaucedo merged commit f731f2e into KomputeProject:master May 2, 2022
axsaucedo added a commit that referenced this pull request May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants