From the course: Parallel and Concurrent Programming with C++ Part 2

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Solution: Matrix multiply

Solution: Matrix multiply - C++ Tutorial

From the course: Parallel and Concurrent Programming with C++ Part 2

Start my 1-month free trial

Solution: Matrix multiply

(upbeat music) - [Instructor] To design our parallel solution for the matrix multiplication challenge, we began with domain decomposition to consider ways that we could partition this problem. One very convenient aspect of matrix multiplication is that every element in the result matrix C can be calculated independently. For example, calculating element C2,1 only requires knowledge of row two from matrix A and column one from matrix B. Likewise, calculating C0,2 only requires row zero from A and column two from B. The elements of matrix C don't need to know anything about any other elements in C. So, calculating the individual elements of C for a four by three result matrix can be partitioned into 12 independent tasks. This type of problem is sometimes called embarrassingly parallel, because it breaks apart so easily and doesn't require communication between each of the tasks. Now, that can turn into a lot of tasks,…

Contents