MtxVec VCL
|
Provides interface for multiplying small matrices by using the lapack's dgemm api standard.)
The matrix multiplication code is generated on the fly to achieve maximum possible performance. Additionally all the error checking on each consecutive call is also absent. This is most usefull, when the matrices to be multiplied are very small: 2x2 or 3x3, (100x) but there are still considerable benefits up to size 50x50 (1.3x) and more.
Typically this object would be created, then Init method is to be called and finally, one of the six Mul methods can be called multiple times.The class provides four variants of Multiply methods:
It is most safe to use the first variant. Performance will increase with the parameterless Mul method (2x) and best performance can be obtained with the third variant (3x). Only switch to using the third variant when you are confident, that your algorithm works correctly.
Please note that
TMtx.Mul(A,B);
will use object cache to store JIT-ed kernels up to user specified matrix size for square matrices. The default limit is set at size 32x32. The kernel will be created on first call.
Three different options to setup matrix multiplication of small matrices
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
|
What do you think about this topic? Send feedback!
|