Home
last modified time | relevance | path

Searched hist:be75532a3fa2c0c5f18ac8135a73a6e78724f704 (Results 1 – 2 of 2) sorted by relevance

/honee/qfunctions/
H A Dsgs_dd_utils.hbe75532a3fa2c0c5f18ac8135a73a6e78724f704 Mon Sep 18 19:03:06 UTC 2023 James Wright <james@jameswright.xyz> fluids: Use explicit array size for new_bounds

- `new_bounds` was previously changed to remove the explicit array size
declaration because Sycl's online compiler didn't like it.
- Trying to do a direct cast results in:
```
/home/jrwrigh/software/libCEED/examples/fluids/problems/../qfunctions/sgs_dd_model.h:67:39: error: used type 'const CeedScalar[6][2]' (aka 'const double[6][2]') where arithmetic or pointer type is required
const CeedScalar new_bounds[6][2] = (const CeedScalar[6][2]) & sgsdd_ctx->data[sgsdd_ctx->offsets.out_scaling];
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
- This represents the best compromise; can't do a direct pointer cast
(requiring more compiler work to be efficient and obfuscating what's
happening), but can at least keep the explicit array sizes for
`new_bounds`
H A Dsgs_dd_model.hbe75532a3fa2c0c5f18ac8135a73a6e78724f704 Mon Sep 18 19:03:06 UTC 2023 James Wright <james@jameswright.xyz> fluids: Use explicit array size for new_bounds

- `new_bounds` was previously changed to remove the explicit array size
declaration because Sycl's online compiler didn't like it.
- Trying to do a direct cast results in:
```
/home/jrwrigh/software/libCEED/examples/fluids/problems/../qfunctions/sgs_dd_model.h:67:39: error: used type 'const CeedScalar[6][2]' (aka 'const double[6][2]') where arithmetic or pointer type is required
const CeedScalar new_bounds[6][2] = (const CeedScalar[6][2]) & sgsdd_ctx->data[sgsdd_ctx->offsets.out_scaling];
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
- This represents the best compromise; can't do a direct pointer cast
(requiring more compiler work to be efficient and obfuscating what's
happening), but can at least keep the explicit array sizes for
`new_bounds`