Class for performing matrix multiplication with a hierarchical approach. More...
#include <functions.h>
Public Member Functions | |
| MatrixMultiply_h (int num_rows, int num_cols, int block_size) | |
| Constructor for MatrixMultiply_h. | |
| void | apply (const SelectivityVector &rows, std::vector< VectorPtr > &args, const TypePtr &outputType, exec::EvalCtx &context, VectorPtr &output) const override |
| Apply the hierarchical matrix multiplication operation. | |
| float * | getTensor () const override |
| Get the tensor data associated with this function. | |
| std::string | getFuncName () |
| Get the name of the function. | |
| CostEstimate | getCost (std::vector< int > inputDims) |
| Estimate the computational cost of the function. | |
Public Member Functions inherited from MLFunction | |
| virtual | ~MLFunction ()=default |
| Virtual destructor. | |
| virtual std::vector< int > | getDims () |
| Returns the dimensions of the function. | |
| virtual int | getNumDims () |
| Returns the number of dimensions of the function. | |
Static Public Member Functions | |
| static std::vector< std::shared_ptr< exec::FunctionSignature > > | signatures () |
| Get the function signatures for hierarchical matrix multiplication. | |
| static std::string | getName () |
| Get the name of the function. | |
Additional Inherited Members | |
Protected Member Functions inherited from MLFunction | |
| 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. | |
Protected Attributes inherited from MLFunction | |
| std::vector< int > | dims |
| Dimensions of the function. | |
Class for performing matrix multiplication with a hierarchical approach.
This class implements matrix multiplication using a hierarchical approach, which is useful for optimizing performance on large matrices by breaking the computation into smaller blocks.
|
inline |
Constructor for MatrixMultiply_h.
| num_rows | The number of rows in the matrix. |
| num_cols | The number of columns in the matrix. |
| block_size | The size of each block for hierarchical computation. |
|
inlineoverride |
Apply the hierarchical matrix multiplication operation.
| rows | The selectivity vector indicating which rows to process. |
| args | The input arguments. |
| outputType | The type of the output vector. |
| context | The evaluation context. |
| output | The output vector. |
|
inlinevirtual |
Estimate the computational cost of the function.
| inputDims | The dimensions of the input data. |
Reimplemented from MLFunction.
|
inlinevirtual |
Get the name of the function.
Reimplemented from MLFunction.
|
inlinestatic |
Get the name of the function.
|
inlineoverridevirtual |
Get the tensor data associated with this function.
Implements MLFunction.
|
inlinestatic |
Get the function signatures for hierarchical matrix multiplication.