forked from OSchip/llvm-project
[flang] Use std::clamp (NFC)
The use of std::clamp here is safe because the definition of largestLDKind gurantees that 8 <= largestLDKind.
This commit is contained in:
parent
f119a2483d
commit
6ba2c28dee
|
@ -629,8 +629,8 @@ public:
|
||||||
8
|
8
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
using AccumType = CppTypeFor<TypeCategory::Real,
|
using AccumType =
|
||||||
std::max(std::min(largestLDKind, KIND), 8)>;
|
CppTypeFor<TypeCategory::Real, std::clamp(KIND, 8, largestLDKind)>;
|
||||||
explicit Norm2Accumulator(const Descriptor &array) : array_{array} {}
|
explicit Norm2Accumulator(const Descriptor &array) : array_{array} {}
|
||||||
void Reinitialize() { max_ = sum_ = 0; }
|
void Reinitialize() { max_ = sum_ = 0; }
|
||||||
template <typename A> void GetResult(A *p, int /*zeroBasedDim*/ = -1) const {
|
template <typename A> void GetResult(A *p, int /*zeroBasedDim*/ = -1) const {
|
||||||
|
|
Loading…
Reference in New Issue