26 template <concepts::queue TQueue>
27 PointsHost(TQueue& queue, int32_t n_points);
29 template <concepts::queue TQueue>
30 PointsHost(TQueue& queue, int32_t n_points, std::span<std::byte> buffer);
32 template <concepts::queue TQueue, std::ranges::contiguous_range... TBuffers>
33 requires(
sizeof...(TBuffers) == 2 ||
sizeof...(TBuffers) == 4)
34 PointsHost(TQueue& queue, int32_t n_points, TBuffers&&... buffers);
36 template <concepts::queue TQueue, concepts::contiguous_raw_data... TBuffers>
37 requires(
sizeof...(TBuffers) == 2 ||
sizeof...(TBuffers) == 4)
38 PointsHost(TQueue& queue, int32_t n_points, TBuffers... buffers);
40 PointsHost(
const PointsHost&) =
delete;
41 PointsHost& operator=(
const PointsHost&) =
delete;
42 PointsHost(PointsHost&&) =
default;
43 PointsHost& operator=(PointsHost&&) =
default;
44 ~PointsHost() =
default;
46 ALPAKA_FN_HOST int32_t size()
const;
48 ALPAKA_FN_HOST std::span<const float> coords()
const;
49 ALPAKA_FN_HOST std::span<float> coords();
51 ALPAKA_FN_HOST std::span<const float> coords(
size_t dim)
const;
52 ALPAKA_FN_HOST std::span<float> coords(
size_t dim);
54 ALPAKA_FN_HOST std::span<const float> weights()
const;
55 ALPAKA_FN_HOST std::span<float> weights();
57 ALPAKA_FN_HOST std::span<const int> clusterIndexes()
const;
58 ALPAKA_FN_HOST std::span<int> clusterIndexes();
60 ALPAKA_FN_HOST std::span<const int> isSeed()
const;
61 ALPAKA_FN_HOST std::span<int> isSeed();
63 ALPAKA_FN_HOST
const PointsView* view()
const;
64 ALPAKA_FN_HOST PointsView* view();
66 template <concepts::queue _TQueue, u
int8_t _Ndim, concepts::device _TDev>
67 friend void copyToHost(_TQueue& queue,
68 PointsHost<_Ndim>& h_points,
70 template <concepts::queue _TQueue, u
int8_t _Ndim, concepts::device _TDev>
71 friend void copyToDevice(_TQueue& queue,
73 const PointsHost<_Ndim>& h_points);
76 std::optional<host_buffer<std::byte[]>> m_buffer;
77 host_buffer<PointsView> m_view;