Skip to content

Commit

Permalink
[mlir] Apply ClangTidy performance fix
Browse files Browse the repository at this point in the history
  • Loading branch information
akuegel committed Jan 2, 2024
1 parent 734ee0e commit ac8b53f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mlir/lib/ExecutionEngine/AsyncRuntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ extern "C" int64_t mlirAsyncRuntimGetNumWorkerThreads() {

extern "C" void mlirAsyncRuntimePrintCurrentThreadId() {
static thread_local std::thread::id thisId = std::this_thread::get_id();
std::cout << "Current thread id: " << thisId << std::endl;
std::cout << "Current thread id: " << thisId << '\n';
}

//===----------------------------------------------------------------------===//
Expand Down
6 changes: 3 additions & 3 deletions mlir/lib/ExecutionEngine/SparseTensorRuntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,10 +450,10 @@ void _mlir_ciface_outSparseTensorWriterMetaData(
assert(dimRank != 0);
index_type *dimSizes = MEMREF_GET_PAYLOAD(dimSizesRef);
std::ostream &file = *static_cast<std::ostream *>(p);
file << dimRank << " " << nse << std::endl;
file << dimRank << " " << nse << '\n';
for (index_type d = 0; d < dimRank - 1; d++)
file << dimSizes[d] << " ";
file << dimSizes[dimRank - 1] << std::endl;
file << dimSizes[dimRank - 1] << '\n';
}

#define IMPL_OUTNEXT(VNAME, V) \
Expand All @@ -468,7 +468,7 @@ void _mlir_ciface_outSparseTensorWriterMetaData(
for (index_type d = 0; d < dimRank; d++) \
file << (dimCoords[d] + 1) << " "; \
V *value = MEMREF_GET_PAYLOAD(vref); \
file << *value << std::endl; \
file << *value << '\n'; \
}
MLIR_SPARSETENSOR_FOREVERY_V(IMPL_OUTNEXT)
#undef IMPL_OUTNEXT
Expand Down

0 comments on commit ac8b53f

Please sign in to comment.