MCPcopy Create free account
hub / github.com/TileDB-Inc/TileDB / get_subarray

Method get_subarray

tiledb/sm/subarray/subarray.cc:1027–1050  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1025}
1026
1027Subarray Subarray::get_subarray(uint64_t start, uint64_t end) const {
1028 // TBD: is it ok that Subarray log id will increase as if it's a new subarray?
1029 Subarray ret(array_, layout_, stats_->parent(), logger_, coalesce_ranges_);
1030
1031 auto start_coords = get_range_coords(start);
1032 auto end_coords = get_range_coords(end);
1033
1034 auto dim_num = this->dim_num();
1035 for (unsigned d = 0; d < dim_num; ++d) {
1036 if (!range_subset_[d].is_implicitly_initialized()) {
1037 for (uint64_t r = start_coords[d]; r <= end_coords[d]; ++r) {
1038 ret.add_range_unsafe(d, range_subset_[d][r]);
1039 }
1040 }
1041 }
1042
1043 ret.tile_overlap_ = tile_overlap_;
1044 ret.tile_overlap_.update_range(start, end);
1045
1046 // Compute range offsets
1047 ret.compute_range_offsets();
1048
1049 return ret;
1050}
1051
1052bool Subarray::has_label_ranges() const {
1053 return std::any_of(

Callers 4

nextMethod · 0.80
split_currentMethod · 0.80
next_from_multi_rangeMethod · 0.80

Calls 6

dim_numMethod · 0.95
parentMethod · 0.80
update_rangeMethod · 0.80
compute_range_offsetsMethod · 0.80
add_range_unsafeMethod · 0.45

Tested by

no test coverage detected