Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zasdfgbnm committed May 12, 2021
1 parent ab358bd commit c32ec30
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/bfloat16.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,8 @@ struct bfloat16_t
operator float() const
{
float f = 0;
uint16_t *p = reinterpret_cast<uint16_t *>(&f);
p[1] = __x;
p[0] = 0;
uint32_t *p = reinterpret_cast<uint32_t *>(&f);
*p = uint32_t(__x) << 16;
return f;
}

Expand Down

0 comments on commit c32ec30

Please sign in to comment.