Skip to content

Commit

Permalink
Add restrict qualifier to sig_addr
Browse files Browse the repository at this point in the history
We are adding the restricy qualifier to sig_addr data objects and
expects it to not overlap or be same as the dest or source data
objects.
  • Loading branch information
naveen-rn committed Sep 10, 2018
1 parent 76a5015 commit 94976fe
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
21 changes: 11 additions & 10 deletions content/shmem_put_signal.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
\color{Green}
\apisummary{
The put-with-signal routines provide a method for copying data from a
contiguous local data object to a data object on a specified \ac{PE}
Expand All @@ -8,26 +7,26 @@
\begin{apidefinition}

\begin{C11synopsis}
void @\FuncDecl{shmem\_put\_signal}@(TYPE *dest, const TYPE *source, size_t nelems, uint64_t *sig_addr, uint64_t signal, int pe);
void @\FuncDecl{shmem\_put\_signal}@(shmem_ctx_t ctx, TYPE *dest, const TYPE *source, size_t nelems, uint64_t *sig_addr, uint64_t signal, int pe);
void @\FuncDecl{shmem\_put\_signal}@(TYPE *dest, const TYPE *source, size_t nelems, uint64_t *restrict sig_addr, uint64_t signal, int pe);
void @\FuncDecl{shmem\_put\_signal}@(shmem_ctx_t ctx, TYPE *dest, const TYPE *source, size_t nelems, uint64_t *restrict sig_addr, uint64_t signal, int pe);
\end{C11synopsis}
where \TYPE{} is one of the standard \ac{RMA} types specified by Table \ref{stdrmatypes}.

\begin{Csynopsis}
void @\FuncDecl{shmem\_\FuncParam{TYPENAME}\_put\_signal}@(TYPE *dest, const TYPE *source, size_t nelems, uint64_t *sig_addr, uint64_t signal, int pe);
void @\FuncDecl{shmem\_ctx\_\FuncParam{TYPENAME}\_put\_signal}@(shmem_ctx_t ctx, TYPE *dest, const TYPE *source, size_t nelems, uint64_t *sig_addr, uint64_t signal, int pe);
void @\FuncDecl{shmem\_\FuncParam{TYPENAME}\_put\_signal}@(TYPE *dest, const TYPE *source, size_t nelems, uint64_t *restrict sig_addr, uint64_t signal, int pe);
void @\FuncDecl{shmem\_ctx\_\FuncParam{TYPENAME}\_put\_signal}@(shmem_ctx_t ctx, TYPE *dest, const TYPE *source, size_t nelems, uint64_t *restrict sig_addr, uint64_t signal, int pe);
\end{Csynopsis}
where \TYPE{} is one of the standard \ac{RMA} types and has a corresponding \TYPENAME{} specified by Table \ref{stdrmatypes}.

\begin{CsynopsisCol}
void @\FuncDecl{shmem\_put\FuncParam{SIZE}\_signal}@(void *dest, const void *source, size_t nelems, uint64_t *sig_addr, uint64_t signal, int pe);
void @\FuncDecl{shmem\_ctx\_put\FuncParam{SIZE}\_signal}@(shmem_ctx_t ctx, void *dest, const void *source, size_t nelems, uint64_t *sig_addr, uint64_t signal, int pe);
void @\FuncDecl{shmem\_put\FuncParam{SIZE}\_signal}@(void *dest, const void *source, size_t nelems, uint64_t *restrict sig_addr, uint64_t signal, int pe);
void @\FuncDecl{shmem\_ctx\_put\FuncParam{SIZE}\_signal}@(shmem_ctx_t ctx, void *dest, const void *source, size_t nelems, uint64_t *restrict sig_addr, uint64_t signal, int pe);
\end{CsynopsisCol}
where \SIZE{} is one of \CONST{8, 16, 32, 64, 128}.

\begin{CsynopsisCol}
void @\FuncDecl{shmem\_putmem\_signal}@(void *dest, const void *source, size_t nelems, uint64_t *sig_addr, uint64_t signal, int pe);
void @\FuncDecl{shmem\_ctx\_putmem\_signal}@(shmem_ctx_t ctx, void *dest, const void *source, size_t nelems, uint64_t *sig_addr, uint64_t signal, int pe);
void @\FuncDecl{shmem\_putmem\_signal}@(void *dest, const void *source, size_t nelems, uint64_t *restrict sig_addr, uint64_t signal, int pe);
void @\FuncDecl{shmem\_ctx\_putmem\_signal}@(shmem_ctx_t ctx, void *dest, const void *source, size_t nelems, uint64_t *restrict sig_addr, uint64_t signal, int pe);
\end{CsynopsisCol}

\begin{apiarguments}
Expand Down Expand Up @@ -64,6 +63,9 @@
for example, one could be a global/static \Cstd variable and the other could
be allocated on the symmetric heap.

The restrict qualifier in \VAR{sig\_addr} expects the data object to be
distinct from \VAR{dest} and \VAR{source} data objects.

The delivery of \signal{} flag on the remote \ac{PE} indicates only the
delivery of its corresponding \dest{} data words into the data object on
the remote \ac{PE}. Without a memory-ordering operation, there is no implied
Expand All @@ -83,4 +85,3 @@
\end{apiexamples}

\end{apidefinition}
\color{Black}
12 changes: 8 additions & 4 deletions utils/defs.tex
Original file line number Diff line number Diff line change
Expand Up @@ -407,14 +407,16 @@
\textbf{C11:}
\lstset{language={C}, backgroundcolor=\color{gray}, lineskip=2pt,
escapechar=@,
morekeywords={size_t, ptrdiff_t, TYPE, _Noreturn, shmem_ctx_t, uint64_t},
morekeywords={size_t, ptrdiff_t, TYPE, _Noreturn, shmem_ctx_t,
uint64_t, restrict},
aboveskip=0pt, belowskip=0pt}}{}

\lstnewenvironment{CsynopsisCol}
{
\lstset{language={C}, backgroundcolor=\color{gray}, lineskip=2pt,
escapechar=@,
morekeywords={size_t, ptrdiff_t, TYPE, TYPENAME, SIZE, shmem_ctx_t, uint64_t},
morekeywords={size_t, ptrdiff_t, TYPE, TYPENAME, SIZE, shmem_ctx_t,
uint64_t, restrict},
aboveskip=0pt, belowskip=0pt}}{}


Expand All @@ -423,7 +425,8 @@
\textbf{C/C++:}
\lstset{language={C}, backgroundcolor=\color{gray}, lineskip=2pt,
escapechar=@,
morekeywords={size_t, ptrdiff_t, TYPE, TYPENAME, SIZE, shmem_ctx_t, uint64_t},
morekeywords={size_t, ptrdiff_t, TYPE, TYPENAME, SIZE, shmem_ctx_t,
uint64_t, restrict},
aboveskip=0pt, belowskip=0pt}}{}

\lstnewenvironment{CsynopsisST}
Expand Down Expand Up @@ -515,7 +518,8 @@
##1
\lstinputlisting[language={C}, tabsize=2,
basicstyle=\ttfamily\footnotesize,
morekeywords={size_t, ptrdiff_t, shmem_ctx_t, uint64_t}]{##2}
morekeywords={size_t, ptrdiff_t, shmem_ctx_t,
uint64_t, restrict}]{##2}
##3 }
\newcommand{\apifexample}[3]{
##1
Expand Down

0 comments on commit 94976fe

Please sign in to comment.