Lluvia
|
Class representing compute nodes. More...
#include <ComputeNode.h>
Public Member Functions | |
ComputeNode ()=delete | |
ComputeNode (const ComputeNode &node)=delete | |
ComputeNode (ComputeNode &&node)=delete | |
ComputeNode (const std::shared_ptr< ll::vulkan::Device > &device, const ll::ComputeNodeDescriptor &descriptor, const std::weak_ptr< ll::Interpreter > &interpreter) | |
Constructs the object. More... | |
virtual | ~ComputeNode () |
ComputeNode & | operator= (const ComputeNode &node)=delete |
ComputeNode & | operator= (ComputeNode &&node)=delete |
ll::NodeType | getType () const noexcept override |
Gets the node type. More... | |
std::string | getFunctionName () const noexcept |
Gets the function name within the shader module this node runs. More... | |
std::shared_ptr< ll::Program > | getProgram () const noexcept |
Gets the program object associated to this node. More... | |
const ll::ComputeNodeDescriptor & | getDescriptor () const noexcept |
Gets the descriptor. More... | |
uint32_t | getLocalX () const noexcept |
Gets the local group size in X dimension. More... | |
uint32_t | getLocalY () const noexcept |
Gets the local group size in Y dimension. More... | |
uint32_t | getLocalZ () const noexcept |
Gets the local group size in Z dimension. More... | |
ll::vec3ui | getLocalShape () const noexcept |
Gets the local group shape. More... | |
uint32_t | getGridX () const noexcept |
Gets the grid size in X dimension. More... | |
void | setGridX (const uint32_t x) noexcept |
Sets the grid size in the X axis. More... | |
uint32_t | getGridY () const noexcept |
Gets the grid size in Y dimension. More... | |
void | setGridY (const uint32_t y) noexcept |
Sets the grid size in the Y axis. More... | |
uint32_t | getGridZ () const noexcept |
Gets the grid size in Z dimension. More... | |
void | setGridZ (const uint32_t z) noexcept |
Sets the grid size in the Z axis. More... | |
void | setGridShape (const ll::vec3ui &shape) noexcept |
Sets the grid shape. More... | |
void | configureGridShape (const ll::vec3ui &globalShape) noexcept |
Configures the grid shape given a global shape. More... | |
ll::vec3ui | getGridShape () const noexcept |
Gets the grid shape. More... | |
bool | hasPort (const std::string &name) const noexcept override |
Returns whether or not a port exists with a given name. More... | |
std::shared_ptr< ll::Object > | getPort (const std::string &name) const override |
Gets a port descriptor given its name. More... | |
void | setPushConstants (const ll::PushConstants &constants) noexcept |
const ll::PushConstants & | getPushConstants () const noexcept |
void | bind (const std::string &name, const std::shared_ptr< ll::Object > &obj) override |
Binds a ll::Object as port index for this node. More... | |
void | record (ll::CommandBuffer &commandBuffer) const override |
Records the operations required to run this node in a ll::CommandBuffer. More... | |
void | setParameter (const std::string &name, const ll::Parameter &value) override |
Sets a parameter. More... | |
const ll::Parameter & | getParameter (const std::string &name) const override |
Gets a parameter. More... | |
![]() | |
virtual | ~Node ()=default |
void | setState (const ll::NodeState tState) |
ll::NodeState | getState () const noexcept |
void | init () |
Protected Member Functions | |
void | onInit () override |
Class representing compute nodes.
|
delete |
|
delete |
|
delete |
ll::ComputeNode::ComputeNode | ( | const std::shared_ptr< ll::vulkan::Device > & | device, |
const ll::ComputeNodeDescriptor & | descriptor, | ||
const std::weak_ptr< ll::Interpreter > & | interpreter | ||
) |
Constructs the object.
[in] | device | The Vulkan device where this node will run. |
[in] | descriptor | The descriptor. A copy of this descriptor is kept within this object. So this one can be modified after the compute node is constructed. |
[in] | interpreter | Interpreter to use for running Lua scripts. |
std::system_error | With error code ll::ErrorCode::InvalidShaderFunctionName if desc.getFunctionName() is empty string. |
std::system_error | With error code ll::ErrorCode::InvalidShaderProgram if desc.getProgram is nullptr. |
std::system_error | With error code ll::ErrorCode::InvalidLocalShape if any of the components of descriptor.localShape is zero. |
|
virtual |
|
overridevirtual |
Binds a ll::Object as port index
for this node.
[in] | name | The port name. |
[in] | obj | The object to bind. |
std::system_error | if obj cannot be mapped as a port at position index . |
Implements ll::Node.
|
noexcept |
Configures the grid shape given a global shape.
[in] | globalShape | The global shape. |
|
noexcept |
Gets the descriptor.
|
noexcept |
Gets the function name within the shader module this node runs.
|
noexcept |
Gets the grid shape.
See ll::ComputeNodeDescriptor::getGridShape for more information.
|
noexcept |
Gets the grid size in X dimension.
See ll::ComputeNodeDescriptor::getGridX for more information.
|
noexcept |
Gets the grid size in Y dimension.
See ll::ComputeNodeDescriptor::getGridY for more information.
|
noexcept |
Gets the grid size in Z dimension.
See ll::ComputeNodeDescriptor::getGridZ for more information.
|
noexcept |
Gets the local group shape.
|
noexcept |
Gets the local group size in X dimension.
See ll::ComputeNodeDescriptor::getLocalX for more information.
|
noexcept |
Gets the local group size in Y dimension.
See ll::ComputeNodeDescriptor::getLocalY for more information.
|
noexcept |
Gets the local group size in Z dimension.
See ll::ComputeNodeDescriptor::getLocalZ for more information.
|
overridevirtual |
Gets a parameter.
[in] | name | The parameter name |
std::system_error | With error code ll::ErrorCode::KeyNotFound if name is not in the parameters table. |
Implements ll::Node.
|
overridevirtual |
Gets a port descriptor given its name.
[in] | name | The name |
std::system_error | With error code ll::ErrorCode::KeyNotFound if name is not in the ports table. |
Implements ll::Node.
|
noexcept |
Gets the program object associated to this node.
|
noexcept |
|
overridevirtualnoexcept |
|
overridevirtualnoexcept |
Returns whether or not a port exists with a given name.
[in] | name | The name of the port. |
Implements ll::Node.
|
overrideprotectedvirtual |
Implements ll::Node.
|
delete |
|
delete |
|
overridevirtual |
Records the operations required to run this node in a ll::CommandBuffer.
[in] | commandBuffer | The command buffer. |
std::system_error | with corresponding error code and message. |
Implements ll::Node.
|
noexcept |
Sets the grid shape.
The grid size defines the number of local groups to be run during the execution of a compute node shader program.
Parameter z
corresponds to the groupCountZ
parameter in vkCmdDispatch. See https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#vkCmdDispatch for more information.
[in] | shape | The grid shape. Each XYZ component must be greater than zero. |
|
noexcept |
Sets the grid size in the X axis.
The grid size defines the number of local groups to be run during the execution of a compute node shader program.
Parameter x
corresponds to the groupCountX
parameter in vkCmdDispatch. See https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#vkCmdDispatch for more information.
[in] | x | The grid size. It must be greater than zero. |
|
noexcept |
Sets the grid size in the Y axis.
The grid size defines the number of local groups to be run during the execution of a compute node shader program.
Parameter y
corresponds to the groupCountY
parameter in vkCmdDispatch. See https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#vkCmdDispatch for more information.
[in] | y | The grid size. It must be greater than zero. |
|
noexcept |
Sets the grid size in the Z axis.
The grid size defines the number of local groups to be run during the execution of a compute node shader program.
Parameter z
corresponds to the groupCountZ
parameter in vkCmdDispatch. See https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#vkCmdDispatch for more information.
[in] | z | The grid size. It must be greater than zero. |
|
overridevirtual |
Sets a parameter.
[in] | name | The name |
[in] | defaultValue | The value. |
Implements ll::Node.
|
noexcept |