Skip to content

Commit

Permalink
Create Subarray object library. (#5327)
Browse files Browse the repository at this point in the history
Create `Subarray` object library.

[sc-53884]

---
TYPE: NO_HISTORY
DESC: Create `Subarray` object library.
  • Loading branch information
bekadavis9 authored Oct 4, 2024
1 parent 351d032 commit fed218a
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tiledb/sm/subarray/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
45 changes: 45 additions & 0 deletions tiledb/sm/subarray/test/compile_subarray_main.cc
Original file line number Diff line number Diff line change
@@ -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<stats::Stats*>(&subarray.stats()));
(void)rfg.update_range_coords(subarray.subarray_tile_overlap());

SubarrayTileOverlap subarray_tile_overlap;
subarray_tile_overlap.clear();

return 0;
}

0 comments on commit fed218a

Please sign in to comment.