[Mlir-commits] [mlir] d8c46eb - Apply clang-tidy fixes for readability-identifier-naming in SparseTensorUtils.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Tue May 31 04:54:42 PDT 2022


Author: Mehdi Amini
Date: 2022-05-31T11:54:19Z
New Revision: d8c46eb612e64e48f772ffdbee643cc28af73823

URL: https://github.com/llvm/llvm-project/commit/d8c46eb612e64e48f772ffdbee643cc28af73823
DIFF: https://github.com/llvm/llvm-project/commit/d8c46eb612e64e48f772ffdbee643cc28af73823.diff

LOG: Apply clang-tidy fixes for readability-identifier-naming 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 ba73af280688..430ba85affa3 100644
--- a/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp
+++ b/mlir/lib/ExecutionEngine/SparseTensorUtils.cpp
@@ -867,25 +867,25 @@ class SparseTensorEnumerator final : public SparseTensorEnumeratorBase<V> {
     } else if (src.isCompressedDim(d)) {
       // Look up the bounds of the `d`-level segment determined by the
       // `d-1`-level position `parentPos`.
-      const std::vector<P> &pointers_d = src.pointers[d];
-      assert(parentPos + 1 < pointers_d.size() &&
+      const std::vector<P> &pointersD = src.pointers[d];
+      assert(parentPos + 1 < pointersD.size() &&
              "Parent pointer position is out of bounds");
-      const uint64_t pstart = static_cast<uint64_t>(pointers_d[parentPos]);
-      const uint64_t pstop = static_cast<uint64_t>(pointers_d[parentPos + 1]);
+      const uint64_t pstart = static_cast<uint64_t>(pointersD[parentPos]);
+      const uint64_t pstop = static_cast<uint64_t>(pointersD[parentPos + 1]);
       // Loop-invariant code for looking up the `d`-level coordinates/indices.
-      const std::vector<I> &indices_d = src.indices[d];
-      assert(pstop <= indices_d.size() && "Index position is out of bounds");
-      uint64_t &cursor_reord_d = this->cursor[this->reord[d]];
+      const std::vector<I> &indicesD = src.indices[d];
+      assert(pstop <= indicesD.size() && "Index position is out of bounds");
+      uint64_t &cursorReordD = this->cursor[this->reord[d]];
       for (uint64_t pos = pstart; pos < pstop; pos++) {
-        cursor_reord_d = static_cast<uint64_t>(indices_d[pos]);
+        cursorReordD = static_cast<uint64_t>(indicesD[pos]);
         forallElements(yield, pos, d + 1);
       }
     } else { // Dense dimension.
       const uint64_t sz = src.getDimSizes()[d];
       const uint64_t pstart = parentPos * sz;
-      uint64_t &cursor_reord_d = this->cursor[this->reord[d]];
+      uint64_t &cursorReordD = this->cursor[this->reord[d]];
       for (uint64_t i = 0; i < sz; i++) {
-        cursor_reord_d = i;
+        cursorReordD = i;
         forallElements(yield, pstart + i, d + 1);
       }
     }


        


More information about the Mlir-commits mailing list