Borrar filtros
Borrar filtros

How to speed up large marix multiply?

1 visualización (últimos 30 días)
Jiuxuan Zhao
Jiuxuan Zhao el 24 de Jun. de 2019
Comentada: Joss Knight el 3 de Ag. de 2019
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 comentarios
KSSV
KSSV el 24 de Jun. de 2019
Explore gpuArray option.
Jan
Jan el 24 de Jun. de 2019
Do the matrices have a pattern or are they sparse? Why do you assume that there is anything better than A*A' ?

Iniciar sesión para comentar.

Respuestas (1)

Matt J
Matt J el 24 de Jun. de 2019
Editada: Matt J el 24 de Jun. de 2019
If you download mtimesx, you can avoid an explicit transpose,
mtimesx SPEED
B=mtimesx(A,A,'c');
  3 comentarios
Jan
Jan el 8 de Jul. de 2019
@Joss: What does "internally supported" exactly mean? Does the JIT acceleration omit the explicit transposition?
Joss Knight
Joss Knight el 3 de Ag. de 2019
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.

Iniciar sesión para comentar.

Categorías

Más información sobre Linear Least Squares en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by