PLKernel class for managing PL kernel execution.
More...
#include <vart_plkernel.hpp>
PLKernel class for managing PL kernel execution.
- See also
- PLKernelImplBase
◆ PLKernel() [1/2]
| vart::PLKernel::PLKernel |
( |
PLKernelImplType |
type, |
|
|
const std::string & |
kernel_name, |
|
|
std::string & |
json_data, |
|
|
std::shared_ptr< Device > |
device |
|
) |
| |
PLKernel() - Constructs a PLKernel object.
- Parameters
-
| [in] | type | The type of the kernel implementation. See PLKernelImplType for supported types. |
| [in] | kernel_name | The name of the kernel. |
| [in] | json_data | The JSON data for the kernel configuration. |
| [in] | device | The device on which the kernel will run. Must be non-null. See vart::Device for more details. |
◆ PLKernel() [2/2]
PLKernel() - Constructs a PLKernel object with a given implementation pointer.
- Parameters
-
| [in] | ptr | A shared pointer to the kernel implementation. |
◆ get_config()
template<typename PLKernelAnyInfo >
| void vart::PLKernel::get_config |
( |
PLKernelAnyInfo & |
info | ) |
|
|
inline |
get_config() - Gets the configuration of the kernel.
- Template Parameters
-
| PLKernelAnyInfo | The type of the configuration information. The XRT backend always writes a std::vector<vart::ArgumentInfo>; passing any other type causes std::bad_any_cast (rethrown as std::runtime_error) on the trailing any_cast inside this template. |
- Parameters
-
| [out] | info | The configuration information. Overwritten on return. |
◆ get_pimpl_handle()
| const std::shared_ptr<PLKernelImplBase>& vart::PLKernel::get_pimpl_handle |
( |
| ) |
const |
get_pimpl_handle() - Gives pointer to implementation class.
- Returns
- Returns a constant reference of pointer to implementation class.
◆ process()
template<typename... Args>
| void vart::PLKernel::process |
( |
Args &&... |
args | ) |
|
|
inline |
process() - Set and process the given arguments on Kernel.
- Template Parameters
-
| Args | Variadic template arguments |
- Parameters
-
| [in] | args | Arguments to be processed. Scalar/pointer arguments are bound to the kernel in the order supplied. |
◆ set_config()
template<typename PLKernelAnyInfo >
| void vart::PLKernel::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. |
◆ wait()
| int vart::PLKernel::wait |
( |
unsigned int |
timeout | ) |
|
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
- An integer indicating the status.
The documentation for this class was generated from the following file: