A class that implements a concatenation operation for two input arrays, inheriting from MLFunction.
More...
#include <Concat.h>
|
| | Concat (int input1Dims, int input2Dims) |
| | Constructor that initializes the concatenation operation with input dimensions.
|
| |
| void | apply (const SelectivityVector &rows, std::vector< VectorPtr > &args, const TypePtr &type, exec::EvalCtx &context, VectorPtr &output) const override |
| | Applies the concatenation operation to the input arrays.
|
| |
| float * | getTensor () const override |
| | Returns the tensor associated with this function.
|
| |
| CostEstimate | getCost (std::vector< int > inputDims) |
| | Estimates the computational cost of applying the concatenation operation.
|
| |
|
virtual | ~MLFunction ()=default |
| | Virtual destructor.
|
| |
| virtual std::vector< int > | getDims () |
| | Returns the dimensions of the function.
|
| |
| virtual std::string | getFuncName () |
| | Returns the name of the function.
|
| |
| virtual int | getNumDims () |
| | Returns the number of dimensions of the function.
|
| |
|
| static std::vector< std::shared_ptr< exec::FunctionSignature > > | signatures () |
| | Returns the function signatures supported by this class.
|
| |
| static std::string | getName () |
| | Returns the name of the function.
|
| |
|
| double | getWeightedCost (std::string name, float cost) |
| | Calculates the weighted cost of the function.
|
| |
| std::vector< double > | getCoefficientVector (std::string name) |
| | Retrieves the cost coefficients for the function.
|
| |
|
std::vector< int > | dims |
| | Dimensions of the function.
|
| |
A class that implements a concatenation operation for two input arrays, inheriting from MLFunction.
This class provides functionality to concatenate two input arrays along the feature dimension. It is designed to handle arrays of real numbers (floats).
◆ Concat()
| Concat::Concat |
( |
int | input1Dims, |
|
|
int | input2Dims ) |
|
inline |
Constructor that initializes the concatenation operation with input dimensions.
- Parameters
-
| input1Dims | The number of dimensions (features) in the first input array. |
| input2Dims | The number of dimensions (features) in the second input array. |
◆ apply()
| void Concat::apply |
( |
const SelectivityVector & | rows, |
|
|
std::vector< VectorPtr > & | args, |
|
|
const TypePtr & | type, |
|
|
exec::EvalCtx & | context, |
|
|
VectorPtr & | output ) const |
|
inlineoverride |
Applies the concatenation operation to the input arrays.
This method processes the input arrays, concatenates them along the feature dimension, and stores the result in the output vector.
- Parameters
-
| rows | A SelectivityVector specifying the rows to process. |
| args | A vector of input arguments (e.g., the two input arrays). |
| type | The type of the output vector. |
| context | The execution context. |
| output | The output vector where the concatenated result will be stored. |
◆ getCost()
| CostEstimate Concat::getCost |
( |
std::vector< int > | inputDims | ) |
|
|
inlinevirtual |
Estimates the computational cost of applying the concatenation operation.
- Parameters
-
| inputDims | A vector containing the dimensions of the input. |
- Returns
- A CostEstimate object representing the estimated cost.
Reimplemented from MLFunction.
◆ getName()
| static std::string Concat::getName |
( |
| ) |
|
|
inlinestatic |
Returns the name of the function.
- Returns
- The name of the function as a string ("concat").
◆ getTensor()
| float * Concat::getTensor |
( |
| ) |
const |
|
inlineoverridevirtual |
Returns the tensor associated with this function.
- Returns
- A null pointer (no tensor is associated with this function).
Implements MLFunction.
◆ signatures()
| static std::vector< std::shared_ptr< exec::FunctionSignature > > Concat::signatures |
( |
| ) |
|
|
inlinestatic |
Returns the function signatures supported by this class.
- Returns
- A vector of shared pointers to FunctionSignature objects.
The documentation for this class was generated from the following file: