@@ -66,13 +66,12 @@ class PointSearch
66
66
* @note This function should be <b>private</b> but lambda functions can
67
67
* only be called from a public function in CUDA.
68
68
*/
69
- void performDistributedSearch (
69
+ std::tuple<Kokkos::View<ArborX::Point *, DeviceType>,
70
+ Kokkos::View<int *, DeviceType>, Kokkos::View<int *, DeviceType>,
71
+ Kokkos::View<int *, DeviceType>>
72
+ performDistributedSearch (
70
73
Kokkos::View<double **, DeviceType> points_coord,
71
- Kokkos::View<ArborX::Box *, DeviceType> bounding_boxes,
72
- Kokkos::View<ArborX::Point *, DeviceType> &imported_points,
73
- Kokkos::View<int *, DeviceType> &imported_query_ids,
74
- Kokkos::View<int *, DeviceType> &imported_cell_indices,
75
- Kokkos::View<int *, DeviceType> &ranks );
74
+ Kokkos::View<ArborX::Box *, DeviceType> bounding_boxes );
76
75
77
76
/* *
78
77
* Keep cell_indices, points, query_ids, and ranks that satisfy a given
@@ -81,36 +80,31 @@ class PointSearch
81
80
* @note This function should be <b>private</b> but lambda functions can
82
81
* only be called from a public function in CUDA.
83
82
*/
84
- void filterTopology (
83
+ std::tuple<Kokkos::View<int *, DeviceType>,
84
+ Kokkos::View<double **, DeviceType>,
85
+ Kokkos::View<int *, DeviceType>, Kokkos::View<int *, DeviceType>>
86
+ filterTopology (
85
87
Kokkos::View<unsigned int *, DeviceType> topo, unsigned int topo_id,
88
+ unsigned int size,
86
89
Kokkos::View<unsigned int **, DeviceType> bounding_box_to_cell,
87
90
Kokkos::View<int *, DeviceType> cell_indices,
88
91
Kokkos::View<ArborX::Point *, DeviceType> points,
89
92
Kokkos::View<int *, DeviceType> query_ids,
90
- Kokkos::View<int *, DeviceType> ranks,
91
- Kokkos::View<int *, DeviceType> filtered_cell_indices,
92
- Kokkos::View<double **, DeviceType> filtered_points,
93
- Kokkos::View<int *, DeviceType> filtered_query_ids,
94
- Kokkos::View<int *, DeviceType> filtered_ranks );
93
+ Kokkos::View<int *, DeviceType> ranks );
95
94
96
95
/* *
97
96
* Keep data corresponding to points found inside the reference cell.
98
97
*
99
98
* @note This function should be <b>private</b> but lambda functions can
100
99
* only be called from a public function in CUDA.
101
100
*/
102
- void filterInCell (
103
- std::array<Kokkos::View<bool *, DeviceType>, DTK_N_TOPO> const
104
- &filtered_per_topo_point_in_cell,
105
- std::array<Kokkos::View<double **, DeviceType>, DTK_N_TOPO> const
106
- &filtered_per_topo_reference_points,
107
- std::array<Kokkos::View<int *, DeviceType>, DTK_N_TOPO> const
108
- &filtered_per_topo_cell_indices,
109
- std::array<Kokkos::View<int *, DeviceType>, DTK_N_TOPO> const
110
- &filtered_per_topo_query_ids,
111
- std::array<Kokkos::View<int *, DeviceType>, DTK_N_TOPO> const &ranks,
112
- std::array<Kokkos::View<int *, DeviceType>, DTK_N_TOPO>
113
- &filtered_ranks );
101
+ Kokkos::View<int *, DeviceType> filterInCell (
102
+ Kokkos::View<bool *, DeviceType> filtered_per_topo_point_in_cell,
103
+ Kokkos::View<double **, DeviceType> filtered_per_topo_reference_points,
104
+ Kokkos::View<int *, DeviceType> filtered_per_topo_cell_indices,
105
+ Kokkos::View<int *, DeviceType> filtered_per_topo_query_ids,
106
+ Kokkos::View<int *, DeviceType> filtered_per_topo_ranks,
107
+ unsigned int topo_id );
114
108
115
109
private:
116
110
/* *
@@ -123,20 +117,15 @@ class PointSearch
123
117
* Compute the position in the reference frame of candidates found by the
124
118
* search.
125
119
*/
126
- void performPointInCell (
120
+ Kokkos::View< int *, DeviceType> performPointInCell (
127
121
Kokkos::View<double ***, DeviceType> cells,
128
122
Kokkos::View<unsigned int **, DeviceType> bounding_box_to_cell,
129
123
Kokkos::View<int *, DeviceType> imported_cell_indices,
130
124
Kokkos::View<ArborX::Point *, DeviceType> imported_points,
131
125
Kokkos::View<int *, DeviceType> imported_query_ids,
132
126
Kokkos::View<int *, DeviceType> imported_ranks,
133
127
Kokkos::View<unsigned int *, DeviceType> topo, unsigned int topo_id,
134
- Kokkos::View<double **, DeviceType> filtered_points,
135
- Kokkos::View<int *, DeviceType> filtered_cell_indices,
136
- Kokkos::View<int *, DeviceType> filtered_query_ids,
137
- Kokkos::View<double **, DeviceType> reference_points,
138
- Kokkos::View<bool *, DeviceType> point_in_cell,
139
- Kokkos::View<int *, DeviceType> ranks );
128
+ unsigned int size );
140
129
141
130
/* *
142
131
* Build the target-to-source distributor.
0 commit comments