## `MYTHREAD` keyword

#### Description

`MYTHREAD` is an expression with a value of type int; it specifies the unique thread index.
The range of possible values is `0..THREADS-16`.

#### Example

The following program prints the numbers 0 through `THREADS-1`, in some order.

        #include <upc.h>
        main(){
          printf("%d ",MYTHREAD);
        }

See also `THREADS`,

Terms, definitions, and symbols

Back to index of all UPC functions