From cf01d5eb41d3b5a9db104bf045da80c02a3cd0b5 Mon Sep 17 00:00:00 2001 From: David Ozog Date: Thu, 11 Jul 2024 15:45:13 -0400 Subject: [PATCH] clarify mem-managment routines as world-collective --- content/backmatter.tex | 6 ++++++ content/shmem_align.tex | 3 ++- content/shmem_free.tex | 3 ++- content/shmem_malloc.tex | 3 ++- content/shmem_malloc_hints.tex | 3 ++- content/shmem_realloc.tex | 3 ++- 6 files changed, 16 insertions(+), 5 deletions(-) diff --git a/content/backmatter.tex b/content/backmatter.tex index 7e6f4a7d..ec95c891 100644 --- a/content/backmatter.tex +++ b/content/backmatter.tex @@ -697,6 +697,12 @@ \section{Version 1.6} functions from a single entry in \openshmem[1.5] into separate entries. \ChangelogRef{subsec:shmem_malloc, subsec:shmem_free, subsec:shmem_realloc, subsec:shmem_align}% +% +\item Clarified that the \FUNC{shmem\_\{malloc, free, realloc, align, + malloc\_with\_hints, calloc\}} functions are collective operations on + the world team. +\ChangelogRef{subsec:shmem_malloc, subsec:shmem_free, subsec:shmem_realloc, + subsec:shmem_align, subsec:shmmallochint, subsec:shmem_calloc}% \item Corrected the level argument's recommended value in API notes for \FUNC{shmem\_pcontrol} to indicate that the value should be greater than 2 to enable profiling with profile library defined effects and diff --git a/content/shmem_align.tex b/content/shmem_align.tex index f054f66c..0cd97308 100644 --- a/content/shmem_align.tex +++ b/content/shmem_align.tex @@ -17,7 +17,8 @@ \apidescription{ - The \FUNC{shmem\_align} routine allocates a block in the symmetric + The \FUNC{shmem\_align} routine is a collective operation on the + world team that allocates a block in the symmetric heap that has a byte alignment specified by the \VAR{alignment} argument. The value of \VAR{alignment} shall be a multiple of \CONST{sizeof(void *)} that is also a power of two; otherwise, the diff --git a/content/shmem_free.tex b/content/shmem_free.tex index 6d70228a..d37b8495 100644 --- a/content/shmem_free.tex +++ b/content/shmem_free.tex @@ -13,7 +13,8 @@ \end{apiarguments} \apidescription{ - The \FUNC{shmem\_free} routine causes the block to which \VAR{ptr} + The \FUNC{shmem\_free} routine is a collective operation on the + world team that causes the block to which \VAR{ptr} points to be deallocated, that is, made available for further allocation. If \VAR{ptr} is a null pointer, no action is performed; otherwise, \FUNC{shmem\_free} calls a barrier on entry. diff --git a/content/shmem_malloc.tex b/content/shmem_malloc.tex index c7ef30c0..6b0b176f 100644 --- a/content/shmem_malloc.tex +++ b/content/shmem_malloc.tex @@ -15,7 +15,8 @@ \apidescription{ - The \FUNC{shmem\_malloc} routine returns the symmetric address of a + The \FUNC{shmem\_malloc} routine is a collective operation on the + world team and returns the symmetric address of a block of at least \VAR{size} bytes, which shall be suitably aligned so that it may be assigned to a pointer to any type of object. This space is allocated from the symmetric heap (in contrast to diff --git a/content/shmem_malloc_hints.tex b/content/shmem_malloc_hints.tex index f840cb85..f63da3bf 100644 --- a/content/shmem_malloc_hints.tex +++ b/content/shmem_malloc_hints.tex @@ -18,7 +18,8 @@ \apidescription{ - The \FUNC{shmem\_malloc\_with\_hints} routine, like \FUNC{shmem\_malloc}, returns a pointer to a block of at least + The \FUNC{shmem\_malloc\_with\_hints} routine, like \FUNC{shmem\_malloc}, + is a collective operation on the world team that returns a pointer to a block of at least \VAR{size} bytes, which shall be suitably aligned so that it may be assigned to a pointer to any type of object. This space is allocated from the symmetric heap (similar to \FUNC{shmem\_malloc}). When the \VAR{size} is zero, diff --git a/content/shmem_realloc.tex b/content/shmem_realloc.tex index b061f0ac..388e7bb2 100644 --- a/content/shmem_realloc.tex +++ b/content/shmem_realloc.tex @@ -16,7 +16,8 @@ \apidescription{ - The \FUNC{shmem\_realloc} routine changes the size of the block to + The \FUNC{shmem\_realloc} routine is a collective operation on + the world team that changes the size of the block to which \VAR{ptr} points to the size (in bytes) specified by \VAR{size}. The contents of the block are unchanged up to the lesser of the new and old sizes.