Added updated docstrings
This commit is contained in:
parent
85f43c5c8e
commit
6fb99c089b
10 changed files with 334 additions and 72 deletions
|
|
@ -6,22 +6,47 @@
|
|||
|
||||
namespace kp {
|
||||
|
||||
/**
|
||||
Abstraction for compute shaders that are run on top of tensors grouped via ParameterGroups (which group descriptorsets)
|
||||
*/
|
||||
class Algorithm
|
||||
{
|
||||
public:
|
||||
/**
|
||||
Base constructor for Algorithm. Should not be used unless explicit intended.
|
||||
*/
|
||||
Algorithm();
|
||||
|
||||
/**
|
||||
* Default constructor for Algorithm
|
||||
*
|
||||
* @param device The Vulkan device to use for creating resources
|
||||
* @param commandBuffer The vulkan command buffer to bind the pipeline and shaders
|
||||
*/
|
||||
Algorithm(std::shared_ptr<vk::Device> device,
|
||||
std::shared_ptr<vk::CommandBuffer> commandBuffer);
|
||||
|
||||
// TODO: Add specialisation data
|
||||
// TODO: Explore other ways of passing shader (ie raw bytes)
|
||||
/**
|
||||
* Initialiser for the shader data provided to the algoithm as well as tensor parameters that will be used in shader.
|
||||
*
|
||||
* @param shaderFileData The bytes in spir-v format of the shader
|
||||
* @tensorParams The Tensors to be used in the Algorithm / shader for processing
|
||||
*/
|
||||
void init(const std::vector<char>& shaderFileData,
|
||||
std::vector<std::shared_ptr<Tensor>> tensorParams);
|
||||
|
||||
/**
|
||||
* Destructor for Algorithm which is responsible for freeing and desroying respective pipelines and owned parameter groups.
|
||||
*/
|
||||
~Algorithm();
|
||||
|
||||
// Record commands
|
||||
/**
|
||||
* Records the dispatch function with the provided template parameters or alternatively using the size of the tensor by default.
|
||||
*
|
||||
* @param x Layout X dispatch value
|
||||
* @param y Layout Y dispatch value
|
||||
* @param z Layout Z dispatch value
|
||||
*/
|
||||
void recordDispatch(uint32_t x = 1, uint32_t y = 1, uint32_t z = 1);
|
||||
|
||||
private:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue