PLSSVM - Parallel Least Squares Support Vector Machine  2.0.0
A Least Squares Support Vector Machine implementation using different backends.
utility.hip.hpp
Go to the documentation of this file.
1 
12 #ifndef PLSSVM_BACKENDS_HIP_DETAIL_UTILITY_HPP_
13 #define PLSSVM_BACKENDS_HIP_DETAIL_UTILITY_HPP_
14 #pragma once
15 
16 #include "hip/hip_runtime_api.h" // hipError_t
17 
22 #define PLSSVM_HIP_ERROR_CHECK(err) plssvm::hip::detail::gpu_assert((err))
23 
24 namespace plssvm::hip::detail {
25 
32 void gpu_assert(hipError_t code);
33 
38 [[nodiscard]] int get_device_count();
39 
45 void set_device(int device);
46 
51 
58 void device_synchronize(int device);
59 
60 } // namespace plssvm::hip::detail
61 
62 #endif // PLSSVM_BACKENDS_HIP_DETAIL_UTILITY_HPP_
Namespace containing HIP backend specific implementation details. Should not directly be used by user...
Definition: device_ptr.hip.hpp:18
void device_synchronize(int device)
Wait for the compute device to finish.
void peek_at_last_error()
Returns the last error from a HIP runtime call.
int get_device_count()
Returns the number of available HIP devices.
void set_device(int device)
Set the device to the active HIP device.
void gpu_assert(hipError_t code)
Check the HIP error code. If code signals an error, throw a plssvm::hip::backend_exception.