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_COEFF_2_QF_H
5 : #define PALACE_LIBCEED_COEFF_2_QF_H
6 :
7 : #include "coeff_qf.h"
8 :
9 : CEED_QFUNCTION_HELPER void CoeffUnpack2(const CeedIntScalar *ctx, const CeedInt attr,
10 : CeedScalar coeff[4])
11 : {
12 4613592 : const CeedInt k = (NumAttr(ctx) > 0) ? AttrMat(ctx)[attr - 1].first : 0;
13 : const CeedIntScalar *mat_coeff = MatCoeff(ctx);
14 4613592 : coeff[0] = mat_coeff[4 * k + 0].second;
15 4613592 : coeff[1] = mat_coeff[4 * k + 1].second;
16 4613592 : coeff[2] = mat_coeff[4 * k + 2].second;
17 4613592 : coeff[3] = mat_coeff[4 * k + 3].second;
18 : }
19 :
20 : #endif // PALACE_LIBCEED_COEFF_2_QF_H
|