Skip to content

Commit

Permalink
ensure that floating point numbers are used
Browse files Browse the repository at this point in the history
  • Loading branch information
lucafedeli88 committed Jan 16, 2024
1 parent 74a3bcf commit 74cd264
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Src/Base/AMReX_Algorithm.H
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ namespace amrex
#endif
}

template<typename ItType, typename ValType>
template<typename ItType, typename ValType,
typename std::enable_if<std::is_floating_point<typename ItType::value_type>::value,int>::type = 0,
typename std::enable_if<std::is_floating_point<ValType>::value,int>::type = 0>
AMREX_GPU_HOST_DEVICE
void linspace (ItType first, const ItType& last, const ValType& start, const ValType& stop)
{
Expand Down

0 comments on commit 74cd264

Please sign in to comment.