FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
transpose_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
8#include <kernel/lafem/arch/transpose.hpp>
9
10#include <cstring>
11FEAT_DISABLE_WARNINGS
12#include <mkl.h>
13FEAT_RESTORE_WARNINGS
14
15using namespace FEAT;
16using namespace FEAT::LAFEM;
17using namespace FEAT::LAFEM::Arch;
18
19void Transpose::value_mkl(float * r, const float * const x, const Index rows_x, const Index columns_x)
20{
21 if (r != x)
22 {
23 mkl_somatcopy('R', 'T', rows_x, columns_x, float(1), x, columns_x, r, rows_x);
24 }
25 else
26 {
27 mkl_simatcopy('R', 'T', rows_x, columns_x, float(1), r, columns_x, rows_x);
28 }
29}
30
31void Transpose::value_mkl(double * r, const double * const x, const Index rows_x, const Index columns_x)
32{
33 if (r != x)
34 {
35 mkl_domatcopy('R', 'T', rows_x, columns_x, double(1), x, columns_x, r, rows_x);
36 }
37 else
38 {
39 mkl_dimatcopy('R', 'T', rows_x, columns_x, double(1), r, columns_x, rows_x);
40 }
41}
FEAT Kernel base header.
LAFEM namespace.
Definition: apply.hpp:22
FEAT namespace.
Definition: adjactor.hpp:12
std::uint64_t Index
Index data type.