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