PGAS Programming with UPC and Fortran Coarrays
PGAS Programming with UPC and Fortran Coarrays
PGAS Programming with UPC and Fortran Coarrays
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Non-collective dynamic allocation (2)shared [N] int *ptr;ptr = (shared [N] int *) upc_global_alloc(THREADS, N*sizeof(int));N N NN N NNNNShared Memory SpacePrivate Memory Spacep1p1p1<strong>UPC</strong> 15Collective dynamic allocationallocate contiguous segments of shared memoryshared [N] int *ptr;ptr = (shared [N] int *)upc_all_alloc(THREADS, N*sizeof(int));NNNShared Memory SpacePrivate Memory Spacep1p1p1<strong>UPC</strong> 16–8