Kompute
Loading...
Searching...
No Matches
Public Member Functions | List of all members
kp::OpAlgoDispatch Class Reference

#include <OpAlgoDispatch.hpp>

Inheritance diagram for kp::OpAlgoDispatch:
Inheritance graph
[legend]
Collaboration diagram for kp::OpAlgoDispatch:
Collaboration graph
[legend]

Public Member Functions

template<typename T = float>
 OpAlgoDispatch (const std::shared_ptr< kp::Algorithm > &algorithm, const std::vector< T > &pushConstants={}) noexcept
 
 OpAlgoDispatch (const OpAlgoDispatch &)=delete
 Make OpAlgoDispatch non-copyable.
 
 OpAlgoDispatch (const OpAlgoDispatch &&)=delete
 
OpAlgoDispatchoperator= (const OpAlgoDispatch &)=delete
 
OpAlgoDispatchoperator= (const OpAlgoDispatch &&)=delete
 
virtual ~OpAlgoDispatch () noexcept override
 
virtual void record (const vk::CommandBuffer &commandBuffer) override
 
virtual void preEval (const vk::CommandBuffer &commandBuffer) override
 
virtual void postEval (const vk::CommandBuffer &commandBuffer) override
 
- Public Member Functions inherited from kp::OpBase
 OpBase ()=default
 Construct a new OpBase object.
 
 OpBase (const OpBase &)=delete
 Make OpBase non-copyable.
 
 OpBase (const OpBase &&)=delete
 
OpBaseoperator= (const OpBase &)=delete
 
OpBaseoperator= (const OpBase &&)=delete
 
virtual ~OpBase () noexcept
 

Detailed Description

Operation that provides a general abstraction that simplifies the use of algorithm and parameter components which can be used with shaders. By default it enables the user to provide a dynamic number of tensors which are then passed as inputs.

Constructor & Destructor Documentation

◆ OpAlgoDispatch()

template<typename T = float>
kp::OpAlgoDispatch::OpAlgoDispatch ( const std::shared_ptr< kp::Algorithm > &  algorithm,
const std::vector< T > &  pushConstants = {} 
)
inlinenoexcept

Constructor that stores the algorithm to use as well as the relevant push constants to override when recording.

Parameters
algorithmThe algorithm object to use for dispatch
pushConstantsThe push constants to use for override

◆ ~OpAlgoDispatch()

virtual kp::OpAlgoDispatch::~OpAlgoDispatch ( )
overridevirtualnoexcept

Default destructor, which is in charge of destroying the algorithm components but does not destroy the underlying tensors

Member Function Documentation

◆ postEval()

virtual void kp::OpAlgoDispatch::postEval ( const vk::CommandBuffer &  commandBuffer)
overridevirtual

Does not perform any postEval commands.

Parameters
commandBufferThe command buffer to record the command into.

Implements kp::OpBase.

◆ preEval()

virtual void kp::OpAlgoDispatch::preEval ( const vk::CommandBuffer &  commandBuffer)
overridevirtual

Does not perform any preEval commands.

Parameters
commandBufferThe command buffer to record the command into.

Implements kp::OpBase.

◆ record()

virtual void kp::OpAlgoDispatch::record ( const vk::CommandBuffer &  commandBuffer)
overridevirtual

This records the commands that are to be sent to the GPU. This includes the barriers that ensure the memory has been copied before going in and out of the shader, as well as the dispatch operation that sends the shader processing to the gpu. This function also records the GPU memory copy of the output data for the staging buffer so it can be read by the host.

Parameters
commandBufferThe command buffer to record the command into.

Implements kp::OpBase.


The documentation for this class was generated from the following file: