Merge pull request #25467 from fengyuentau:drop_half_members

5.x core: sync changes that drop some member functions in class hfloat
pull/25420/head
Alexander Smorkalov 11 months ago committed by GitHub
commit ac37f337d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 28
      modules/core/include/opencv2/core/cvdef.h

@ -822,26 +822,6 @@ public:
hfloat() : h(0) {}
explicit hfloat(float x) { h = (__fp16)x; }
operator float() const { return (float)h; }
static hfloat fromBits(ushort w)
{
Cv16suf u;
u.u = w;
hfloat result;
result.h = u.h;
return result;
}
static hfloat zero()
{
hfloat result;
result.h = (__fp16)0;
return result;
}
ushort bits() const
{
Cv16suf u;
u.h = h;
return u.u;
}
protected:
__fp16 h;
@ -898,14 +878,6 @@ protected:
#endif
}
static hfloat zero()
{
hfloat result;
result.w = (ushort)0;
return result;
}
ushort bits() const { return w; }
protected:
ushort w;

Loading…
Cancel
Save