Skip to content

Commit f75f425

Browse files
committed
Rewrites pointer-to-array in t507 to be compatible with OCCA.
1 parent df482e8 commit f75f425

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/t507-operator.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ CEED_QFUNCTION(setup)(void *ctx, const CeedInt Q, const CeedScalar *const *in, C
1818
}
1919

2020
CEED_QFUNCTION(mass)(void *ctx, const CeedInt Q, const CeedScalar *const *in, CeedScalar *const *out) {
21-
const CeedScalar *rho = in[0], (*u)[CEED_Q_VLA] = (const CeedScalar(*)[CEED_Q_VLA])in[1];
22-
CeedScalar(*v)[CEED_Q_VLA] = (CeedScalar(*)[CEED_Q_VLA])out[0];
21+
const CeedScalar *rho = in[0];
22+
typedef CeedScalar vec_t[CEED_Q_VLA];
23+
const vec_t* u = (const vec_t*) in[1];
24+
25+
vec_t* v = (vec_t*) out[0];
2326

2427
for (CeedInt i = 0; i < Q; i++) {
2528
v[0][i] = rho[i] * u[0][i];

0 commit comments

Comments
 (0)