Skip to content

Commit

Permalink
Merge pull request #169 from apivovarov:clang-fo
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 669418246
  • Loading branch information
The ml_dtypes Authors committed Aug 30, 2024
2 parents 63f8e97 + fe737f5 commit acf7e8c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
BasedOnStyle: Google
Language: Cpp
PointerBindsToType: true
SortIncludes: Never
AlignTrailingComments:
Kind: Always
4 changes: 1 addition & 3 deletions ml_dtypes/_src/numpy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ limitations under the License.

namespace ml_dtypes {

void ImportNumpy() {
import_array1();
}
void ImportNumpy() { import_array1(); }

} // namespace ml_dtypes
3 changes: 1 addition & 2 deletions ml_dtypes/include/float8.h
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,7 @@ class float8_e5m2 : public float8_base<float8_e5m2> {

public:
template <typename T, RequiresIsDerivedFromFloat8Base<T> = 0>
explicit EIGEN_DEVICE_FUNC float8_e5m2(T f8)
: float8_e5m2(ConvertFrom(f8)) {}
explicit EIGEN_DEVICE_FUNC float8_e5m2(T f8) : float8_e5m2(ConvertFrom(f8)) {}
};

class float8_e5m2fnuz : public float8_base<float8_e5m2fnuz> {
Expand Down
2 changes: 1 addition & 1 deletion ml_dtypes/tests/intn_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ struct ConstexprEvaluator {
// To avoid warnings about unused left-side of comma expressions,
// we additionally pass the expression through a contexpr function.
template <typename T>
constexpr void ConstexprEvaluatorFunc(T&&){}
constexpr void ConstexprEvaluatorFunc(T&&) {}

#define TEST_CONSTEXPR(expr) \
do { \
Expand Down

0 comments on commit acf7e8c

Please sign in to comment.