jax-ml / ml_dtypes

A stand-alone implementation of several NumPy dtype extensions used in machine learning.
Apache License 2.0
191 stars 25 forks source link

Add .clang-format #169

Closed apivovarov closed 2 weeks ago

apivovarov commented 3 weeks ago

To ensure consistent formatting across .cc and .h files, add a .clang-format file to the project. This allows clang-format to automatically apply the desired style when editing files (e.g., in VSCode).

Problem: Without a .clang-format file, clang-format defaults to the LLVM style, which differs from the existing formatting in .cc files.

The .clang-format file was copied from OpenXLA/XLA project

apivovarov commented 2 weeks ago

Hi Jake, what you think about adding .clang-format file to the project? @jakevdp

jakevdp commented 2 weeks ago

Looks good, thanks!

jakevdp commented 2 weeks ago

Hi - can you rebase against the updated main branch? That should fix the failures here and unblock merging this.

apivovarov commented 2 weeks ago

Hi - can you rebase against the updated main branch? That should fix the failures here and unblock merging this.

done