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_HCURL_22_QF_H
5 : #define PALACE_LIBCEED_HCURL_22_QF_H
6 :
7 : #include "../coeff/coeff_2_qf.h"
8 : #include "utils_22_qf.h"
9 :
10 26025 : CEED_QFUNCTION(f_apply_hcurl_22)(void *__restrict__ ctx, CeedInt Q,
11 : const CeedScalar *const *in, CeedScalar *const *out)
12 : {
13 26025 : const CeedScalar *attr = in[0], *wdetJ = in[0] + Q, *adjJt = in[0] + 2 * Q, *u = in[1];
14 26025 : CeedScalar *v = out[0];
15 :
16 1808809 : CeedPragmaSIMD for (CeedInt i = 0; i < Q; i++)
17 : {
18 1782784 : const CeedScalar u_loc[2] = {u[i + Q * 0], u[i + Q * 1]};
19 : CeedScalar coeff[4], adjJt_loc[4], v_loc[2];
20 1782784 : CoeffUnpack2((const CeedIntScalar *)ctx, (CeedInt)attr[i], coeff);
21 1782784 : MatUnpack22(adjJt + i, Q, adjJt_loc);
22 : MultAtBCx22(adjJt_loc, coeff, adjJt_loc, u_loc, v_loc);
23 :
24 1782784 : v[i + Q * 0] = wdetJ[i] * v_loc[0];
25 1782784 : v[i + Q * 1] = wdetJ[i] * v_loc[1];
26 : }
27 26025 : return 0;
28 : }
29 :
30 : #endif // PALACE_LIBCEED_HCURL_22_QF_H
|