// ================================================================================================= // This file is part of the CodeVault project. The project is licensed under Apache Version 2.0. // CodeVault is part of the EU-project PRACE-4IP (WP7.3.C). // // Author(s): // Rafal Gandecki // // This example demonstrates the use of OpenMP for matrix-matrix multiplication and // compares execution time of algorithms. // The example is set-up to perform single precision matrix-matrix multiplication. // The example takes a triple input arguments (matrix A rows, matrix A cols, matric B cols), // specifying the size of the matrices. // See [http://www.openmp.org/] for the full OpenMP documentation. // // ================================================================================================= #include #include #include #include void fill_random(float *A, const int &n, const int &m) { std::mt19937 e(static_cast(std::time(nullptr))); std::uniform_real_distribution f; for(int i=0; i