Points Conversions
Provides utilities for copying data between host and device points.
- Authors
Simone Balducci, Felice Pantaleo, Marco Rovere, Wahid Redjeb, Aurora Perego, Francesco Giacomini
-
namespace clue
Functions
-
template<concepts::queue TQueue, std::size_t Ndim, std::floating_point TData, concepts::device TDev>
void copyToHost(TQueue &queue, PointsHost<Ndim, TData> &h_points, const PointsDevice<Ndim, TData, TDev> &d_points)
Copies the results of the clustering from the device points to the host points.
- Template Parameters:
- concepts::queue TQueue
The type of the queue for the device operations
- std::size_t Ndim
The number of dimensions of the points
- concepts::device TDev
The type of device that the points are allocated on
- Parameters:
- TQueue &queue
The queue used for the device operations
- PointsHost<Ndim, TData> &h_points
The points allocated on the host, where the clustering results will be saved
- const PointsDevice<Ndim, TData, TDev> &d_points
The points allocated on the device, where the clustering has been run
-
template<concepts::queue TQueue, std::size_t Ndim, std::floating_point TData, concepts::device TDev>
auto copyToHost(TQueue &queue, const PointsDevice<Ndim, TData, TDev> &d_points)
Copies the results of the clustering from the device points to the host points.
- Template Parameters:
- concepts::queue TQueue
The type of the queue for the device operations
- std::size_t Ndim
The number of dimensions of the points
- concepts::device TDev
The type of device that the points are allocated on
- Parameters:
- TQueue &queue
The queue used for the device operations
- h_points
The points allocated on the host, where the clustering results will be saved
- const PointsDevice<Ndim, TData, TDev> &d_points
The points allocated on the device, where the clustering has been run
-
template<concepts::queue TQueue, std::size_t Ndim, std::floating_point TData, concepts::device TDev>
void copyToDevice(TQueue &queue, PointsDevice<Ndim, TData, TDev> &d_points, const PointsHost<Ndim, TData> &h_points)
Copies the coordinates and weights of the points from the host to the device.
- Template Parameters:
- concepts::queue TQueue
The type of the queue for the device operations
- std::size_t Ndim
The number of dimensions of the points
- concepts::device TDev
The type of device that the points are allocated on
- Parameters:
- TQueue &queue
The queue used for the device operations
- PointsDevice<Ndim, TData, TDev> &d_points
The empty points allocated on the device
- const PointsHost<Ndim, TData> &h_points
The points allocated on the host, containing the points’ coordinates and weights
-
template<concepts::queue TQueue, std::size_t Ndim, std::floating_point TData, concepts::device TDev>
auto copyToDevice(TQueue &queue, const PointsHost<Ndim, TData> &h_points)
Copies the coordinates and weights of the points from the host to the device.
- Template Parameters:
- concepts::queue TQueue
The type of the queue for the device operations
- std::size_t Ndim
The number of dimensions of the points
- concepts::device TDev
The type of device that the points are allocated on
- Parameters:
- TQueue &queue
The queue used for the device operations
- d_points
The empty points allocated on the device
- const PointsHost<Ndim, TData> &h_points
The points allocated on the host, containing the points’ coordinates and weights