MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / operator==

Function operator==

src/backend/common/half.hpp:1105–1117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1103};
1104
1105AF_CONSTEXPR __DH__ static inline bool operator==(
1106 arrayfire::common::half lhs, arrayfire::common::half rhs) noexcept {
1107#if __CUDA_ARCH__ >= 530
1108 return __heq(lhs.data_, rhs.data_);
1109#elif defined(__CUDA_ARCH__)
1110 return __half2float(lhs.data_) == __half2float(rhs.data_);
1111#elif defined(AF_ONEAPI)
1112 return lhs.data_ == rhs.data_;
1113#else
1114 return (lhs.data_ == rhs.data_ || !((lhs.data_ | rhs.data_) & 0x7FFF)) &&
1115 !isnan(lhs);
1116#endif
1117}
1118
1119AF_CONSTEXPR __DH__ static inline bool operator!=(
1120 arrayfire::common::half lhs, arrayfire::common::half rhs) noexcept {

Callers

nothing calls this directly

Calls 1

isnanFunction · 0.70

Tested by

no test coverage detected