Skip to content

Commit 4bdcf5c

Browse files
committed
Change BIH::Input to BIH::Options
1 parent 9dcc3f3 commit 4bdcf5c

File tree

6 files changed

+26
-26
lines changed

6 files changed

+26
-26
lines changed

src/orange/detail/BIHBuilder.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ namespace detail
1717
{
1818
//---------------------------------------------------------------------------//
1919
/*!
20-
* Construct from Storage and Input objects.
20+
* Construct from Storage and Options objects.
2121
*/
22-
BIHBuilder::BIHBuilder(Storage* storage, Input inp)
22+
BIHBuilder::BIHBuilder(Storage* storage, Options options)
2323
: bboxes_{&storage->bboxes}
2424
, local_volume_ids_{&storage->local_volume_ids}
2525
, inner_nodes_{&storage->inner_nodes}
2626
, leaf_nodes_{&storage->leaf_nodes}
27-
, inp_{inp}
27+
, options_{options}
2828
{
2929
CELER_EXPECT(storage);
30-
CELER_EXPECT(inp_.min_split_size > 1);
30+
CELER_EXPECT(options_.min_split_size > 1);
3131
}
3232

3333
//---------------------------------------------------------------------------//
@@ -138,7 +138,7 @@ void BIHBuilder::construct_tree(VecIndices const& indices,
138138
(*nodes)[current_index] = node;
139139
};
140140

141-
if (indices.size() < inp_.min_split_size)
141+
if (indices.size() < options_.min_split_size)
142142
{
143143
// All bboxes fit on a single leaf; make it and exit early
144144
make_leaf();

src/orange/detail/BIHBuilder.hh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ class BIHBuilder
5151
//!@{
5252
//! \name Type aliases
5353

54-
//! Input parameters
55-
struct Input
54+
//! Options parameters
55+
struct Options
5656
{
5757
//! Minimum number of bboxes needed to trigger a partitioning attempt
5858
size_type min_split_size;
@@ -64,8 +64,8 @@ class BIHBuilder
6464
//!@}
6565

6666
public:
67-
// Construct from Storage and Input objects
68-
BIHBuilder(Storage* storage, Input inp);
67+
// Construct from Storage and Options objects
68+
BIHBuilder(Storage* storage, Options options);
6969

7070
// Create BIH Nodes
7171
BIHTree operator()(VecBBox&& bboxes, SetLocalVolId const& implicit_vol_id);
@@ -94,7 +94,7 @@ class BIHBuilder
9494
CollectionBuilder<BIHInnerNode> inner_nodes_;
9595
CollectionBuilder<BIHLeafNode> leaf_nodes_;
9696

97-
Input inp_;
97+
Options options_;
9898

9999
//// HELPER FUNCTIONS ////
100100

src/orange/detail/UnitInserter.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ std::string to_string(VolumeInput::VariantLabel const& vlabel)
268268
*/
269269
UnitInserter::UnitInserter(UniverseInserter* insert_universe, Data* orange_data)
270270
: orange_data_(orange_data)
271-
, build_bih_tree_{&orange_data_->bih_tree_data, BIHBuilder::Input{2}}
271+
, build_bih_tree_{&orange_data_->bih_tree_data, BIHBuilder::Options{2}}
272272
, insert_transform_{&orange_data_->transforms, &orange_data_->reals}
273273
, build_surfaces_{&orange_data_->surface_types,
274274
&orange_data_->real_ids,

test/orange/detail/BIHBuilder.test.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ TEST_F(BIHBuilderTest, basic)
8989
{{0, -1, 0}, {5, 0, 100}},
9090
};
9191

92-
BIHBuilder build(&storage_, BIHBuilder::Input{2});
92+
BIHBuilder build(&storage_, BIHBuilder::Options{2});
9393
auto bih_tree = build(std::move(bboxes), implicit_vol_ids_);
9494

9595
ASSERT_EQ(1, bih_tree.inf_vol_ids.size());
@@ -278,7 +278,7 @@ TEST_F(BIHBuilderTest, grid)
278278
}
279279
}
280280

281-
BIHBuilder build(&storage_, BIHBuilder::Input{2});
281+
BIHBuilder build(&storage_, BIHBuilder::Options{2});
282282
auto bih_tree = build(std::move(bboxes), implicit_vol_ids_);
283283
ASSERT_EQ(1, bih_tree.inf_vol_ids.size());
284284
EXPECT_EQ(LocalVolumeId{0},
@@ -534,7 +534,7 @@ TEST_F(BIHBuilderTest, grid_less_split)
534534
}
535535
}
536536

