| 127 | } |
| 128 | |
| 129 | void expand_current_domain(Context& ctx) { |
| 130 | // Get the array schema |
| 131 | ArraySchema schema(ctx, array_name); |
| 132 | |
| 133 | // Get the domain |
| 134 | Domain domain = schema.domain(); |
| 135 | |
| 136 | // Create an ArraySchemaEvolution object |
| 137 | ArraySchemaEvolution schema_evolution(ctx); |
| 138 | |
| 139 | // Create the new CurrentDomain object |
| 140 | CurrentDomain new_current_domain(ctx); |
| 141 | |
| 142 | // Create an NDRectangle object |
| 143 | NDRectangle ndrect(ctx, domain); |
| 144 | |
| 145 | // Assign the range [1, 200] to the rectangle's first dimension |
| 146 | ndrect.set_range<int32_t>("d1", 1, 200); |
| 147 | |
| 148 | // Set the NDRectangle to the CurrentDomain |
| 149 | new_current_domain.set_ndrectangle(ndrect); |
| 150 | |
| 151 | // Set the current domain to the array schema evolution |
| 152 | schema_evolution.expand_current_domain(new_current_domain); |
| 153 | |
| 154 | // Evolve the array |
| 155 | schema_evolution.array_evolve(array_name); |
| 156 | } |
| 157 | |
| 158 | int main() { |
| 159 | Context ctx; |
no test coverage detected