Skip to content

Commit 36c5753

Browse files
committed
[mlir] Apply ClangTidy performance finding.
1 parent a27a012 commit 36c5753

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mlir/lib/CAPI/Dialect/SparseTensor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ MlirSparseTensorLevelType mlirSparseTensorEncodingAttrBuildLvlType(
107107
unsigned size, unsigned n, unsigned m) {
108108

109109
std::vector<LevelPropNonDefault> props;
110+
props.reserve(size);
110111
for (unsigned i = 0; i < size; i++)
111112
props.push_back(static_cast<LevelPropNonDefault>(properties[i]));
112113

0 commit comments

Comments
 (0)