537-
BIHBuilder build(&storage_, BIHBuilder::Input{5});
537+
BIHBuilder build(&storage_, BIHBuilder::Options{5});
538538
auto bih_tree = build(std::move(bboxes), implicit_vol_ids_);
539539
ASSERT_EQ(1, bih_tree.inf_vol_ids.size());
540540
EXPECT_EQ(LocalVolumeId{0},
@@ -667,7 +667,7 @@ TEST_F(BIHBuilderTest, single_finite_volume)
667667
{
668668
VecFastBbox bboxes = {{{0, 0, 0}, {1, 1, 1}}};
669669

670-
BIHBuilder build(&storage_, BIHBuilder::Input{2});
670+
BIHBuilder build(&storage_, BIHBuilder::Options{2});
671671
auto bih_tree = build(std::move(bboxes), implicit_vol_ids_);
672672

673673
ASSERT_EQ(0, bih_tree.inf_vol_ids.size());
@@ -687,7 +687,7 @@ TEST_F(BIHBuilderTest, multiple_nonpartitionable_volumes)
687687
{{0, 0, 0}, {1, 1, 1}},
688688
};
689689

690-
BIHBuilder build(&storage_, BIHBuilder::Input{2});
690+
BIHBuilder build(&storage_, BIHBuilder::Options{2});
691691
auto bih_tree = build(std::move(bboxes), implicit_vol_ids_);
692692

693693
ASSERT_EQ(0, bih_tree.inf_vol_ids.size());
@@ -705,7 +705,7 @@ TEST_F(BIHBuilderTest, single_infinite_volume)
705705
{
706706
VecFastBbox bboxes = {FastBBox::from_infinite()};
707707

708-
BIHBuilder build(&storage_, BIHBuilder::Input{2});
708+
BIHBuilder build(&storage_, BIHBuilder::Options{2});
709709
auto bih_tree = build(std::move(bboxes), implicit_vol_ids_);
710710

711711
ASSERT_EQ(0, bih_tree.inner_nodes.size());
@@ -723,7 +723,7 @@ TEST_F(BIHBuilderTest, multiple_infinite_volumes)
723723
FastBBox::from_infinite(),
724724
};
725725

726-
BIHBuilder build(&storage_, BIHBuilder::Input{2});
726+
BIHBuilder build(&storage_, BIHBuilder::Options{2});
727727
auto bih_tree = build(std::move(bboxes), implicit_vol_ids_);
728728

729729
ASSERT_EQ(0, bih_tree.inner_nodes.size());
@@ -749,7 +749,7 @@ TEST_F(BIHBuilderTest, TEST_IF_CELERITAS_DEBUG(semi_finite_volumes))
749749
{{-inff, 0, 0}, {inff, 1, 1}},
750750
};
751751

752-
BIHBuilder build(&storage_, BIHBuilder::Input{2});
752+
BIHBuilder build(&storage_, BIHBuilder::Options{2});
753753
EXPECT_THROW(build(std::move(bboxes), implicit_vol_ids_), DebugError);
754754
}
755755

test/orange/detail/BIHEnclosingVolFinder.test.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ TEST_F(BIHEnclosingVolFinderTest, basic)
7575
{{0, -1, 0}, {5, 0, 100}},
7676
};
7777

78-
BIHBuilder build(&storage_, BIHBuilder::Input{min_split_size});
78+
BIHBuilder build(&storage_, BIHBuilder::Options{min_split_size});
7979
auto bih_tree = build(std::move(bboxes), implicit_vol_ids_);
8080

8181
ref_storage_ = storage_;
@@ -128,7 +128,7 @@ TEST_F(BIHEnclosingVolFinderTest, grid)
128128
}
129129
}
130130

131-
BIHBuilder build(&storage_, BIHBuilder::Input{min_split_size});
131+
BIHBuilder build(&storage_, BIHBuilder::Options{min_split_size});
132132
auto bih_tree = build(std::move(bboxes), implicit_vol_ids_);
133133

134134
ref_storage_ = storage_;
@@ -163,7 +163,7 @@ TEST_F(BIHEnclosingVolFinderTest, single_finite_volume)
163163
{
164164
VecFastBbox bboxes = {{{0, 0, 0}, {1, 1, 1}}};
165165

166-
BIHBuilder build(&storage_, BIHBuilder::Input{2});
166+
BIHBuilder build(&storage_, BIHBuilder::Options{2});
167167
auto bih_tree = build(std::move(bboxes), implicit_vol_ids_);
168168

169169
ref_storage_ = storage_;
@@ -179,7 +179,7 @@ TEST_F(BIHEnclosingVolFinderTest, multiple_nonpartitionable_volumes)
179179
{{0, 0, 0}, {1, 1, 1}},
180180
};
181181

182-
BIHBuilder build(&storage_, BIHBuilder::Input{2});
182+
BIHBuilder build(&storage_, BIHBuilder::Options{2});
183183
auto bih_tree = build(std::move(bboxes), implicit_vol_ids_);
184184

185185
ref_storage_ = storage_;
@@ -193,7 +193,7 @@ TEST_F(BIHEnclosingVolFinderTest, single_infinite_volume)
193193
{
194194
VecFastBbox bboxes = {FastBBox::from_infinite()};
195195

196-
BIHBuilder build(&storage_, BIHBuilder::Input{2});
196+
BIHBuilder build(&storage_, BIHBuilder::Options{2});
197197
auto bih_tree = build(std::move(bboxes), implicit_vol_ids_);
198198

199199
ref_storage_ = storage_;
@@ -209,7 +209,7 @@ TEST_F(BIHEnclosingVolFinderTest, multiple_infinite_volumes)
209209
FastBBox::from_infinite(),
210210
};
211211

212-
BIHBuilder build(&storage_, BIHBuilder::Input{2});
212+
BIHBuilder build(&storage_, BIHBuilder::Options{2});
213213
auto bih_tree = build(std::move(bboxes), implicit_vol_ids_);
214214

215215
ref_storage_ = storage_;

test/orange/detail/BIHIntersectingVolFinder.test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class BIHIntersectingVolFinderTest : public Test
5858
{{0, -1, 0}, {5, 0, 100}},
5959
};
6060

61-
BIHBuilder build(&storage_, BIHBuilder::Input{min_split_size});
61+
BIHBuilder build(&storage_, BIHBuilder::Options{min_split_size});
6262
BIHBuilder::SetLocalVolId implicit_vol_ids_;
6363
bih_tree_ = build(std::move(bboxes), implicit_vol_ids_);
6464
ref_storage_ = storage_;

0 commit comments

Comments
 (0)