PLSSVM - Parallel Least Squares Support Vector Machine
2.0.0
A Least Squares Support Vector Machine implementation using different backends.
|
RAII wrapper class around a cl_context. More...
#include <context.hpp>
Public Member Functions | |
context ()=default | |
Empty default construct context. | |
context (cl_context device_context, cl_platform_id platform, std::vector< cl_device_id > devices) | |
Construct a new OpenCL context. More... | |
context (const context &)=delete | |
Delete copy-constructor to make context a move only type. | |
context (context &&other) noexcept | |
Move-constructor as context is a move-only type. More... | |
context & | operator= (const context &)=delete |
Delete copy-assignment-operator to make context a move only type. | |
context & | operator= (context &&other) |
Move-assignment-operator as context is a move-only type. More... | |
~context () | |
Release the context resources on destruction. | |
operator cl_context & () noexcept | |
Implicitly convert a context wrapper to an OpenCL cl_context. More... | |
operator const cl_context & () const noexcept | |
Implicitly convert a context wrapper to an OpenCL cl_context. More... | |
Public Attributes | |
cl_context | device_context {} |
The OpenCL context associated with the platform containing the respective devices. | |
cl_platform_id | platform {} |
The OpenCL platform associated with this context. | |
std::vector< cl_device_id > | devices {} |
All devices associated with this context. | |
RAII wrapper class around a cl_context.
Also contains the associated platform and a list of all associated devices.
plssvm::opencl::detail::context::context | ( | cl_context | device_context, |
cl_platform_id | platform, | ||
std::vector< cl_device_id > | devices | ||
) |
Construct a new OpenCL context.
[in] | device_context | the associated OpenCL context |
[in] | platform | the OpenCL platform associated with this OpenCL context |
[in] | devices | the list of devices associated with this OpenCL cl_context |
|
noexcept |
Move-constructor as context is a move-only type.
[in,out] | other | the context to move the resources from |
Move-assignment-operator as context is a move-only type.
[in,out] | other | the context to move the resources from |
*this
|
inlinenoexcept |
Implicitly convert a context wrapper to an OpenCL cl_context.
[[nodiscard]]
)
|
inlinenoexcept |
Implicitly convert a context wrapper to an OpenCL cl_context.
[[nodiscard]]
)