Fix OpenVINO 2022.3.0 Chrome OS compilation (#15475)

This patch fixes two issues:
 * Typo in clang pragma directive
 * Reverse the order of the arguments in OPENVINO_ASSERT() in
   constant.hpp so this assert works for ov::bfloat16 and
   ov::float16 types which have impelemented binary comparison
   operators as the memeber functions
This commit is contained in:
Dalibor Segan 2023-02-03 01:29:26 -08:00 committed by GitHub
parent fd33cc3b49
commit eff35123de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -521,13 +521,13 @@ private:
if (!std::is_same<T, StorageDataType>::value) {
OPENVINO_ASSERT(!std::numeric_limits<T>::is_signed ||
std::numeric_limits<StorageDataType>::lowest() <= value);
OPENVINO_ASSERT(value <= std::numeric_limits<StorageDataType>::max());
OPENVINO_ASSERT(std::numeric_limits<StorageDataType>::max() >= value);
}
#if defined(_MSC_VER)
# pragma warning(pop)
#endif
#ifdef __clang__
# pragma GangC diagnostic pop
# pragma clang diagnostic pop
#endif
#ifdef __GNUC__
# pragma GCC diagnostic pop