Chunks and Tasks sample code -- Matrix sample

This example program uses a hierarchical matrix representation, where on high (non-leaf) levels in the hierarchy each submatrix refers to submatrices at the next lower level by their chunk identifiers. At the lowest level, matrix elements are stored explicitly.

The program uses several task types for creation and manipulation of such matrix chunks. In the main program, matrices A and B are first created, and then the matrix product C = A * B is computed. Finally, the result is verified by checking the values of some matrix elements in the result matrix C.

Download the source code for the matrix sample program using this link:


To compile and run the program, a Chunks and Tasks library implementation is needed. See the Library implementations page for descriptions of how to compile and run the program using the library implementations available there.