File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
mlir/lib/Dialect/Tosa/Transforms Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -46,12 +46,10 @@ struct TosaFoldConstantReciprocal : public OpRewritePattern<ReciprocalOp> {
46
46
47
47
// Compute the reciprocal for each tensor element
48
48
llvm::SmallVector<APFloat, 1 > transformedValues;
49
- // We already know the amount of values we will insert, reserver space for
49
+ // We already know the amount of values we will insert, reserve space for
50
50
// all of them to avoid dynamic resizing
51
51
transformedValues.reserve (inputValues.getNumElements ());
52
- for (auto it = inputValues.value_begin <APFloat>();
53
- it != inputValues.value_end <APFloat>(); it++) {
54
- auto val = *it;
52
+ for (auto val : inputValues.getValues <APFloat>()) {
55
53
auto recipVal = computeReciprocal (val, inputValues.getElementType ());
56
54
transformedValues.push_back (recipVal);
57
55
}
You can’t perform that action at this time.
0 commit comments