Add size_t, ptrdiff_t, and [u]intptr_t types.

This commit is contained in:
Matt Pharr
2012-04-11 05:32:53 -07:00
parent 2aa61007c6
commit 70a5348f43
3 changed files with 50 additions and 2 deletions

View File

@@ -1394,8 +1394,8 @@ Types
Basic Types and Type Qualifiers
-------------------------------
``ispc`` is a statically-typed language. It supports a variety of basic
types.
``ispc`` is a statically-typed language. It supports a variety of core
basic types:
* ``void``: "empty" type representing no value.
* ``bool``: boolean value; may be assigned ``true``, ``false``, or the
@@ -1412,6 +1412,15 @@ types.
* ``unsigned int64``: 64-bit unsigned integer.
* ``double``: 64-bit double-precision floating point value.
There are also a few built-in types related to pointers and memory:
* ``size_t``: the maximum size of any object (structure or array)
* ``ptrdiff_t``: an integer type large enough to represent the difference
between two pointers
* ``intptr_t``: signed integer type that is large enough to represent
a pointer value
* ``uintptr_t``: unsigned integer type large enough to represent a pointer
Implicit type conversion between values of different types is done
automatically by the ``ispc`` compiler. Thus, a value of ``float`` type
can be assigned to a variable of ``int`` type directly. In binary