Lines Matching defs:to

29   // Try to guess an optimal initial allocation size in number of elements to
43 Descriptor &to{vector.to};
44 if (to.IsAllocatable() && !to.IsAllocated()) {
50 initialAllocationSize(fromElements, to.ElementBytes())};
51 to.GetDimension(0).SetBounds(1, allocationSize);
53 (to, /*hasStat=*/false, /*errMsg=*/nullptr, vector.sourceFile,
55 to.GetDimension(0).SetBounds(1, fromElements);
62 (to, /*hasStat=*/false, /*errMsg=*/nullptr, vector.sourceFile,
68 if (to.IsAllocatable() && vector.actualAllocationSize < newToElements) {
69 // Reallocate. Ensure the current storage is at least doubled to avoid
73 std::size_t newByteSize{requestedAllocationSize * to.ElementBytes()};
78 terminator, to.raw().base_addr, newByteSize)};
79 to.set_base_addr(p);
82 to.GetDimension(0).SetBounds(1, newToElements);
86 to.GetDimension(0).SetBounds(1, newToElements);
95 Descriptor &to, bool useValueLengthParameters, const char *sourceFile,
98 RUNTIME_CHECK(terminator, to.rank() == 1);
100 to.IsAllocated() ? static_cast<SubscriptValue>(to.Elements()) : 0};
101 (void)new (&vector) ArrayConstructorVector{to, /*nextValuePosition=*/0,
108 Descriptor &to{vector.to};
110 SubscriptValue previousToElements{static_cast<SubscriptValue>(to.Elements())};
113 if (to.IsAllocatable() && !to.IsAllocated()) {
115 // Note that "to" type must already be set by the caller of this API since
121 if (to.type().IsCharacter()) {
122 to.raw().elem_len = from.ElementBytes();
123 } else if (auto *toAddendum{to.Addendum()}) {
134 } else if (to.type().IsCharacter()) {
136 if (to.ElementBytes() != from.ElementBytes()) {
140 to.ElementBytes() / to.type().GetCategoryAndKind()->second,
146 // parameters are already in the "to" descriptor.
151 // Create descriptor for "to" element or section being copied to.
153 to.GetDimension(0).LowerBound() + vector.nextValuePosition};
158 toCurrentElement.EstablishPointerSection(to, lower, upper, stride);
163 // "toCurrentElement" to "from" shape.
172 Descriptor &to{vector.to};
173 AllocateOrReallocateVectorIfNeeded(vector, terminator, to.Elements(), 1);
175 to.GetDimension(0).LowerBound() + vector.nextValuePosition};
176 std::memcpy(to.Element<char>(subscript), from, to.ElementBytes());