| 1769 | } |
| 1770 | |
| 1771 | void Subarray::reset_default_ranges() { |
| 1772 | if (array_->non_empty_domain_computed()) { |
| 1773 | auto dim_num = array_->array_schema_latest().dim_num(); |
| 1774 | auto& domain{array_->array_schema_latest().domain()}; |
| 1775 | |
| 1776 | // Process all dimensions one by one. |
| 1777 | for (unsigned d = 0; d < dim_num; d++) { |
| 1778 | // Only enter the check if there are only one range set on the dimension. |
| 1779 | if (!is_default_[d] && range_subset_[d].num_ranges() == 1) { |
| 1780 | // If the range set is the same as the non empty domain. |
| 1781 | auto& ned = array_->non_empty_domain()[d]; |
| 1782 | if (ned == range_subset_[d][0]) { |
| 1783 | // Reset the default flag and reset the range subset to be default. |
| 1784 | is_default_[d] = true; |
| 1785 | auto dim{domain.dimension_ptr(d)}; |
| 1786 | range_subset_[d] = RangeSetAndSuperset( |
| 1787 | dim->type(), dim->domain(), true, coalesce_ranges_); |
| 1788 | } |
| 1789 | } |
| 1790 | } |
| 1791 | } |
| 1792 | } |
| 1793 | |
| 1794 | void Subarray::compute_range_offsets() { |
| 1795 | range_offsets_.clear(); |
no test coverage detected