Class vart::PLKernel#

class PLKernel

Public Functions

PLKernel(PLKernelImplType type, const std::string &kernel_name, std::string &json_data, std::shared_ptr<Device> device)#

PLKernel() - Constructs a PLKernel object.

Parameters:
  • type – The type of the kernel implementation.

  • kernel_name – The name of the kernel.

  • json_data – The JSON data for the kernel configuration.

  • device – The device on which the kernel will run.

PLKernel(std::shared_ptr<PLKernelImplBase> ptr)#

PLKernel() - Constructs a PLKernel object with a given implementation pointer.

Parameters:

ptr – A shared pointer to the kernel implementation.

~PLKernel()#

~PLKernel() - Destructs a PLKernel object

const std::shared_ptr<PLKernelImplBase> &get_pimpl_handle() const#

get_pimpl_handle() - Gives pointer to implementation class.

Returns:

Returns a constant reference of pointer to implementation class.

template<typename ...Args>
inline void process(Args&&... args)#

Process() - Set and process the given arguments on Kernel.

Template Parameters:

Args – Variadic template arguments

Parameters:

args – Arguments to be processed. Arguments specified to program as kernel arguments in sequence.

int wait(unsigned int timeout)#

wait() - Waits for the kernel to complete processing.

Parameters:

timeout – The timeout value in milliseconds.

Returns:

An integer indicating the status.

template<typename PLKernelAnyInfo>
inline void set_config(PLKernelAnyInfo &info)#

set_config() - Sets the configuration for the kernel.

Template Parameters:

PLKernelAnyInfo – The type of the configuration information.

Parameters:

info – The configuration information.

template<typename PLKernelAnyInfo>
inline void get_config(PLKernelAnyInfo &info)#

get_config() - Gets the configuration of the kernel.

Template Parameters:

PLKernelAnyInfo – The type of the configuration information.

Parameters:

info – The configuration information.

Private Members

std::shared_ptr<PLKernelImplBase> pimpl#
bool enable_profiling = false#
std::vector<std::chrono::high_resolution_clock::time_point> profile_start_time#
std::vector<std::chrono::high_resolution_clock::time_point> profile_end_time#