Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 //===- subzero/src/IceUtils.h - Utility functions ---------------*- C++ -*-===// | 1 //===- subzero/src/IceUtils.h - Utility functions ---------------*- C++ -*-===// |
| 2 // | 2 // |
| 3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 /// | 9 /// |
| 10 /// \file | 10 /// \file |
| 11 /// This file declares some utility functions. | 11 /// \brief Declares some utility functions. |
|
Jim Stichnoth
2015/12/01 18:41:17
Probably "defines" instead of "declares" since it'
rkotlerimgtec
2015/12/02 01:32:48
Done.
| |
| 12 /// | 12 /// |
| 13 //===----------------------------------------------------------------------===// | 13 //===----------------------------------------------------------------------===// |
| 14 | 14 |
| 15 #ifndef SUBZERO_SRC_ICEUTILS_H | 15 #ifndef SUBZERO_SRC_ICEUTILS_H |
| 16 #define SUBZERO_SRC_ICEUTILS_H | 16 #define SUBZERO_SRC_ICEUTILS_H |
| 17 | 17 |
| 18 #include <climits> | 18 #include <climits> |
| 19 #include <cmath> // std::signbit() | 19 #include <cmath> // std::signbit() |
| 20 | 20 |
| 21 namespace Ice { | 21 namespace Ice { |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 123 template <typename T> static bool isPositiveZero(T Val) { | 123 template <typename T> static bool isPositiveZero(T Val) { |
| 124 static_assert(std::is_floating_point<T>::value, | 124 static_assert(std::is_floating_point<T>::value, |
| 125 "Input type must be floating point"); | 125 "Input type must be floating point"); |
| 126 return Val == 0 && !std::signbit(Val); | 126 return Val == 0 && !std::signbit(Val); |
| 127 } | 127 } |
| 128 }; | 128 }; |
| 129 | 129 |
| 130 } // end of namespace Ice | 130 } // end of namespace Ice |
| 131 | 131 |
| 132 #endif // SUBZERO_SRC_ICEUTILS_H | 132 #endif // SUBZERO_SRC_ICEUTILS_H |
| OLD | NEW |