From 2bacebb1fb792fa04fd99e65033e24453527f62f Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Wed, 11 Jul 2012 19:51:28 -0700 Subject: [PATCH] Doc fixes (Crystal Lemire). --- docs/ispc.rst | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/docs/ispc.rst b/docs/ispc.rst index 7e671dbd..f1f959c9 100644 --- a/docs/ispc.rst +++ b/docs/ispc.rst @@ -2084,7 +2084,7 @@ can be declared: soa<8> Point pts[...]; -The in-memory layout of the ``Point``s has had the SOA transformation +The in-memory layout of the ``Point`` instances has had the SOA transformation applied, such that there are 8 ``x`` values in memory followed by 8 ``y`` values, and so forth. Here is the effective declaration of ``soa<8> Point``: @@ -2266,7 +2266,7 @@ based on C++'s ``new`` and ``delete`` operators: // use ptr... delete[] ptr; -In the above code, each program instance allocates its own ``count`-sized +In the above code, each program instance allocates its own ``count`` sized array of ``uniform int`` values, uses that memory, and then deallocates that memory. Uses of ``new`` and ``delete`` in ``ispc`` programs are serviced by corresponding calls the system C library's ``malloc()`` and @@ -2277,9 +2277,7 @@ analogous to the corresponding rules are for pointers (as described in `Pointer Types`_.) Specifically, if a specific rate qualifier isn't provided with the ``new`` expression, then the default is that a "varying" ``new`` is performed, where each program instance performs a unique -allocation. The allocated type, in turn, is by default ``uniform`` for -``varying`` ``new`` expressions, and ``varying`` for ``uniform`` new -expressions. +allocation. The allocated type, in turn, is by default ``uniform``. After a pointer has been deleted, it is illegal to access the memory it points to. However, that deletion happens on a per-program-instance basis. @@ -3491,7 +3489,7 @@ generates the following output on a four-wide compilation target: :: i = 10, x = [0.000000,1.000000,2.000000,3.000000] - added to x = [1.000000,2.000000,((2.000000)),((3.000000)] + added to x = [1.000000,2.000000,((2.000000)),((3.000000))] last print of x = [1.000000,2.000000,2.000000,3.000000] When a varying variable is printed, the values for program instances that @@ -4010,8 +4008,8 @@ Systems Programming Support Atomic Operations and Memory Fences ----------------------------------- -The standard range of atomic memory operations are provided by the standard -library``ispc``, including variants to handle both uniform and varying +The standard set of atomic memory operations are provided by the standard +library, including variants to handle both uniform and varying types as well as "local" and "global" atomics. Local atomics provide atomic behavior across the program instances in a