Skip to content

Commit 0570cab

Browse files
committed
[MLIR] Apply clang-tidy fixes for misc-use-internal-linkage in IndexingUtils.cpp (NFC)
1 parent d7cbc7f commit 0570cab

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

mlir/lib/Dialect/Utils/IndexingUtils.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
using namespace mlir;
2020

2121
template <typename ExprType>
22-
SmallVector<ExprType> computeSuffixProductImpl(ArrayRef<ExprType> sizes,
23-
ExprType unit) {
22+
static SmallVector<ExprType> computeSuffixProductImpl(ArrayRef<ExprType> sizes,
23+
ExprType unit) {
2424
if (sizes.empty())
2525
return {};
2626
SmallVector<ExprType> strides(sizes.size(), unit);
@@ -30,8 +30,8 @@ SmallVector<ExprType> computeSuffixProductImpl(ArrayRef<ExprType> sizes,
3030
}
3131

3232
template <typename ExprType>
33-
SmallVector<ExprType> computeElementwiseMulImpl(ArrayRef<ExprType> v1,
34-
ArrayRef<ExprType> v2) {
33+
static SmallVector<ExprType> computeElementwiseMulImpl(ArrayRef<ExprType> v1,
34+
ArrayRef<ExprType> v2) {
3535
// Early exit if both are empty, let zip_equal fail if only 1 is empty.
3636
if (v1.empty() && v2.empty())
3737
return {};
@@ -42,8 +42,8 @@ SmallVector<ExprType> computeElementwiseMulImpl(ArrayRef<ExprType> v1,
4242
}
4343

4444
template <typename ExprType>
45-
ExprType linearizeImpl(ArrayRef<ExprType> offsets, ArrayRef<ExprType> basis,
46-
ExprType zero) {
45+
static ExprType linearizeImpl(ArrayRef<ExprType> offsets,
46+
ArrayRef<ExprType> basis, ExprType zero) {
4747
assert(offsets.size() == basis.size());
4848
ExprType linearIndex = zero;
4949
for (unsigned idx = 0, e = basis.size(); idx < e; ++idx)
@@ -52,9 +52,9 @@ ExprType linearizeImpl(ArrayRef<ExprType> offsets, ArrayRef<ExprType> basis,
5252
}
5353

5454
template <typename ExprType, typename DivOpTy>
55-
SmallVector<ExprType> delinearizeImpl(ExprType linearIndex,
56-
ArrayRef<ExprType> strides,
57-
DivOpTy divOp) {
55+
static SmallVector<ExprType> delinearizeImpl(ExprType linearIndex,
56+
ArrayRef<ExprType> strides,
57+
DivOpTy divOp) {
5858
int64_t rank = strides.size();
5959
SmallVector<ExprType> offsets(rank);
6060
for (int64_t r = 0; r < rank; ++r) {

0 commit comments

Comments
 (0)