Points Device¶
-
template<std::size_t Ndim, concepts::device TDev = clue::Device>
class PointsDevice : public internal::points_interface<PointsDevice<Ndim, clue::Device>>¶ The PointsDevice class is a data structure that manages points on a device. It provides methods to allocate, access, and manipulate points in device memory.
- Template Parameters:¶
Public Functions¶
-
template<concepts::queue TQueue>
PointsDevice(TQueue &queue, int32_t n_points)¶ Construct a PointsDevice object.
-
template<concepts::queue TQueue>
PointsDevice(TQueue &queue, int32_t n_points, std::span<std::byte> buffer)¶ Construct a PointsDevice object with a pre-allocated buffer.
-
template<concepts::queue TQueue>
PointsDevice(TQueue &queue, int32_t n_points, std::span<float> input, std::span<int> output)¶ Constructs a container for the points allocated on the device using interleaved data.
Note
The input buffer must contain the coordinates and weights in an SoA format
-
template<concepts::queue TQueue>
PointsDevice(TQueue &queue, int32_t n_points, std::span<float> coordinates, std::span<float> weights, std::span<int> output)¶ Constructs a container for the points allocated on the device using separate coordinate and weight buffers.
Note
The coordinates buffer must have a size of n_points * Ndim
- Parameters:¶
- TQueue &queue¶
The queue to use for memory allocation
- int32_t n_points¶
The number of points
- std::span<float> coordinates¶
The pre-allocated buffer containing the coordinates
- std::span<float> weights¶
The pre-allocated buffer containing the weights
- std::span<int> output¶
The pre-allocated buffer to store the cluster indexes
-
template<concepts::queue TQueue>
PointsDevice(TQueue &queue, int32_t n_points, float *input, int *output)¶ Constructs a container for the points allocated on the device using interleaved data.
Note
The input buffer must contain the coordinates and weights in an SoA format
-
template<concepts::queue TQueue>
PointsDevice(TQueue &queue, int32_t n_points, float *coordinates, float *weights, int *output)¶ Constructs a container for the points allocated on the device using separate coordinate and weight buffers.
Note
The coordinates buffer must have a size of n_points * Ndim
- Parameters:¶
-
template<concepts::queue TQueue, concepts::pointer... TBuffers>
PointsDevice(TQueue &queue, int32_t n_points, TBuffers... buffers)¶ Construct a PointsDevice object with a pre-allocated buffer.
-
PointsDevice(const PointsDevice&) = delete¶
-
PointsDevice &operator=(const PointsDevice&) = delete¶
-
PointsDevice(PointsDevice&&) = default¶
-
PointsDevice &operator=(PointsDevice&&) = default¶
-
~PointsDevice() = default¶
-
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 coords(size_t dim)¶
Returns the coordinates of the points for a specific dimension as a span.
-
ALPAKA_FN_HOST auto weights() const¶
Returns the weights of the points as a const span.
- Returns:¶
A const span of the weights of the points
-
ALPAKA_FN_HOST auto weights()¶
Returns the weights of the points as a span.
- Returns:¶
A span of the weights of the points
-
ALPAKA_FN_HOST auto clusterIndexes() const¶
Returns the cluster indexes of the points as a const span.
- Returns:¶
A const span of the cluster indexes of the points
-
ALPAKA_FN_HOST auto clusterIndexes()¶
Returns the cluster indexes of the points as a span.
- Returns:¶
A span of the cluster indexes of the points
-
ALPAKA_FN_HOST auto clustered() const¶
Indicates whether the points have been clustered.
- Returns:¶
True if the points have been clustered, false otherwise
-
ALPAKA_FN_HOST const auto &view() const¶
Returns the view of the points.
- Returns:¶
A const reference to the PointsView structure containing the points data
-
ALPAKA_FN_HOST auto &view()¶
Returns the view of the points.
- Returns:¶
A reference to the PointsView structure containing the points data
-
ALPAKA_FN_HOST auto rho() const¶
-
ALPAKA_FN_HOST auto rho()¶
-
ALPAKA_FN_HOST auto delta() const¶
-
ALPAKA_FN_HOST auto delta()¶
-
ALPAKA_FN_HOST auto nearestHigher() const¶
-
ALPAKA_FN_HOST auto nearestHigher()¶
-
ALPAKA_FN_HOST auto isSeed() const¶
-
ALPAKA_FN_HOST auto isSeed()¶
Friends¶
- friend struct internal::points_interface< PointsDevice< Ndim, TDev > >