CLUEstering
High-performance density-based weighted clustering library developed at CERN
Loading...
Searching...
No Matches
clue::PointsDevice< Ndim, TDev > Class Template Reference

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. More...

#include <PointsDevice.hpp>

Inheritance diagram for clue::PointsDevice< Ndim, TDev >:

Public Member 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, concepts::contiguous_raw_data... TBuffers>
requires (sizeof...(TBuffers) == 2 || sizeof...(TBuffers) == 4)
 PointsDevice (TQueue &queue, int32_t n_points, TBuffers... buffers)
 Construct a PointsDevice object with a pre-allocated buffer.
 
 PointsDevice (const PointsDevice &)=delete
 
PointsDeviceoperator= (const PointsDevice &)=delete
 
 PointsDevice (PointsDevice &&)=default
 
PointsDeviceoperator= (PointsDevice &&)=default
 
ALPAKA_FN_HOST int32_t size () const
 Returns the number of points.
 
ALPAKA_FN_HOST auto coords () const
 Returns the coordinates of the points as a const span.
 
ALPAKA_FN_HOST auto coords ()
 Returns the coordinates of the points as a 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 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.
 
ALPAKA_FN_HOST auto weights ()
 Returns the weights of the points as a span.
 
ALPAKA_FN_HOST auto clusterIndexes () const
 Returns the cluster indexes of the points as a const span.
 
ALPAKA_FN_HOST auto clusterIndexes ()
 Returns the cluster indexes of the points as a span.
 
ALPAKA_FN_HOST auto isSeed () const
 Returns the seed status of the points as a const span.
 
ALPAKA_FN_HOST auto isSeed ()
 Returns the seed status of the points as a span.
 
ALPAKA_FN_HOST const auto & view () const
 Returns the view of the points.
 
ALPAKA_FN_HOST auto & view ()
 Returns the view of the points.
 
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 ()
 

Friends

struct internal::points_interface< PointsDevice< Ndim, TDev > >
 
template<concepts::queue _TQueue, uint8_t _Ndim, concepts::device _TDev>
void copyToHost (_TQueue &queue, PointsHost< _Ndim > &h_points, const PointsDevice< _Ndim, _TDev > &d_points)
 
template<concepts::queue _TQueue, uint8_t _Ndim, concepts::device _TDev>
void copyToDevice (_TQueue &queue, PointsDevice< _Ndim, _TDev > &d_points, const PointsHost< _Ndim > &h_points)
 

Detailed Description

template<uint8_t Ndim, concepts::device TDev = clue::Device>
class clue::PointsDevice< Ndim, TDev >

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
NdimThe number of dimensions of the points to manage
TDevThe device type to use for the allocation. Defaults to clue::Device.

Constructor & Destructor Documentation

◆ PointsDevice() [1/3]

template<uint8_t Ndim, concepts::device TDev = clue::Device>
template<concepts::queue TQueue>
clue::PointsDevice< Ndim, TDev >::PointsDevice ( TQueue & queue,
int32_t n_points )

Construct a PointsDevice object.

Parameters
queueThe queue to use for the device operations
n_pointsThe number of points to allocate

◆ PointsDevice() [2/3]

template<uint8_t Ndim, concepts::device TDev = clue::Device>
template<concepts::queue TQueue>
clue::PointsDevice< Ndim, TDev >::PointsDevice ( TQueue & queue,
int32_t n_points,
std::span< std::byte > buffer )

Construct a PointsDevice object with a pre-allocated buffer.

Parameters
queueThe queue to use for the device operations
n_pointsThe number of points to allocate
bufferThe buffer to use for the points

◆ PointsDevice() [3/3]

template<uint8_t Ndim, concepts::device TDev = clue::Device>
template<concepts::queue TQueue, concepts::contiguous_raw_data... TBuffers>
requires (sizeof...(TBuffers) == 2 || sizeof...(TBuffers) == 4)
clue::PointsDevice< Ndim, TDev >::PointsDevice ( TQueue & queue,
int32_t n_points,
TBuffers... buffers )

Construct a PointsDevice object with a pre-allocated buffer.

