| 469 | */ |
| 470 | template <class T> |
| 471 | std::array<T, 3> range(unsigned dim_idx, uint64_t range_idx) { |
| 472 | impl::type_check<T>(schema_.domain().dimension(dim_idx).type()); |
| 473 | auto& ctx = ctx_.get(); |
| 474 | const void *start, *end, *stride; |
| 475 | ctx.handle_error(tiledb_subarray_get_range( |
| 476 | ctx.ptr().get(), |
| 477 | subarray_.get(), |
| 478 | dim_idx, |
| 479 | range_idx, |
| 480 | &start, |
| 481 | &end, |
| 482 | &stride)); |
| 483 | std::array<T, 3> ret = { |
| 484 | {*(const T*)start, |
| 485 | *(const T*)end, |
| 486 | (stride == nullptr) ? (const T)0 : *(const T*)stride}}; |
| 487 | return ret; |
| 488 | } |
| 489 | |
| 490 | /** |
| 491 | * Retrieves a range for a given dimension name and range id. |
nothing calls this directly
no test coverage detected