PLSSVM - Parallel Least Squares Support Vector Machine
2.0.0
A Least Squares Support Vector Machine implementation using different backends.
|
Namespace containing CUDA backend specific implementation details. Should not directly be used by users. More...
Classes | |
class | device_ptr |
Small wrapper class around a CUDA device pointer together with commonly used device functions. More... | |
Functions | |
template<typename value_type , typename size_type > | |
__global__ void | fill_array (value_type *data, const value_type value, const size_type pos, const size_type count) |
Fill count values of the array data with the value starting at position pos . More... | |
void | gpu_assert (cudaError_t code) |
Check the CUDA error code . If code signals an error, throw a plssvm::cuda::backend_exception. More... | |
int | get_device_count () |
Returns the number of available CUDA devices. More... | |
void | set_device (int device) |
Set the device to the active CUDA device. More... | |
void | peek_at_last_error () |
Returns the last error from a CUDA runtime call. | |
void | device_synchronize (int device) |
Wait for the compute device to finish. More... | |
Namespace containing CUDA backend specific implementation details. Should not directly be used by users.
__global__ void plssvm::cuda::detail::fill_array | ( | value_type * | data, |
const value_type | value, | ||
const size_type | pos, | ||
const size_type | count | ||
) |
Fill count
values of the array data
with the value
starting at position pos
.
value_type | the type of the array and fill value |
size_type | the size type |
[out] | data | the array to fill |
[in] | value | the value to fill the array with |
[in] | pos | the position to start filling the array |
[in] | count | the number of values to fill |
void plssvm::cuda::detail::gpu_assert | ( | cudaError_t | code | ) |
Check the CUDA error code
. If code
signals an error, throw a plssvm::cuda::backend_exception.
The exception contains the following message: "CUDA assert 'CUDA_ERROR_NAME' (CUDA_ERROR_CODE): CUDA_ERROR_STRING".
[in] | code | the CUDA error code to check |
plssvm::cuda::backend_exception | if the error code signals a failure |
int plssvm::cuda::detail::get_device_count | ( | ) |
Returns the number of available CUDA devices.
[[nodiscard]]
) void plssvm::cuda::detail::set_device | ( | int | device | ) |
Set the device
to the active CUDA device.
[in] | device | the now active device |
plssvm::cuda::backend_exception | if the given device ID is smaller than 0 or greater or equal than the available number of devices |
void plssvm::cuda::detail::device_synchronize | ( | int | device | ) |
Wait for the compute device
to finish.
Calls plssvm::cuda::detail::peek_at_last_error() before synchronizing.
[in] | device | the CUDA device to synchronize |
plssvm::cuda::backend_exception | if the given device ID is smaller than 0 or greater or equal than the available number of devices |