Modify

Opened 8 years ago

Closed 8 years ago

#3177 closed Patches (invalid)

Default integer types in boost/cstdint.hpp are incorrect on XMT/MTA

Reported by: ngedmond Owned by: jewillco
Milestone: Boost 1.40.0 Component: integer
Version: Boost 1.39.0 Severity: Problem
Keywords: XMT MTA integer Cc:

Description

Integer types in boost/cstdint.hpp are not correct for Cray XMT/Tera MTA-2. The following patch works for me. I can't imagine any other compiler definines 'MTA' so this patch should be non-intrusive. Feel free to strip comments as appropriate.

Index: cstdint.hpp =================================================================== --- cstdint.hpp (revision 53635) +++ cstdint.hpp (working copy) @@ -226,6 +226,15 @@

typedef short int_fast16_t; typedef unsigned short uint_least16_t; typedef unsigned short uint_fast16_t;

+# elif (USHRT_MAX == 0xffffffff) && defined(MTA) + On MTA / XMT short is 32 bits unless the -short16 compiler flag is specified + MTA / XMT does support the following non-standard integer types + typedef short16 int16_t; + typedef short16 int_least16_t; + typedef short16 int_fast16_t; + typedef unsigned short16 uint16_t; + typedef unsigned short16 uint_least16_t; + typedef unsigned short16 uint_fast16_t;

# else # error defaults not correct; you must hand modify boost/cstdint.hpp # endif

@@ -246,6 +255,14 @@

typedef unsigned int uint32_t; typedef unsigned int uint_least32_t; typedef unsigned int uint_fast32_t;

+# elif (UINT_MAX == 0xffffffffffffffff) && defined(MTA) + Integers are 64 bits on the MTA / XMT + typedef int32 int32_t; + typedef int32 int_least32_t; + typedef int32 int_fast32_t; + typedef unsigned int32 uint32_t; + typedef unsigned int32 uint_least32_t; + typedef unsigned int32 uint_fast32_t;

# else # error defaults not correct; you must hand modify boost/cstdint.hpp # endif

Attachments (1)

MTA_integer_patch (1.5 KB) - added by ngedmond 8 years ago.

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by ngedmond

comment:1 Changed 8 years ago by jewillco

  • Owner changed from dlwalker to jewillco

comment:2 Changed 8 years ago by jewillco

  • Resolution set to invalid
  • Status changed from new to closed

Closing because this will be resubmitted as a new ticket.

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain jewillco.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.