template<ComputeData InputType = std::vector<Kakshya::DataVariant>, ComputeData OutputType = InputType>
template<typename ConcreteOpType , typename... Args>
Create and add operation by type.
- Template Parameters
-
| ConcreteOpType | The concrete operation type to create |
| Args | Constructor argument types |
- Parameters
-
| name | Optional name for the operation |
| args | Constructor arguments for the operation |
- Returns
- Reference to this pipeline for method chaining
Creates a new instance of the specified operation type and adds it to the pipeline. This is the most convenient way to add operations when you don't need to configure them before adding to the pipeline.
Example:
ComputationPipeline & create_operation(const std::string &name="", Args &&... args)
Create and add operation by type.
@ PITCH_SHIFT
Phase-vocoder pitch shift, duration preserved.
Definition at line 127 of file ComputePipeline.hpp.
128 {
129 auto operation = std::make_shared<ConcreteOpType>(std::forward<Args>(args)...);
131 }
ComputationPipeline & add_operation(std::shared_ptr< ConcreteOpType > operation, const std::string &name="")
Add a concrete operation instance to the pipeline.