|
Lluvia
|
Class for describing a compute node node. More...
#include <ComputeNodeDescriptor.h>
Public Member Functions | |
| ComputeNodeDescriptor ()=default | |
| ComputeNodeDescriptor (const ComputeNodeDescriptor &descriptor)=default | |
| ComputeNodeDescriptor (ComputeNodeDescriptor &&descriptor)=default | |
| ~ComputeNodeDescriptor ()=default | |
| ComputeNodeDescriptor & | operator= (const ComputeNodeDescriptor &descriptor)=default |
| ComputeNodeDescriptor & | operator= (ComputeNodeDescriptor &&descriptor)=default |
| ComputeNodeDescriptor & | setProgram (const std::shared_ptr< ll::Program > &tProgram) noexcept |
| Sets the program object. More... | |
| ComputeNodeDescriptor & | setProgram (const std::shared_ptr< ll::Program > &tProgram, const std::string &tFunctionName) noexcept |
| Sets the program object and function name. More... | |
| ComputeNodeDescriptor & | setParameter (const std::string &name, const ll::Parameter &value) |
| Sets a parameter. More... | |
| ComputeNodeDescriptor & | setFunctionName (const std::string &name) noexcept |
| Sets the function name within the program object to run in the ll::ComputeNode. More... | |
| ComputeNodeDescriptor & | setBuilderName (const std::string &name) noexcept |
| Sets the builder name this descriptor refers to within the Lua interpreter. More... | |
| ComputeNodeDescriptor & | addPort (const ll::PortDescriptor &port) |
| Adds a port to the descriptor. More... | |
| ComputeNodeDescriptor & | addPorts (const std::initializer_list< ll::PortDescriptor > &ports) |
| Adds a list of ports to the descriptor. More... | |
| ComputeNodeDescriptor & | setGridX (const uint32_t x) noexcept |
| Sets the grid size in the X axis. More... | |
| ComputeNodeDescriptor & | setGridY (const uint32_t y) noexcept |
| Sets the grid size in the Y axis. More... | |
| ComputeNodeDescriptor & | setGridZ (const uint32_t z) noexcept |
| Sets the grid size in the Z axis. More... | |
| ComputeNodeDescriptor & | setGridShape (const ll::vec3ui &shape) noexcept |
| Sets the grid shape. More... | |
| ComputeNodeDescriptor & | configureGridShape (const ll::vec3ui &globalShape) noexcept |
| Calculates the grid shape provided local and global shapes. More... | |
| ComputeNodeDescriptor & | setLocalX (const uint32_t x) noexcept |
| Sets the local group size in the X axis. More... | |
| ComputeNodeDescriptor & | setLocalY (const uint32_t y) noexcept |
| Sets the local group size in the Y axis. More... | |
| ComputeNodeDescriptor & | setLocalZ (const uint32_t z) noexcept |
| Sets the local group size in the Z axis. More... | |
| ComputeNodeDescriptor & | setLocalShape (const ll::vec3ui &shape) noexcept |
| Sets the local group shape. More... | |
| ComputeNodeDescriptor & | setPushConstants (const ll::PushConstants &constants) noexcept |
| Sets the push constants for this compute node. More... | |
| std::shared_ptr< ll::Program > | getProgram () const noexcept |
| Gets the program associated to this compute node. More... | |
| const ll::PortDescriptor & | getPort (const std::string &name) const |
| Gets a port descriptor given its name. More... | |
| const ll::Parameter & | getParameter (const std::string &name) const |
| Gets a parameter. More... | |
| const std::string & | getFunctionName () const noexcept |
| Gets the function name within the ll::Program object used by this node. More... | |
| const std::string & | getBuilderName () const noexcept |
| Gets the builder name within the Lua interpreter. More... | |
| ll::vec3ui | getGridShape () const noexcept |
| Gets the grid shape. More... | |
| ll::vec3ui | getLocalShape () const noexcept |
| Gets the local group shape. More... | |
| uint32_t | getGridX () const noexcept |
| uint32_t | getGridY () const noexcept |
| uint32_t | getGridZ () const noexcept |
| uint32_t | getLocalX () const noexcept |
| uint32_t | getLocalY () const noexcept |
| uint32_t | getLocalZ () const noexcept |
| const ll::PushConstants & | getPushConstants () const noexcept |
| std::vector< vk::DescriptorSetLayoutBinding > | getParameterBindings () const |
Class for describing a compute node node.
Descriptors are used to construct ll::ComputeNode objects.
|
default |
|
default |
|
default |
|
default |
| ComputeNodeDescriptor& ll::ComputeNodeDescriptor::addPort | ( | const ll::PortDescriptor & | port | ) |
Adds a port to the descriptor.
| [in] | port | The port |
| ComputeNodeDescriptor& ll::ComputeNodeDescriptor::addPorts | ( | const std::initializer_list< ll::PortDescriptor > & | ports | ) |
Adds a list of ports to the descriptor.
| [in] | ports | The ports |
|
noexcept |
Calculates the grid shape provided local and global shapes.
The calculation is done as:
This method does not control the case of dividing by zero.
| [in] | globalShape | The global shape. |
|
noexcept |
Gets the builder name within the Lua interpreter.
|
noexcept |
Gets the function name within the ll::Program object used by this node.
|
noexcept |
Gets the grid shape.
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
Gets the local group shape.
|
noexcept |
|
noexcept |
|
noexcept |
| const ll::Parameter& ll::ComputeNodeDescriptor::getParameter | ( | const std::string & | name | ) | const |
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. |
| std::vector<vk::DescriptorSetLayoutBinding> ll::ComputeNodeDescriptor::getParameterBindings | ( | ) | const |
| const ll::PortDescriptor& ll::ComputeNodeDescriptor::getPort | ( | const std::string & | name | ) | const |
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. |
|
noexcept |
Gets the program associated to this compute node.
|
noexcept |
|
default |
|
default |
|
noexcept |
Sets the builder name this descriptor refers to within the Lua interpreter.
| [in] | name | The builder name. |
|
noexcept |
Sets the function name within the program object to run in the ll::ComputeNode.
| [in] | name | The function name. |
|
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. |
|
noexcept |
Sets the local group shape.
| [in] | shape | The shape. Each XYZ component must be greater than zero. |
|
noexcept |
Sets the local group size in the X axis.
| [in] | x | The local group size. It must be greater than zero. |
|
noexcept |
Sets the local group size in the Y axis.
| [in] | y | The local group size. It must be greater than zero. |
|
noexcept |
Sets the local group size in the Z axis.
| [in] | z | The local group size. It must be greater than zero. |
| ComputeNodeDescriptor& ll::ComputeNodeDescriptor::setParameter | ( | const std::string & | name, |
| const ll::Parameter & | value | ||
| ) |
Sets a parameter.
| [in] | name | The name |
| [in] | defaultValue | The value. |
|
noexcept |
Sets the program object.
| [in] | tProgram | The program. |
|
noexcept |
Sets the program object and function name.
| [in] | tProgram | The program. |
| [in] | tFunctionName | The function name. |
|
noexcept |
Sets the push constants for this compute node.
| [in] | constants | A shared pointer to ll::PushConstants. This way, the values of the constants can be shared among several nodes. |