Skip to content

Commit 784d80c

Browse files
authored
Add c++ style cast and remove not needed parens (#2966)
--------- Signed-off-by: Mike Essenmacher <[email protected]>
1 parent 7c58751 commit 784d80c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Dialect/Mlir/VectorMachineSupport.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ int64_t VectorMachineSupport::computeArchVectorLength(Type elementType) {
117117
int64_t totNum = vectorizedOpNum + scalarOpNum;
118118
if (!hasRegisterPressure) {
119119
// Estimate default register pressure as one per 2 vector operation.
120-
maxVectorRegisterPressure = std::max(vectorizedOpNum / 2, (int64_t)1);
120+
maxVectorRegisterPressure =
121+
std::max(vectorizedOpNum / 2, static_cast<int64_t>(1));
121122
}
122123
return totNum != 0 ? (1.0 * totProcessedValues) / (1.0 * totNum) : 1.0;
123124
}

src/Runtime/OMSort.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ typedef int(
8989
#pragma GCC diagnostic ignored "-Wcast-qual"
9090
#endif
9191

92-
#define Load(typeName, to, from) typeName (to) = (from)
92+
#define Load(typeName, to, from) typeName to = from
9393

9494
// Convert f16 elements to f32 for comparison because we don't have logic to
9595
// compare f16 elements directly on all platforms.

0 commit comments

Comments
 (0)