Line data Source code
1 : // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2 : // SPDX-License-Identifier: Apache-2.0
3 :
4 : #ifndef PALACE_LIBCEED_APPLY_2_QF_H
5 : #define PALACE_LIBCEED_APPLY_2_QF_H
6 :
7 0 : CEED_QFUNCTION(f_apply_2)(void *, CeedInt Q, const CeedScalar *const *in,
8 : CeedScalar *const *out)
9 : {
10 0 : const CeedScalar *__restrict__ qd = in[0], *__restrict__ u = in[1];
11 0 : CeedScalar *__restrict__ v = out[0];
12 :
13 0 : CeedPragmaSIMD for (CeedInt i = 0; i < Q; i++)
14 : {
15 0 : const CeedScalar u0 = u[i + Q * 0];
16 0 : const CeedScalar u1 = u[i + Q * 1];
17 0 : v[i + Q * 0] = qd[i + Q * 0] * u0 + qd[i + Q * 2] * u1;
18 0 : v[i + Q * 1] = qd[i + Q * 1] * u0 + qd[i + Q * 3] * u1;
19 : }
20 0 : return 0;
21 : }
22 :
23 : #endif // PALACE_LIBCEED_APPLY_2_QF_H
|