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

Function operator-

src/backend/common/half.hpp:1076–1086  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1074 friend AF_CONSTEXPR __DH__ inline bool isnan(half val) noexcept;
1075
1076 AF_CONSTEXPR __DH__ arrayfire::common::half operator-() const {
1077#if __CUDA_ARCH__ >= 530
1078 return arrayfire::common::half(__hneg(data_));
1079#elif defined(__CUDA_ARCH__)
1080 return arrayfire::common::half(-(__half2float(data_)));
1081#elif defined(AF_ONEAPI)
1082 return arrayfire::common::half(-data_);
1083#else
1084 return arrayfire::common::half(internal::binary, data_ ^ 0x8000);
1085#endif
1086 }
1087
1088 AF_CONSTEXPR __DH__ arrayfire::common::half operator+() const {
1089 return *this;

Callers

nothing calls this directly

Calls 1

halfClass · 0.70

Tested by

no test coverage detected