フィルターのクリア

How to speed up large marix multiply?

1 回表示 (過去 30 日間)
Jiuxuan Zhao
Jiuxuan Zhao 2019 年 6 月 24 日
コメント済み: Joss Knight 2019 年 8 月 3 日
Now I have a large matix A and I need to do A*A', how to make this as fast as possible?
eg. A = zeros(40000,1000);
B = A*A';
  2 件のコメント
KSSV
KSSV 2019 年 6 月 24 日
Explore gpuArray option.
Jan
Jan 2019 年 6 月 24 日
Do the matrices have a pattern or are they sparse? Why do you assume that there is anything better than A*A' ?

サインインしてコメントする。

回答 (1 件)

Matt J
Matt J 2019 年 6 月 24 日
編集済み: Matt J 2019 年 6 月 24 日
If you download mtimesx, you can avoid an explicit transpose,
mtimesx SPEED
B=mtimesx(A,A,'c');
  3 件のコメント
Jan
Jan 2019 年 7 月 8 日
@Joss: What does "internally supported" exactly mean? Does the JIT acceleration omit the explicit transposition?
Joss Knight
Joss Knight 2019 年 8 月 3 日
It's not the JIT it's the interpreter. When it sees x'*y, x*y', x'*y' or the dot equivalents (.') it calls a special mtimes-transpose operation that includes the information about which arguments are transposed (or conjugate-transposed), rather than applying the transpose operations separately.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeLinear Least Squares についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by