From fed218aa8ae917d2a6f289b30d09976eadb4d876 Mon Sep 17 00:00:00 2001 From: Beka Davis <31743465+bekadavis9@users.noreply.github.com> Date: Fri, 4 Oct 2024 09:31:56 -0400 Subject: [PATCH] Create Subarray object library. (#5327) Create `Subarray` object library. [sc-53884] --- TYPE: NO_HISTORY DESC: Create `Subarray` object library. --- tiledb/sm/subarray/CMakeLists.txt | 10 ++++- .../sm/subarray/test/compile_subarray_main.cc | 45 +++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 tiledb/sm/subarray/test/compile_subarray_main.cc diff --git a/tiledb/sm/subarray/CMakeLists.txt b/tiledb/sm/subarray/CMakeLists.txt index 712604466d7..89b97474a63 100644 --- a/tiledb/sm/subarray/CMakeLists.txt +++ b/tiledb/sm/subarray/CMakeLists.txt @@ -3,7 +3,7 @@ # # The MIT License # -# Copyright (c) 2022 TileDB, Inc. +# Copyright (c) 2022-2024 TileDB, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -35,4 +35,12 @@ this_target_sources(range_subset.cc) this_target_object_libraries(baseline buffer constants range thread_pool) conclude(object_library) +# +# `subarray` object library +# +commence(object_library subarray) +this_target_sources(relevant_fragment_generator.cc subarray.cc subarray_tile_overlap.cc) +this_target_object_libraries(array range_subset) +conclude(object_library) + add_test_subdirectory() diff --git a/tiledb/sm/subarray/test/compile_subarray_main.cc b/tiledb/sm/subarray/test/compile_subarray_main.cc new file mode 100644 index 00000000000..55d64a86136 --- /dev/null +++ b/tiledb/sm/subarray/test/compile_subarray_main.cc @@ -0,0 +1,45 @@ +/** + * @file compile_subarray_main.cc + * + * @section LICENSE + * + * The MIT License + * + * @copyright Copyright (c) 2024 TileDB, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "../relevant_fragment_generator.h" +#include "../subarray.h" +#include "../subarray_tile_overlap.h" + +using namespace tiledb::sm; + +int main() { + Subarray subarray; + RelevantFragmentGenerator rfg( + subarray.array(), subarray, const_cast(&subarray.stats())); + (void)rfg.update_range_coords(subarray.subarray_tile_overlap()); + + SubarrayTileOverlap subarray_tile_overlap; + subarray_tile_overlap.clear(); + + return 0; +}