Abstract interface for PLKernel implementation used by PLKernel.
More...
#include <vart_plkernel_impl_base.hpp>
Abstract interface for PLKernel implementation used by PLKernel.
- Note
- Applications should use vart::PLKernel rather than this type directly, unless extending or integrating a new backend.
◆ PLKernelImplBase()
| vart::PLKernelImplBase::PLKernelImplBase |
( |
| ) |
|
|
default |
◆ ~PLKernelImplBase()
| virtual vart::PLKernelImplBase::~PLKernelImplBase |
( |
| ) |
|
|
inlinevirtual |
Virtual destructor to ensure proper cleanup of derived implementations.
◆ get_config()
template<typename PLKernelAnyInfo >
| void vart::PLKernelImplBase::get_config |
( |
PLKernelAnyInfo & |
info | ) |
|
|
inline |
get_config() - Gets the configuration of the kernel.
- Template Parameters
-
| PLKernelAnyInfo | The type of the configuration information. |
- Parameters
-
| [out] | info | Populated with the current kernel configuration on return. |
◆ get_config_impl()
| virtual void vart::PLKernelImplBase::get_config_impl |
( |
std::any & |
info | ) |
|
|
pure virtual |
get_config_impl() - Gets configuration using a non-template virtual function.
- Template Parameters
-
| PLKernelAnyInfo | The type of the configuration information. |
- Parameters
-
| [out] | info | Populated with the current kernel configuration on return. |
◆ process()
| virtual void vart::PLKernelImplBase::process |
( |
const std::vector< std::any > & |
args | ) |
|
|
pure virtual |
process() - Set and process the given arguments on Kernel.
- Parameters
-
| [in] | args | Arguments to be processed, type-erased through std::any. Each element is bound to the corresponding kernel argument slot in sequence. Implementations are expected to throw std::runtime_error for an unknown / unsupported element type. |
Use this method to set any type of arguments required by the kernel. This method can pass any type and any number of arguments.
◆ set_config()
template<typename PLKernelAnyInfo >
| void vart::PLKernelImplBase::set_config |
( |
PLKernelAnyInfo & |
info | ) |
|
|
inline |
set_config() - Sets the configuration for the kernel.
- Template Parameters
-
| PLKernelAnyInfo | The type of the configuration information. |
- Parameters
-
| [in] | info | The configuration information to apply to the kernel. |
◆ set_config_impl()
| virtual void vart::PLKernelImplBase::set_config_impl |
( |
const std::any & |
info | ) |
|
|
pure virtual |
set_config_impl() - Set configuration using a non-template virtual function.
- Template Parameters
-
| PLKernelAnyInfo | The type of the configuration information. |
- Parameters
-
| [in] | info | The configuration information to apply to the kernel. |
Templates cannot be declared as virtual in C++. To work around this, we can use a non-template virtual function in the base class and then use template methods in the derived class to handle the specific types
◆ wait()
| virtual int vart::PLKernelImplBase::wait |
( |
unsigned int |
timeout | ) |
|
|
pure virtual |
wait() - Waits for the kernel to complete processing.
- Parameters
-
| [in] | timeout | Timeout in milliseconds. A value of 0 means block until the run completes (no timeout). |
- Returns
- Integer indicating the backend run state. Implementations may return
-1 if they internally catch an exception while waiting.
The documentation for this class was generated from the following file: