Lines Matching refs:shape

30       details->shape().CanBeImpliedShape();  in IsImpliedShape()
36 const auto &shape{details->shape()}; in IsExplicitShape() local
37 return shape.Rank() == 0 || in IsExplicitShape()
38 shape.IsExplicitShape(); // true when scalar, too in IsExplicitShape()
80 Shape shape; in CreateShape() local
82 shape.emplace_back(GetExtent(base, dimension)); in CreateShape()
84 return shape; in CreateShape()
87 std::optional<ExtentExpr> AsExtentArrayExpr(const Shape &shape) { in AsExtentArrayExpr() argument
89 for (const auto &dim : shape) { in AsExtentArrayExpr()
100 FoldingContext &context, const Shape &shape) { in AsConstantShape() argument
101 if (auto shapeArray{AsExtentArrayExpr(shape)}) { in AsConstantShape()
110 Constant<SubscriptInteger> AsConstantShape(const ConstantSubscripts &shape) { in AsConstantShape() argument
113 for (auto dim : shape) { in AsConstantShape()
116 return {std::move(result), ConstantSubscripts{GetRank(shape)}}; in AsConstantShape()
119 ConstantSubscripts AsConstantExtents(const Constant<ExtentType> &shape) { in AsConstantExtents() argument
121 for (const auto &extent : shape.values()) { in AsConstantExtents()
128 FoldingContext &context, const Shape &shape) { in AsConstantExtents() argument
129 if (auto shapeConstant{AsConstantShape(context, shape)}) { in AsConstantExtents()
136 Shape AsShape(const ConstantSubscripts &shape) { in AsShape() argument
138 for (const auto &extent : shape) { in AsShape()
144 std::optional<Shape> AsShape(const std::optional<ConstantSubscripts> &shape) { in AsShape() argument
145 if (shape) { in AsShape()
146 return AsShape(*shape); in AsShape()
152 Shape Fold(FoldingContext &context, Shape &&shape) { in Fold() argument
153 for (auto &dim : shape) { in Fold()
156 return std::move(shape); in Fold()
160 FoldingContext &context, std::optional<Shape> &&shape) { in Fold() argument
161 if (shape) { in Fold()
162 return Fold(context, std::move(*shape)); in Fold()
198 MaybeExtentExpr GetSize(Shape &&shape) { in GetSize() argument
200 for (auto &&dim : std::move(shape)) { in GetSize()
210 ConstantSubscript GetSize(const ConstantSubscripts &shape) { in GetSize() argument
212 for (auto dim : shape) { in GetSize()
251 int rank{details->shape().Rank()}; in GetLowerBound()
253 const semantics::ShapeSpec &shapeSpec{details->shape()[dimension_]}; in GetLowerBound()
442 } else if (auto shape{GetShape(assoc->expr())}) { in GetExtent() local
443 if (dimension < static_cast<int>(shape->size())) { in GetExtent()
444 return std::move(shape->at(dimension)); in GetExtent()
450 if (auto shape{GetShape(symbol)}) { in GetExtent() local
451 if (dimension < static_cast<int>(shape->size())) { in GetExtent()
452 return std::move(shape->at(dimension)); in GetExtent()
457 for (const auto &shapeSpec : details->shape()) { in GetExtent()
498 if (auto shape{GetShape(subs.value())}) { in GetExtent() local
499 if (GetRank(*shape) > 0) { in GetExtent()
500 CHECK(GetRank(*shape) == 1); // vector-valued subscript in GetExtent()
501 return std::move(shape->at(0)); in GetExtent()
536 int rank{details->shape().Rank()}; in GetRawUpperBound()
538 const auto &bound{details->shape()[dimension].ubound().GetExplicit()}; in GetRawUpperBound()
550 if (auto shape{GetShape(assoc->expr())}) { in GetRawUpperBound() local
551 if (dimension < static_cast<int>(shape->size())) { in GetRawUpperBound()
553 GetRawLowerBound(base, dimension), std::move(shape->at(dimension))); in GetRawUpperBound()
587 int rank{details->shape().Rank()}; in GetUBOUND()
589 const semantics::ShapeSpec &shapeSpec{details->shape()[dimension]}; in GetUBOUND()
600 if (auto shape{GetShape(assoc->expr())}) { in GetUBOUND() local
601 if (dimension < static_cast<int>(shape->size())) { in GetUBOUND()
604 std::move(*lb), std::move(shape->at(dimension))); in GetUBOUND()
626 for (const auto &shapeSpec : details->shape()) { in GetUBOUNDs()
661 int n{object.shape().Rank()}; in operator ()()
730 Shape shape; in operator ()() local
735 shape.emplace_back(GetExtent(ss, base, dimension)); in operator ()()
739 if (shape.empty()) { in operator ()()
744 return shape; in operator ()()
752 Shape shape; in operator ()() local
756 shape.emplace_back(GetExtent(ss, base, dimension)); in operator ()()
760 return shape; in operator ()()
928 if (GetRank(moldTypeAndShape->shape()) == 0) { in operator ()()
969 if (auto shape{(*this)(call.arguments().at(0))}) { in operator ()() local
970 if (shape->size() == 2) { in operator ()()
971 std::swap((*shape)[0], (*shape)[1]); in operator ()()
972 return shape; in operator ()()