Apply clang-tidy fixes for readability-identifier-naming in TosaToLinalg.cpp (NFC)

This commit is contained in:
Mehdi Amini 2022-08-29 10:27:59 +00:00
parent 6ed4310e5c
commit 3c27005479
1 changed files with 8 additions and 8 deletions

View File

@ -365,16 +365,16 @@ createLinalgBodyCalculationForElementwiseOp(Operation *op, ValueRange args,
// tosa::ClampOp
if (isa<tosa::ClampOp>(op) && elementTy.isa<FloatType>()) {
bool losesInfo = false;
APFloat min_apf = op->getAttr("min_fp").cast<FloatAttr>().getValue();
APFloat max_apf = op->getAttr("max_fp").cast<FloatAttr>().getValue();
min_apf.convert(elementTy.cast<FloatType>().getFloatSemantics(),
APFloat::rmNearestTiesToEven, &losesInfo);
max_apf.convert(elementTy.cast<FloatType>().getFloatSemantics(),
APFloat::rmNearestTiesToEven, &losesInfo);
APFloat minApf = op->getAttr("min_fp").cast<FloatAttr>().getValue();
APFloat maxApf = op->getAttr("max_fp").cast<FloatAttr>().getValue();
minApf.convert(elementTy.cast<FloatType>().getFloatSemantics(),
APFloat::rmNearestTiesToEven, &losesInfo);
maxApf.convert(elementTy.cast<FloatType>().getFloatSemantics(),
APFloat::rmNearestTiesToEven, &losesInfo);
auto min = rewriter.create<arith::ConstantOp>(
loc, elementTy, rewriter.getFloatAttr(elementTy, min_apf));
loc, elementTy, rewriter.getFloatAttr(elementTy, minApf));
auto max = rewriter.create<arith::ConstantOp>(
loc, elementTy, rewriter.getFloatAttr(elementTy, max_apf));
loc, elementTy, rewriter.getFloatAttr(elementTy, maxApf));
return clampFloatHelper(loc, args[0], min, max, rewriter);
}