The upc_all_scatter function

Synopsis

    
    #include <upc.h>
    #include <upc_collective.h>
    void upc_all_scatter(shared void * restrict dst, 
                         shared const void * restrict src, 
                         size_t nbytes, 
                         upc_flag_t flags);
               

Description

The upc_all_scatter function copies the ith block of an area of shared memory with affinity to a single thread to a block of shared memory with affinity to the ith thread. The number of bytes in each block is nbytes.

nbytes must be strictly greater than 0.

The upc_all_scatter function treats the src pointer as if it pointed to a shared memory area with the type:

    shared [] char[nbytes * THREADS]
 

and it treats the dst pointer as if it pointed to a shared memory area with the type:

    shared [nbytes] char[nbytes * THREADS]

The target of the dst pointer must have affinity to thread 0.

The dst pointer is treated as if it has phase 0.

For each thread i, the effect is equivalent to copying the ith block of nbytes bytes pointed to by src to the block of nbytes bytes pointed to by dst that has affinity to thread i.

 

 

Terms, definitions, and symbols

Back to index of all UPC functions