Extended algorithm to add spec consts for int and float

This commit is contained in:
Alejandro Saucedo 2021-02-13 19:38:02 +00:00
parent 9cb4c2f1e1
commit 0b84876c95
4 changed files with 145 additions and 26 deletions

View file

@ -49,7 +49,8 @@ class OpAlgoBase : public OpBase
std::shared_ptr<vk::Device> device,
std::shared_ptr<vk::CommandBuffer> commandBuffer,
std::vector<std::shared_ptr<Tensor>>& tensors,
KomputeWorkgroup komputeWorkgroup = KomputeWorkgroup());
KomputeWorkgroup komputeWorkgroup = {},
const Algorithm::SpecializationContainer& specializationConstants = {});
/**
* Constructor that enables a file to be passed to the operation with
@ -68,7 +69,8 @@ class OpAlgoBase : public OpBase
std::shared_ptr<vk::CommandBuffer> commandBuffer,
std::vector<std::shared_ptr<Tensor>>& tensors,
std::string shaderFilePath,
KomputeWorkgroup komputeWorkgroup = KomputeWorkgroup());
KomputeWorkgroup komputeWorkgroup = {},
const Algorithm::SpecializationContainer& specializationConstants = {});
/**
* Constructor that enables raw shader data to be passed to the main operation
@ -86,7 +88,8 @@ class OpAlgoBase : public OpBase
std::shared_ptr<vk::CommandBuffer> commandBuffer,
std::vector<std::shared_ptr<Tensor>>& tensors,
const std::vector<char>& shaderDataRaw,
KomputeWorkgroup komputeWorkgroup = KomputeWorkgroup());
KomputeWorkgroup komputeWorkgroup = {},
const Algorithm::SpecializationContainer& specializationConstants = {});
/**
* Default destructor, which is in charge of destroying the algorithm