Parameters
queueThe queue to use for the device operations
n_pointsThe number of points to allocate
buffersThe buffers to use for the points

Member Function Documentation

◆ clusterIndexes() [1/2]

template<uint8_t Ndim, concepts::device TDev = clue::Device>
ALPAKA_FN_HOST auto clue::PointsDevice< Ndim, TDev >::clusterIndexes ( )

Returns the cluster indexes of the points as a span.

Returns
A span of the cluster indexes of the points

◆ clusterIndexes() [2/2]

template<uint8_t Ndim, concepts::device TDev = clue::Device>
ALPAKA_FN_HOST auto clue::PointsDevice< Ndim, TDev >::clusterIndexes ( ) const

Returns the cluster indexes of the points as a const span.

Returns
A const span of the cluster indexes of the points

◆ coords() [1/4]

template<uint8_t Ndim, concepts::device TDev = clue::Device>
ALPAKA_FN_HOST auto clue::PointsDevice< Ndim, TDev >::coords ( )

Returns the coordinates of the points as a span.

Returns
A span of the coordinates of the points

◆ coords() [2/4]

template<uint8_t Ndim, concepts::device TDev = clue::Device>
ALPAKA_FN_HOST auto clue::PointsDevice< Ndim, TDev >::coords ( ) const

Returns the coordinates of the points as a const span.

Returns
A const span of the coordinates of the points

◆ coords() [3/4]

template<uint8_t Ndim, concepts::device TDev = clue::Device>
ALPAKA_FN_HOST auto clue::PointsDevice< Ndim, TDev >::coords ( size_t dim)

Returns the coordinates of the points for a specific dimension as a span.

Parameters
dimThe dimension for which to get the coordinates
Returns
A span of the coordinates for the specified dimension

◆ coords() [4/4]

template<uint8_t Ndim, concepts::device TDev = clue::Device>
ALPAKA_FN_HOST auto clue::PointsDevice< Ndim, TDev >::coords ( size_t dim) const

Returns the coordinates of the points for a specific dimension as a const span.

Parameters
dimThe dimension for which to get the coordinates
Returns
A const span of the coordinates for the specified dimension

◆ isSeed() [1/2]

template<uint8_t Ndim, concepts::device TDev = clue::Device>
ALPAKA_FN_HOST auto clue::PointsDevice< Ndim, TDev >::isSeed ( )

Returns the seed status of the points as a span.

Returns
A span indicating whether each point is a seed

◆ isSeed() [2/2]

template<uint8_t Ndim, concepts::device TDev = clue::Device>
ALPAKA_FN_HOST auto clue::PointsDevice< Ndim, TDev >::isSeed ( ) const

Returns the seed status of the points as a const span.

Returns
A const span indicating whether each point is a seed

◆ size()

template<uint8_t Ndim, concepts::device TDev = clue::Device>
ALPAKA_FN_HOST int32_t clue::PointsDevice< Ndim, TDev >::size ( ) const

Returns the number of points.

Returns
The number of points

◆ view() [1/2]

template<uint8_t Ndim, concepts::device TDev = clue::Device>
ALPAKA_FN_HOST auto & clue::PointsDevice< Ndim, TDev >::view ( )

Returns the view of the points.

Returns
A reference to the PointsView structure containing the points data

◆ view() [2/2]

template<uint8_t Ndim, concepts::device TDev = clue::Device>
ALPAKA_FN_HOST const auto & clue::PointsDevice< Ndim, TDev >::view ( ) const

Returns the view of the points.

Returns
A const reference to the PointsView structure containing the points data

◆ weights() [1/2]

template<uint8_t Ndim, concepts::device TDev = clue::Device>
ALPAKA_FN_HOST auto clue::PointsDevice< Ndim, TDev >::weights ( )

Returns the weights of the points as a span.

Returns
A span of the weights of the points

◆ weights() [2/2]

template<uint8_t Ndim, concepts::device TDev = clue::Device>
ALPAKA_FN_HOST auto clue::PointsDevice< Ndim, TDev >::weights ( ) const

Returns the weights of the points as a const span.

Returns
A const span of the weights of the points

The documentation for this class was generated from the following file: