upc_all_alloc

Date:

03-29-2013

NAME

upc_all_alloc - Allocates shared memory

SYNOPSIS

#include <upc.h>

shared void *upc_all_alloc(size_t nblocks, size_t nbytes);

IMPLEMENTATION

Cray Linux Environment (CLE)

DESCRIPTION

upc_all_alloc is a collective function with single-valued arguments:

nblocks

Number of blocks

nbytes

Block size It allocates shared space compatible with the following declaration:

shared [nbytes] char[nblocks * nbytes]

The function returns the same pointer value on all threads. If nblocks * nbytes is zero, the result is a null pointer-to-shared.

The dynamic lifetime of an allocated object extends from the time any thread completes the call to upc_all_alloc until any thread has deallocated the object.

SEE ALSO

upc_all_free(3c), upc_alloc(3c), upc_global_alloc(3c)