Skip to content

Commit 550a71a

Browse files
authored
Merge pull request #571 from lanl/jmm/warning
SetRhoPMin shouldn't be a host device function
2 parents 39a3909 + 97de101 commit 550a71a

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

singularity-eos/closure/mixed_cell_models.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,12 @@ struct IdentityOperator {
222222
};
223223
template <typename Data_t, typename Operator_t = IdentityOperator>
224224
PORTABLE_FORCEINLINE_FUNCTION Real
225-
sum_neumaier(Data_t &&data, std::size_t n, std::size_t offset = 0, std::size_t iskip = -1,
225+
sum_neumaier(Data_t &&data, std::size_t n, std::size_t offset = 0, int iskip = -1,
226226
const Operator_t &op = IdentityOperator()) {
227227
Real sum = 0;
228228
Real c = 0; // correction
229229
for (std::size_t i = 0; i < n; ++i) {
230-
if (i == iskip) continue;
230+
if (iskip >= 0 && i == static_cast<std::size_t>(iskip)) continue;
231231
Real x = op(data[i + offset]);
232232
Real t = sum + x;
233233
if (std::abs(sum) >= std::abs(x)) {

singularity-eos/eos/eos_spiner_common.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,8 @@ PORTABLE_FORCEINLINE_FUNCTION Real from_log(const Real lx, const Real offset) {
5353
return FastMath::pow10(lx) - offset;
5454
}
5555

56-
PORTABLE_INLINE_FUNCTION Real SetRhoPMin(DataBox &P, DataBox &rho_at_pmin,
57-
const bool pmin_vapor_dome,
58-
const Real VAPOR_DPDR_THRESH,
59-
const Real lRhoOffset) {
56+
inline Real SetRhoPMin(DataBox &P, DataBox &rho_at_pmin, const bool pmin_vapor_dome,
57+
const Real VAPOR_DPDR_THRESH, const Real lRhoOffset) {
6058
Real PMin = std::numeric_limits<Real>::max();
6159
const auto lTs = P.range(0);
6260
const auto lRs = P.range(1);

0 commit comments

Comments
 (0)