Skip to content

Commit

Permalink
Merge pull request #4256 from ChipKerchner/fixBfloat16BitsStruct
Browse files Browse the repository at this point in the history
Fix bfloat16_bits union so that it always the sizeof unsigned short for AIX.
  • Loading branch information
martin-frbg authored Oct 12, 2023
2 parents 789cdcc + d46eba0 commit 425bcc1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/compare_sgemm_sbgemm.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
typedef union
{
unsigned short v;
#if defined(_AIX)
struct __attribute__((packed))
#else
struct
#endif
{
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
unsigned short s:1;
Expand All @@ -49,7 +53,11 @@ typedef union
typedef union
{
float v;
#if defined(_AIX)
struct __attribute__((packed))
#else
struct
#endif
{
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
uint32_t s:1;
Expand Down

0 comments on commit 425bcc1

Please sign in to comment.