/// Values corresponding to the (column) non-local variables of this
/// constraint system appearing in the order the variables correspond to
/// columns. Variables that aren't associated with any Value are set to
- /// None.
+ /// std::nullopt.
SmallVector<std::optional<Value>, 8> values;
};
/// If ith element of `useFullTiles` is true the full view should be used
/// for the promoted buffer of the ith operand in `operandsToPromote`.
/// Otherwise the partial view will be used. The decision is defaulted to
- /// `useFullTileBuffersDefault` when `useFullTileBuffers` is None and for
- /// operands missing from `useFullTileBuffers`.
+ /// `useFullTileBuffersDefault` when `useFullTileBuffers` is std::nullopt and
+ /// for operands missing from `useFullTileBuffers`.
std::optional<llvm::SmallBitVector> useFullTileBuffers;
LinalgPromotionOptions &setUseFullTileBuffers(ArrayRef<bool> useFullTiles) {
unsigned size = useFullTiles.size();
/// The shape of the output of the rank-reducing slice.
RankedTensorType sliceResultType;
/// The reassociation indices for the new collapse shape op, if required. If
- /// `None`, the slice should replace the collapse shape op.
+ /// `std::nullopt`, the slice should replace the collapse shape op.
std::optional<SmallVector<ReassociationIndices>> newReassociationIndices;
};
ArrayRef<int64_t> getShape() const;
/// Clone this type with the given shape and element type. If the
- /// provided shape is `None`, the current shape of the type is used.
+ /// provided shape is `std::nullopt`, the current shape of the type is used.
TensorType cloneWith(std::optional<ArrayRef<int64_t>> shape,
Type elementType) const;
ArrayRef<int64_t> getShape() const;
/// Clone this type with the given shape and element type. If the
- /// provided shape is `None`, the current shape of the type is used.
+ /// provided shape is `std::nullopt`, the current shape of the type is used.
BaseMemRefType cloneWith(std::optional<ArrayRef<int64_t>> shape,
Type elementType) const;
bool hasRank() const { return true; }
/// Clone this vector type with the given shape and element type. If the
- /// provided shape is `None`, the current shape of the type is used.
+ /// provided shape is `std::nullopt`, the current shape of the type is used.
VectorType cloneWith(std::optional<ArrayRef<int64_t>> shape,
Type elementType) const;
}];
>,
InterfaceMethod<[{
Returns the `BlockArgument` corresponding to operand `operandIndex` in
- some successor, or None if `operandIndex` isn't a successor operand
+ some successor, or std::nullopt if `operandIndex` isn't a successor operand
index.
}],
"::std::optional<::mlir::BlockArgument>", "getSuccessorBlockArgument",
InterfaceMethod<
/*desc=*/[{
Return the shape ratio of unrolling to the target vector shape
- `targetShape`. Return `None` if the op cannot be unrolled to the target
+ `targetShape`. Return `std::nullopt` if the op cannot be unrolled to the target
vector shape.
}],
/*retTy=*/"::std::optional<::llvm::SmallVector<int64_t, 4>>",
: Base(loc, name), benefit(benefit),
hasBoundedRecursion(hasBoundedRecursion), patternBody(body) {}
- /// The benefit of the pattern if it was explicitly specified, None otherwise.
+ /// The benefit of the pattern if it was explicitly specified, std::nullopt
+ /// otherwise.
std::optional<uint16_t> benefit;
/// If the pattern has properly bounded rewrite recursion or not.
unsigned num = vals.size();
unsigned absolutePos = IntegerPolyhedron::insertVar(kind, pos, num);
- // If a Value is provided, insert it; otherwise use None.
+ // If a Value is provided, insert it; otherwise use std::nullopt.
for (unsigned i = 0; i < num; ++i)
values.insert(values.begin() + absolutePos + i,
vals[i] ? std::optional<Value>(vals[i]) : std::nullopt);
/// Get a lower or upper (depending on `isUpper`) bound for `expr` while using
/// the constant lower and upper bounds for its inputs provided in
-/// `constLowerBounds` and `constUpperBounds`. Return None if such a bound can't
-/// be computed. This method only handles simple sum of product expressions
-/// (w.r.t constant coefficients) so as to not depend on anything heavyweight in
-/// `Analysis`. Expressions of the form: c0*d0 + c1*d1 + c2*s0 + ... + c_n are
-/// handled. Expressions involving floordiv, ceildiv, mod or semi-affine ones
-/// will lead a none being returned.
+/// `constLowerBounds` and `constUpperBounds`. Return std::nullopt if such a
+/// bound can't be computed. This method only handles simple sum of product
+/// expressions (w.r.t constant coefficients) so as to not depend on anything
+/// heavyweight in `Analysis`. Expressions of the form: c0*d0 + c1*d1 + c2*s0 +
+/// ... + c_n are handled. Expressions involving floordiv, ceildiv, mod or
+/// semi-affine ones will lead a none being returned.
static std::optional<int64_t>
getBoundForExpr(AffineExpr expr, unsigned numDims, unsigned numSymbols,
ArrayRef<std::optional<int64_t>> constLowerBounds,