1919using namespace mlir ;
2020
2121template <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
3232template <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
4444template <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
5454template <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