Skip to content

Commit 2ea37df

Browse files
committed
Cleaning for Warnings & Core Guidelines
1 parent 888c531 commit 2ea37df

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Src/Base/AMReX_SIMD.H

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ namespace amrex::simd
8888
template <typename T>
8989
struct where_expression {
9090
bool mask;
91-
T& value;
91+
T* value;
9292

9393
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
9494
void operator= (T const& new_val)
9595
{
96-
if (mask) { value = new_val; }
96+
if (mask) { *value = new_val; }
9797
}
9898
};
9999
}
@@ -118,7 +118,7 @@ namespace amrex::simd
118118
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
119119
detail::where_expression<T> where (bool const mask, T& value)
120120
{
121-
return {mask, value};
121+
return {mask, &value};
122122
}
123123

124124
/** Vectorized ternary operator (scalar fallback for simd select)

0 commit comments

Comments
 (0)