필터 지우기
필터 지우기

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 CenterFile Exchange에서 Linear Least Squares에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by