Skip to content

Commit 425bcc1

Browse files
authored
Merge pull request #4256 from ChipKerchner/fixBfloat16BitsStruct
Fix bfloat16_bits union so that it always the sizeof unsigned short for AIX.
2 parents 789cdcc + d46eba0 commit 425bcc1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/compare_sgemm_sbgemm.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3232
typedef union
3333
{
3434
unsigned short v;
35+
#if defined(_AIX)
36+
struct __attribute__((packed))
37+
#else
3538
struct
39+
#endif
3640
{
3741
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
3842
unsigned short s:1;
@@ -49,7 +53,11 @@ typedef union
4953
typedef union
5054
{
5155
float v;
56+
#if defined(_AIX)
57+
struct __attribute__((packed))
58+
#else
5259
struct
60+
#endif
5361
{
5462
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
5563
uint32_t s:1;

0 commit comments

Comments
 (0)