[Mlir-commits] [mlir] db6796d - Apply clang-tidy fixes for modernize-use-default-member-init in SparseTensorUtils.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Thu Apr 14 15:59:45 PDT 2022
Author: Mehdi Amini
Date: 2022-04-14T22:59:14Z
New Revision: db6796dfa8645e87629dc8b8c165dd6ccbc64dfa
URL: https://github.com/llvm/llvm-project/commit/db6796dfa8645e87629dc8b8c165dd6ccbc64dfa
DIFF: https://github.com/llvm/llvm-project/commit/db6796dfa8645e87629dc8b8c165dd6ccbc64dfa.diff
LOG: Apply clang-tidy fixes for modernize-use-default-member-init in SparseTensorUtils.cpp (NFC)
Added:
Modified:
mlir/lib/ExecutionEngine/SparseTensorUtils.cpp
Removed:
################################################################################
diff --git a/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp b/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp
index 576abbcd3ea6d..b4faa1955d9d9 100644
--- a/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp
+++ b/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp
@@ -111,7 +111,7 @@ template <typename V>
struct SparseTensorCOO {
public:
SparseTensorCOO(const std::vector<uint64_t> &szs, uint64_t capacity)
- : sizes(szs), iteratorLocked(false), iteratorPos(0) {
+ : sizes(szs) {
if (capacity)
elements.reserve(capacity);
}
@@ -173,8 +173,8 @@ struct SparseTensorCOO {
private:
const std::vector<uint64_t> sizes; // per-dimension sizes
std::vector<Element<V>> elements;
- bool iteratorLocked;
- unsigned iteratorPos;
+ bool iteratorLocked = false;
+ unsigned iteratorPos = 0;
};
/// Abstract base class for `SparseTensorStorage<P,I,V>`. This class
More information about the Mlir-commits
mailing list