holoscan::OperatorSpec
holoscan::OperatorSpec
Class to define the specification of an operator.
Inherits from: holoscan::ComponentSpec (public)
Constructors
OperatorSpec
Construct a new OperatorSpec object.
Parameters
The pointer to the fragment that contains this operator.
Destructor
~OperatorSpec
Methods
inputs
Get input specifications of this operator.
Returns: The reference to the input specifications of this operator.
input
Define an input specification for this operator
Define an input specification for this operator (with name and size and policy)
Define an input specification for this operator (with name and policy)
Define an input specification for this operator.
Returns: The reference to the input specification.
Template parameters
The type of the input data.
multi_port_condition
Add a Condition that depends on the status of multiple input ports.
Parameters
The type of multi-message condition (currently only kMultiMessageAvailable)
The names of the input ports the condition will apply to
ArgList of arguments to pass to the MultiMessageAvailableCondition
multi_port_conditions
or_combine_port_conditions
Assign the conditions on the specified input ports to be combined with an OR operation.
This is intended to allow using OR instead of AND combination of single-port conditions like MessageAvailableCondition for the specified input ports.
Parameters
The names of the input ports whose conditions will be OR combined.
or_combiner_port_names
vector of the names of ports for each OrConditionCombiner
device_input
Overload 1
Overload 2
Define an input specification for this operator with a memory block size.
It is only applicable for GPU-resident operators.
The executor will allocate a shared device memory buffer of the specified size for this port and the connected output port. Both ports will map to the same device memory address. Integer literals (e.g. 0, 1024) and size_t values resolve to this overload.
Returns: The reference to the input specification.
Parameters
The name of the input specification.
The device memory block size in bytes.
outputs
Get output specifications of this operator.
Returns: The reference to the output specifications of this operator.
input_output_unique_id
Return the unique_id for a port name by checking inputs first, then outputs.
If a port with the same name exists in both inputs and outputs, an exception is thrown. If the port does not exist in either, an exception is thrown.
Returns: const std::string& The unique_id corresponding to the found port.
Parameters
The port name to look up.
output
Define an output specification for this operator
Define an output specification for this operator (with name and size and policy)
Define an output specification for this operator (with name and policy)
Define an output specification for this operator.
Returns: The reference to the output specification.
Template parameters
The type of the output data.
device_output
Overload 1
Overload 2
Define an output specification for this operator with a memory block size.
It is only applicable for GPU-resident operators.
The executor will allocate a shared device memory buffer of the specified size for this port and the connected input port. Both ports will map to the same device memory address. Integer literals (e.g. 0, 1024) and size_t values resolve to this overload.
Returns: The reference to the output specification.
Parameters
The name of the output specification.
The device memory block size in bytes.
param
Define an IOSpec* parameter for this operator (with flag)
Define an IOSpec* parameter for this operator (with init list)
Overload 3
Overload 4
Overload 5
Overload 6
Define a parameter for this component (with flag)
Define a parameter for this component (with flag and headline)
Define a parameter for this component (with flag and headline and description)
Define a parameter for this component (with headline and description and init list)
Define a parameter that has a default value (1)
Define a parameter that has a default value (2)
Define an IOSpec* parameter for this operator.
Parameters
The parameter to define.
The key (name) of the parameter.
The headline of the parameter.
The description of the parameter.
The flag of the parameter (default: ParameterFlag::kNone).
to_yaml_node
Get a YAML representation of the operator spec.
Returns: YAML node including the inputs, outputs, and parameters of this operator.
fragment
Overload 1
Overload 2
Set the pointer to the fragment that contains this component.
Parameters
The pointer to the fragment that contains this component.
params
Get the parameters of this component.
Returns: The reference to the parameters of this component.
description
Get a description of the component spec.
Returns: YAML string.
See also: to_yaml_node()