Skip to content

Commit 351076f

Browse files
committed
Cleanup: replace comments that were not generalized, use doxygen-style comments
1 parent 887687a commit 351076f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

mlir/include/mlir/Dialect/Tosa/Transforms/TosaFoldCommon.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,26 @@
2020
namespace mlir {
2121
namespace tosa {
2222

23-
// Transform a tensor with the given transformation function.
23+
/// Transform a tensor with the given transformation function.
2424
DenseElementsAttr applyElementWise(
2525
const DenseElementsAttr &toTransform,
2626
const std::function<llvm::APFloat(const llvm::APFloat &, Type)> &toApply);
2727

28-
/// Function that checks if arg is a dense TOSA constant float tensor
28+
/// Function that checks if \p toCheck is a dense TOSA constant float tensor.
2929
LogicalResult notifyIfNotConstantFloatTosaTensor(TypedValue<TensorType> toCheck,
3030
TosaOp location,
3131
PatternRewriter &);
3232

33-
/// Function that checks if arg is a dense TOSA constant tensor
33+
/// Function that checks if \p toCheck is a dense TOSA constant tensor.
3434
LogicalResult notifyIfNoTosaDenseConstantTensor(TypedValue<TensorType> toCheck,
3535
TosaOp location,
3636
PatternRewriter &);
3737

38-
/// Function that checks if the contained type is float
38+
/// Function that checks if the type contained in \p toCheck is float.
3939
LogicalResult notifyIfNotFloat(TypedValue<TensorType> toCheck, TosaOp location,
4040
PatternRewriter &);
4141

42-
/// Function to compute the reciprocal
42+
/// Function to compute the reciprocal.
4343
APFloat computeReciprocal(const APFloat &, Type);
4444

4545
} // namespace tosa

mlir/lib/Dialect/Tosa/Transforms/TosaFoldCommon.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ DenseElementsAttr mlir::tosa::applyElementWise(
3434
// all of them to avoid dynamic resizing
3535
transformedValues.reserve(toTransform.getNumElements());
3636
for (auto val : toTransform.getValues<llvm::APFloat>()) {
37-
auto recipVal = toApply(val, toTransform.getElementType());
38-
transformedValues.push_back(recipVal);
37+
auto transformedVal = toApply(val, toTransform.getElementType());
38+
transformedValues.push_back(transformedVal);
3939
}
4040

41-
// Replace the current tensor with one containing the computed reciprocals
41+
// Replace the current tensor with one containing the computed values
4242
auto newTensor =
4343
DenseElementsAttr::get(toTransform.getType(), transformedValues);
4444
return newTensor;

0 commit comments

Comments
 (0)