@@ -22,7 +22,7 @@ namespace clue {
2222 throw std::invalid_argument (
2323 " Number of points passed to PointsDevice constructor must be positive." );
2424 }
25- return ((Ndim + 3 ) * sizeof (float ) + 3 * sizeof (int )) * n_points;
25+ return ((Ndim + 2 ) * sizeof (float ) + 3 * sizeof (int )) * n_points;
2626 }
2727
2828 template <std::size_t Ndim>
@@ -35,8 +35,7 @@ namespace clue {
3535 view.cluster_index = reinterpret_cast <int *>(buffer + (Ndim + 1 ) * n_points * sizeof (float ));
3636 view.is_seed = reinterpret_cast <int *>(buffer + (Ndim + 2 ) * n_points * sizeof (float ));
3737 view.rho = reinterpret_cast <float *>(buffer + (Ndim + 3 ) * n_points * sizeof (float ));
38- view.delta = reinterpret_cast <float *>(buffer + (Ndim + 4 ) * n_points * sizeof (float ));
39- view.nearest_higher = reinterpret_cast <int *>(buffer + (Ndim + 5 ) * n_points * sizeof (float ));
38+ view.nearest_higher = reinterpret_cast <int *>(buffer + (Ndim + 4 ) * n_points * sizeof (float ));
4039 view.n = n_points;
4140 }
4241 template <std::size_t Ndim>
@@ -52,8 +51,7 @@ namespace clue {
5251 view.cluster_index = reinterpret_cast <int *>(buffer + (Ndim + 1 ) * n_points * sizeof (float ));
5352 view.is_seed = reinterpret_cast <int *>(alloc_buffer);
5453 view.rho = reinterpret_cast <float *>(alloc_buffer + n_points * sizeof (float ));
55- view.delta = reinterpret_cast <float *>(alloc_buffer + 2 * n_points * sizeof (float ));
56- view.nearest_higher = reinterpret_cast <int *>(alloc_buffer + 3 * n_points * sizeof (float ));
54+ view.nearest_higher = reinterpret_cast <int *>(alloc_buffer + 2 * n_points * sizeof (float ));
5755 view.n = n_points;
5856 }
5957 template <std::size_t Ndim, concepts::contiguous_raw_data... TBuffers>
@@ -73,8 +71,7 @@ namespace clue {
7371 view.cluster_index = std::get<2 >(buffers_tuple);
7472 view.is_seed = reinterpret_cast <int *>(alloc_buffer);
7573 view.rho = reinterpret_cast <float *>(alloc_buffer + n_points * sizeof (float ));
76- view.delta = reinterpret_cast <float *>(alloc_buffer + 2 * n_points * sizeof (float ));
77- view.nearest_higher = reinterpret_cast <int *>(alloc_buffer + 3 * n_points * sizeof (float ));
74+ view.nearest_higher = reinterpret_cast <int *>(alloc_buffer + 2 * n_points * sizeof (float ));
7875 view.n = n_points;
7976 }
8077 template <std::size_t Ndim, concepts::contiguous_raw_data... TBuffers>
@@ -94,8 +91,7 @@ namespace clue {
9491 view.cluster_index = std::get<1 >(buffers_tuple);
9592 view.is_seed = reinterpret_cast <int *>(alloc_buffer);
9693 view.rho = reinterpret_cast <float *>(alloc_buffer + n_points * sizeof (float ));
97- view.delta = reinterpret_cast <float *>(alloc_buffer + 2 * n_points * sizeof (float ));
98- view.nearest_higher = reinterpret_cast <int *>(alloc_buffer + 3 * n_points * sizeof (float ));
94+ view.nearest_higher = reinterpret_cast <int *>(alloc_buffer + 2 * n_points * sizeof (float ));
9995 view.n = n_points;
10096 }
10197 template <std::size_t Ndim, concepts::contiguous_raw_data... TBuffers>
@@ -113,8 +109,7 @@ namespace clue {
113109 view.cluster_index = std::get<Ndim + 1 >(buffers_tuple);
114110 view.is_seed = reinterpret_cast <int *>(alloc_buffer);
115111 view.rho = reinterpret_cast <float *>(alloc_buffer + n_points * sizeof (float ));
116- view.delta = reinterpret_cast <float *>(alloc_buffer + 2 * n_points * sizeof (float ));
117- view.nearest_higher = reinterpret_cast <int *>(alloc_buffer + 3 * n_points * sizeof (float ));
112+ view.nearest_higher = reinterpret_cast <int *>(alloc_buffer + 2 * n_points * sizeof (float ));
118113 view.n = n_points;
119114 }
120115
@@ -135,7 +130,7 @@ namespace clue {
135130 inline PointsDevice<Ndim, TDev>::PointsDevice(TQueue& queue,
136131 int32_t n_points,
137132 std::span<std::byte> buffer)
138- : m_buffer{make_device_buffer<std::byte[]>(queue, 4 * n_points * sizeof (float ))},
133+ : m_buffer{make_device_buffer<std::byte[]>(queue, 3 * n_points * sizeof (float ))},
139134 m_view{},
140135 m_size{n_points} {
141136 soa::device::partitionSoAView<Ndim>(m_view, m_buffer.data (), buffer.data (), n_points);
@@ -148,7 +143,7 @@ namespace clue {
148143 inline PointsDevice<Ndim, TDev>::PointsDevice(TQueue& queue,
149144 int32_t n_points,
150145 TBuffers... buffers)
151- : m_buffer{make_device_buffer<std::byte[]>(queue, 4 * n_points * sizeof (float ))},
146+ : m_buffer{make_device_buffer<std::byte[]>(queue, 3 * n_points * sizeof (float ))},
152147 m_view{},
153148 m_size{n_points} {
154149 soa::device::partitionSoAView<Ndim>(m_view, m_buffer.data (), n_points, buffers...);
@@ -163,15 +158,6 @@ namespace clue {
163158 return std::span<float >(m_view.rho , m_size);
164159 }
165160
166- template <std::size_t Ndim, concepts::device TDev>
167- ALPAKA_FN_HOST inline auto PointsDevice<Ndim, TDev>::delta() const {
168- return std::span<const float >(m_view.delta , m_size);
169- }
170- template <std::size_t Ndim, concepts::device TDev>
171- ALPAKA_FN_HOST inline auto PointsDevice<Ndim, TDev>::delta() {
172- return std::span<float >(m_view.delta , m_size);
173- }
174-
175161 template <std::size_t Ndim, concepts::device TDev>
176162 ALPAKA_FN_HOST inline auto PointsDevice<Ndim, TDev>::nearestHigher() const {
177163 return std::span<const int >(m_view.nearest_higher , m_size);
0 commit comments