cray_upc_shared_cast

Date:

04-02-2014

NAME

cray_upc_shared_cast - Create a pointer-to-shared from a pointer-to-local.

SYNOPSIS

#include <upc_cray.h>

shared void *cray_upc_shared_cast( void * );

IMPLEMENTATION

Cray Linux Environment (CLE)

DESCRIPTION

The cray_upc_shared_cast() function takes a pointer to a local object as an argument and returns a pointer to a shared object, with phase 0.

On the Cray Gemini and Aries networks, provides the inverse functionality of upc_cast(3c). Calling cray_upc_shared_cast on the non-NULL result of upc_cast will return the original pointer-to-shared argument to upc_cast, with the phase reset to 0. On other networks this is not guaranteed.

RETURN VALUE

If the target of the pointer-to-local argument is a shared object, returns a generic pointer-to-shared with phase 0. Otherwise, a generic pointer-to-shared that permits shared access to a local object is returned, as if the target was an indefinitely blocked shared object. If unable to create such a pointer, possibly due to resource constraints, returns a NULL pointer-to-shared.

SEE ALSO

upc_cast(3c)