Commit 3c34dfb 1 parent ca28148 commit 3c34dfb Copy full SHA for 3c34dfb
File tree 1 file changed +38
-0
lines changed
1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -91,3 +91,41 @@ void check_bounding_volume_and_predicate_geometry_type_requirements()
91
91
KOKKOS_LAMBDA (NearestPredicate, auto ){});
92
92
#endif
93
93
}
94
+
95
+ namespace Test
96
+ {
97
+
98
+ // clang-format off
99
+ struct FakePrimitiveGeometry {};
100
+
101
+ template <int DIM>
102
+ KOKKOS_FUNCTION void expand (ArborX::Box<DIM> &, FakePrimitiveGeometry) {}
103
+ KOKKOS_FUNCTION auto returnCentroid (FakePrimitiveGeometry) { return ArborX::Point <3 >{}; }
104
+ // clang-format on
105
+
106
+ } // namespace Test
107
+
108
+ template <>
109
+ struct ArborX ::GeometryTraits::dimension<Test::FakePrimitiveGeometry>
110
+ {
111
+ static constexpr int value = 3 ;
112
+ };
113
+ template <>
114
+ struct ArborX ::GeometryTraits::coordinate_type<Test::FakePrimitiveGeometry>
115
+ {
116
+ using type = float ;
117
+ };
118
+
119
+ // Compile-only
120
+ void check_hierarchy_for_custom_types ()
121
+ {
122
+ using ExecutionSpace = Kokkos::DefaultExecutionSpace;
123
+ using MemorySpace = ExecutionSpace::memory_space;
124
+ using Tree = ArborX::BoundingVolumeHierarchy<
125
+ MemorySpace, Test::FakePrimitiveGeometry,
126
+ ArborX::Experimental::DefaultIndexableGetter>;
127
+
128
+ Kokkos::View<Test::FakePrimitiveGeometry *, MemorySpace> primitives (
129
+ " primitives" , 0 );
130
+ Tree tree (ExecutionSpace{}, primitives);
131
+ }
You can’t perform that action at this time.
0 commit comments