FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
component_copy_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/component_copy.hpp>
9
10FEAT_DISABLE_WARNINGS
11#include <mkl.h>
12FEAT_RESTORE_WARNINGS
13
14using namespace FEAT;
15using namespace FEAT::LAFEM;
16using namespace FEAT::LAFEM::Arch;
17
18void ComponentCopy::value_mkl(float * r, const float * const x, const int stride, const int block, const Index size)
19{
20 cblas_scopy(static_cast<MKL_INT>(size), x, 1, &r[block], static_cast<MKL_INT>(stride));
21}
22
23void ComponentCopy::value_mkl(double * r, const double * const x, const int stride, const int block, const Index size)
24{
25 cblas_dcopy(static_cast<MKL_INT>(size), x, 1, &r[block], static_cast<MKL_INT>(stride));
26}
27
28void ComponentCopy::value_to_mkl(const float * const r, float * x, const int stride, const int block, const Index size)
29{
30 cblas_scopy(static_cast<MKL_INT>(size), &r[block], static_cast<MKL_INT>(stride), x, 1);
31}
32
33void ComponentCopy::value_to_mkl(const double * const r, double * x, const int stride, const int block, const Index size)
34{
35 cblas_dcopy(static_cast<MKL_INT>(size), &r[block], static_cast<MKL_INT>(stride), x, 1);
36}
FEAT Kernel base header.
LAFEM namespace.
Definition: apply.hpp:22
FEAT namespace.
Definition: adjactor.hpp:12
std::uint64_t Index
Index data type.