mm_blas.cpp 592 Bytes
Newer Older
Ignacio Labarca Figueroa's avatar
Ignacio Labarca Figueroa committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
/*
 * Programming Techniques for Scientific Simulations I
 * HS 2020
 * Exercise 10
 */

#include "matrix_multiplication.hpp"

extern "C" void dgemm_(
	char   const & TRANSA,
	char   const & TRANSB,
	int    const & M,
	int    const & N,
	int    const & K,
	double const & alpha,
	double const * A,
	int    const & LDA,
	double const * B,
	int    const & LDB,
	double const & beta,
	double       * C,
	int    const & LDC
);

void mm_blas(matrix_t const & A, matrix_t const & B, matrix_t & C, std::size_t N) noexcept {
	dgemm_('N', 'N', N, N, N, 1, A.data(), N, B.data(), N, 0, C.data(), N);
}