7#include "CLUEstering/core/detail/defines.hpp"
8#include "CLUEstering/data_structures/internal/PointsCommon.hpp"
9#include "CLUEstering/detail/concepts.hpp"
10#include "CLUEstering/internal/alpaka/memory.hpp"
15#include <alpaka/alpaka.hpp>
24 template <u
int8_t Ndim, concepts::device TDev = clue::Device>
25 class PointsDevice :
public internal::points_interface<PointsDevice<Ndim, TDev>> {
27 device_buffer<TDev, std::byte[]> m_buffer;
36 template <concepts::queue TQueue>
44 template <concepts::queue TQueue>
45 PointsDevice(TQueue& queue, int32_t n_points, std::span<std::byte> buffer);
52 template <concepts::queue TQueue, concepts::contiguous_raw_data... TBuffers>
53 requires(
sizeof...(TBuffers) == 2 ||
sizeof...(TBuffers) == 4)
54 PointsDevice(TQueue& queue, int32_t n_points, TBuffers... buffers);
62#ifdef CLUE_BUILD_DOXYGEN
65 ALPAKA_FN_HOST int32_t
size()
const;
75 ALPAKA_FN_HOST
auto coords(
size_t dim)
const;
79 ALPAKA_FN_HOST
auto coords(
size_t dim);
100 ALPAKA_FN_HOST
const auto&
view()
const;
106 ALPAKA_FN_HOST
auto rho()
const;
107 ALPAKA_FN_HOST
auto rho();
109 ALPAKA_FN_HOST
auto delta()
const;
110 ALPAKA_FN_HOST
auto delta();
112 ALPAKA_FN_HOST
auto nearestHigher()
const;
113 ALPAKA_FN_HOST
auto nearestHigher();
116 inline static constexpr uint8_t Ndim_ = Ndim;
118 template <concepts::queue _TQueue, u
int8_t _Ndim, concepts::device _TDev>
119 friend void copyToHost(_TQueue& queue,
122 template <concepts::queue _TQueue, u
int8_t _Ndim, concepts::device _TDev>
123 friend void copyToDevice(_TQueue& queue,
126 friend struct internal::points_interface<
PointsDevice<Ndim, TDev>>;
131#include "CLUEstering/data_structures/detail/PointsDevice.hpp"
ALPAKA_FN_HOST auto coords()
Returns the coordinates of the points as a span.
PointsDevice(TQueue &queue, int32_t n_points, std::span< std::byte > buffer)
Construct a PointsDevice object with a pre-allocated buffer.
ALPAKA_FN_HOST auto & view()
Returns the view of the points.
ALPAKA_FN_HOST auto isSeed() const
Returns the seed status of the points as a const span.
PointsDevice(TQueue &queue, int32_t n_points, TBuffers... buffers)
Construct a PointsDevice object with a pre-allocated buffer.
ALPAKA_FN_HOST auto clusterIndexes() const
Returns the cluster indexes of the points as a const span.
ALPAKA_FN_HOST auto coords() const
Returns the coordinates of the points as a const span.
ALPAKA_FN_HOST int32_t size() const
Returns the number of points.
ALPAKA_FN_HOST auto coords(size_t dim)
Returns the coordinates of the points for a specific dimension as a span.
ALPAKA_FN_HOST auto weights()
Returns the weights of the points as a span.
ALPAKA_FN_HOST auto isSeed()
Returns the seed status of the points as a span.
ALPAKA_FN_HOST auto weights() const
Returns the weights of the points as a const span.
ALPAKA_FN_HOST auto coords(size_t dim) const
Returns the coordinates of the points for a specific dimension as a const span.
ALPAKA_FN_HOST auto clusterIndexes()
Returns the cluster indexes of the points as a span.
ALPAKA_FN_HOST const auto & view() const
Returns the view of the points.
PointsDevice(TQueue &queue, int32_t n_points)
Construct a PointsDevice object.
The PointsHost class is a data structure that manages points in host memory. It provides methods to a...
Definition PointsHost.hpp:22