FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
product_matmat_mkl.cpp
1// FEAT3: Finite Element Analysis Toolbox, Version 3
2// Copyright (C) 2010 by Stefan Turek & the FEAT group
3// FEAT3 is released under the GNU General Public License version 3,
4// see the file 'copyright.txt' in the top level directory for details.
5
6// includes, FEAT
9#include <kernel/lafem/arch/product_matmat.hpp>
10
11#include <mkl_blas.h>
12
13using namespace FEAT;
14using namespace FEAT::LAFEM;
15using namespace FEAT::LAFEM::Arch;
16
17void ProductMatMat::dense_mkl(float * r, const float alpha, const float beta, const float * const x, const float * const y, const float * const z, const Index rows, const Index columns, const Index inner)
18{
19 XASSERT(r == z);
20 MKL_INT mrows = (MKL_INT)rows;
21 MKL_INT mcolumns = (MKL_INT)columns;
22 MKL_INT minner = (MKL_INT)inner;
23 char trans = 'N';
24 sgemm(&trans, &trans, &mcolumns, &mrows, &minner, &alpha, y, &mcolumns, x, &minner, &beta, r, &mcolumns);
25}
26
27void ProductMatMat::dense_mkl(double * r, const double alpha, const double beta, const double * const x, const double * const y, const double * const z, const Index rows, const Index columns, const Index inner)
28{
29 XASSERT(r == z);
30 MKL_INT mrows = (MKL_INT)rows;
31 MKL_INT mcolumns = (MKL_INT)columns;
32 MKL_INT minner = (MKL_INT)inner;
33 char trans = 'N';
34 dgemm(&trans, &trans, &mcolumns, &mrows, &minner, &alpha, y, &mcolumns, x, &minner, &beta, r, &mcolumns);
35}
#define XASSERT(expr)
Assertion macro definition.
Definition: assertion.hpp:262
FEAT Kernel base header.
LAFEM namespace.
Definition: apply.hpp:22
FEAT namespace.
Definition: adjactor.hpp:12
std::uint64_t Index
Index data type.