Symetric matrix power optimization
古いコメントを表示
Hello,
I would like to calculate A^p where A is a symetric matrix. I know that I can use A^p but i would like to know is there is way to calculate only (n²+n)/2 coefficients and just paste the (n²-n)/2 last that are equals ? Or simply do this optimization for A*B where A and B are both symetrics ?
Thank you :)
4 件のコメント
Bruno Luong
2021 年 4 月 29 日
What typical values of n and p ?
Damien GUILLOTIN
2021 年 4 月 29 日
Bruno Luong
2021 年 4 月 30 日
編集済み: Bruno Luong
2021 年 4 月 30 日
"Or simply do this optimization for A*B where A and B are both symetrics ?"
How? For generic A and B symmetric the product is NOT symmetric. If you decide to access only the upper parts of A and B, you make memory access pattern more complex and inefficient for caching.
Damien GUILLOTIN
2021 年 4 月 30 日
採用された回答
その他の回答 (1 件)
Jan
2021 年 4 月 29 日
0 投票
Are you using this already:
- https://www.mathworks.com/matlabcentral/fileexchange/25782-mpower2-a-faster-matrix-power-function
- https://www.mathworks.com/matlabcentral/fileexchange/44575-matrix-power
Do you have a C compiler such that you can try to modify the above solutions and call LAPACK:DSYMM instead of DGEMM?
2 件のコメント
Damien GUILLOTIN
2021 年 4 月 29 日
Bruno Luong
2021 年 4 月 30 日
編集済み: Bruno Luong
2021 年 4 月 30 日
I revisit mpower2 and all the speed up around 2010 when the FEX is publiseh becomes very little now wth R2021a.
カテゴリ
ヘルプ センター および File Exchange で Surrogate Optimization についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!