FEAT
3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
component_product_dense_generic.hpp
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
#pragma once
7
8
#ifndef KERNEL_LAFEM_ARCH_COMPONENT_PRODUCT_DENSE_HPP
9
#error "Do not include this implementation-only header file directly!"
10
#endif
11
12
namespace
FEAT::LAFEM::Arch
13
{
14
template
<
typename
DT_>
15
void
ComponentProductDense::exec_generic_impl(DT_ * r,
const
DT_ *
const
x,
const
DT_ *
const
y,
const
Index
size)
16
{
17
if
(r == x && r == y)
18
{
19
FEAT_PRAGMA_OMP(parallel
for
)
20
for
(
Index
i = 0 ; i < size ; ++i)
21
{
22
r[i] *= r[i];
23
}
24
}
25
else
if
(r == x)
26
{
27
FEAT_PRAGMA_OMP(parallel
for
)
28
for
(
Index
i = 0 ; i < size ; ++i)
29
{
30
r[i] *= y[i];
31
}
32
}
33
else
if
(r == y)
34
{
35
FEAT_PRAGMA_OMP(parallel
for
)
36
for
(
Index
i = 0 ; i < size ; ++i)
37
{
38
r[i] *= x[i];
39
}
40
}
41
else
42
{
43
FEAT_PRAGMA_OMP(parallel
for
)
44
for
(
Index
i = 0 ; i < size ; ++i)
45
{
46
r[i] = x[i] * y[i];
47
}
48
}
49
}
50
}
// namespace FEAT::LAFEM::Arch
FEAT::Index
std::uint64_t Index
Index data type.
Definition:
base_header.hpp:130
kernel
lafem
arch
component_product_dense_generic.hpp
Generated by
1.9.5