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

Method set_subarray_unsafe

tiledb/sm/subarray/subarray.cc:365–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

363}
364
365void Subarray::set_subarray_unsafe(const void* subarray) {
366 add_default_ranges();
367 if (subarray != nullptr) {
368 auto dim_num = array_->array_schema_latest().dim_num();
369 auto s_ptr = (const unsigned char*)subarray;
370 uint64_t offset = 0;
371 for (unsigned d = 0; d < dim_num; ++d) {
372 auto r_size =
373 2 * array_->array_schema_latest().dimension_ptr(d)->coord_size();
374 Range range(&s_ptr[offset], r_size);
375 this->add_range_unsafe(d, std::move(range));
376 offset += r_size;
377 }
378 }
379}
380
381void Subarray::add_range(unsigned dim_idx, const void* start, const void* end) {
382 if (dim_idx >= this->array_->array_schema_latest().dim_num())

Callers 5

reader_from_capnpFunction · 0.45
index_reader_from_capnpFunction · 0.45
dense_reader_from_capnpFunction · 0.45
query_from_capnpFunction · 0.45

Calls 5

add_range_unsafeMethod · 0.95
array_schema_latestMethod · 0.80
dim_numMethod · 0.45
coord_sizeMethod · 0.45
dimension_ptrMethod · 0.45

Tested by

no test coverage detected