MCPcopy Create free account
hub / github.com/apache/singa / operator+

Method operator+

include/half.hpp:1858–1866  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1856 /// \param b second operand
1857 /// \return \a a + \a b
1858 friend f31 operator+(f31 a, f31 b)
1859 {
1860 if(b.exp > a.exp)
1861 std::swap(a, b);
1862 int d = a.exp - b.exp;
1863 uint32 m = a.m + ((d<32) ? (b.m>>d) : 0);
1864 int i = (m&0xFFFFFFFF) < a.m;
1865 return f31(((m+i)>>i)|0x80000000, a.exp+i);
1866 }
1867
1868 /// Subtraction operator.
1869 /// \param a first operand

Callers

nothing calls this directly

Calls 1

f31Class · 0.85

Tested by

no test coverage detected