how to parallelize separate matrix-matrix multiplications?

2 Ansichten (letzte 30 Tage)
Yang am 25 Jan. 2018
Kommentiert: Yang am 26 Jan. 2018
There are three matrix-matrix multiplications: C1=A1*B1, C2=A2*B2, C3=A3*B3.
If I wrote the code like above, the three matrix-matrix multiplications will be calculated in a sequential way. Is there an easy way to parallelize the three matrix-matrix multiplications (apart from using parfor)?
Apology if this question has been raised&answered before. I didn't find such a question after some quick search.

Akzeptierte Antwort

Brendan Hamm
Brendan Hamm am 25 Jan. 2018
Bearbeitet: Brendan Hamm am 25 Jan. 2018
Unless you are working on a cluster, I would not expect to see any speed up from parallelizing such operations. The reason for this is that a matrix multiplication is multi-threaded, meaning that each of these computations is already utilizing multiple cores on your machine.
If you are working on a cluster, you can assign each of these variables in an SPMD block and perform the computation on each machine separately.
  3 Kommentare
Yang am 26 Jan. 2018
Thanks a lot Brendan and Jan!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)


Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by