Skip to content

Implementation Decisions

Phillip Allen Lane edited this page May 19, 2026 · 2 revisions

Fundamental Integer Types

For fundamental integer types, Castor implements the LP64 data model. Below is a list of fundamental integer types, their bit widths, their corresponding sizeof, and their range:

Integer Type Bit Width sizeof Range
char 8 1 -128 to 127
short int 16 2 -32768 to 32767
int 32 4 -2147483648 to 2147483647
long int 64 8 -9223372036854775808 to 9223372036854775807
long long int 64 8 -9223372036854775808 to 9223372036854775807
signed char 8 1 -128 to 127
signed short int 16 2 -32768 to 32767
signed int 32 4 -2147483648 to 2147483647
signed long int 64 8 -9223372036854775808 to 9223372036854775807
signed long long int 64 8 -9223372036854775808 to 9223372036854775807
unsigned char 8 1 0 to 255
unsigned short int 16 2 0 to 65535
unsigned int 32 4 0 to 4294967295
unsigned long int 64 8 0 to 18446744073709551615
unsigned long long int 64 8 0 to 18446744073709551615
wchar_t 8 1 0 to 255
char16_t 16 2 0 to 65535
char32_t 32 4 0 to 4294967295

Pointer Types

Pointer types have been implemented as unbounded, unsigned integers. This decision was made to eliminate problems with pointer overflow and out-of-memory issues in the underlying theory.

Header Types

Castor-defined replacements for system headers will occasionally define new data types. Below is a list of these data types, as well as the primitive type they alias:

Header Type Aliased Type
ptrdiff_t long long int
size_t unsigned long long int
nullptr_t decltype(nullptr)
int8_t char
int16_t short int
int32_t int
int64_t long long int
int_fast8_t int8_t
int_fast16_t int16_t
int_fast32_t int32_t
int_fast64_t int64_t
int_least8_t int8_t
int_least16_t int16_t
int_least32_t int32_t
int_least64_t int64_t
intmax_t int64_t
intptr_t int64_t
uint8_t unsigned char
uint16_t unsigned short int
uint32_t unsigned int
uint64_t unsigned long long int
uint_fast8_t uint8_t
uint_fast16_t uint16_t
uint_fast32_t uint32_t
uint_fast64_t uint64_t
uint_least8_t uint8_t
uint_least16_t uint16_t
uint_least32_t uint32_t
uint_least64_t uint64_t
uintmax_t uint64_t
uintptr_t uint64_t

Evaluation order

Function parameters are evaluated right-to-left. In the case of a member function call expression.foo(...), expression is evaluated before any of the parameters. Therefore, per the C++ standard, expression.foo(args1...).bar(args2...) evaluates expression first, then args1 right-to-left, then foo, then args2 right-to-left, then bar.

Release

This software manual is released as LLNL-SM-2018190.

Clone this wiki locally