forked from openshmem-org/specification
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshmem_atomic_add.tex
71 lines (57 loc) · 2.15 KB
/
shmem_atomic_add.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
\apisummary{
Performs an atomic add operation on a remote symmetric data object.
}
\begin{apidefinition}
\begin{C11synopsis}
void shmem_atomic_add(TYPE *dest, TYPE value, int pe);
\end{C11synopsis}
where \TYPE{} is one of the standard \ac{AMO} types specified by
Table~\ref{stdamotypes}.
\begin{Csynopsis}
void shmem_<TYPENAME>_atomic_add(TYPE *dest, TYPE value, int pe);
\end{Csynopsis}
where \TYPE{} is one of the standard \ac{AMO} types and has a corresponding
\TYPENAME{} specified by Table~\ref{stdamotypes}.
\begin{Fsynopsis}
INTEGER pe
INTEGER*4 value_i4
CALL SHMEM_INT4_ADD(dest, value_i4, pe)
INTEGER*8 value_i8
CALL SHMEM_INT8_ADD(dest, value_i8, pe)
\end{Fsynopsis}
\begin{apiarguments}
\apiargument{OUT}{dest}{The remotely accessible integer data object to be
updated on the remote \ac{PE}. When using \CorCpp, the type of
\dest{} should match that implied in the SYNOPSIS section.}
\apiargument{IN}{value}{The value to be atomically added to \dest. When using \CorCpp, the type of \VAR{value} should match that implied in
the SYNOPSIS section. When using \Fortran, it must be of type
integer with an element size of \dest.}
\apiargument{IN}{pe}{An integer that indicates the \ac{PE} number upon which
\dest{} is to be updated. When using \Fortran, it must be a default
integer value.}
\end{apiarguments}
\apidescription{
The \FUNC{shmem\_atomic\_add} routine performs an atomic add operation. It adds
\VAR{value} to \dest{} on \ac{PE} \VAR{pe} and atomically updates the \dest{}
without returning the value.
}
\apidesctable{
When using \Fortran, \VAR{dest} must be of the following type:
}{Routine}{Data type of \VAR{dest}}
\apitablerow{SHMEM\_INT4\_ADD}{\CONST{4}-byte integer}
\apitablerow{SHMEM\_INT8\_ADD}{\CONST{8}-byte integer}
\apireturnvalues{
None.
}
\apinotes{
As of \openshmem[1.4], \FUNC{shmem\_add} has been deprecated.
Its behavior and call signature are identical to the replacement
interface, \FUNC{shmem\_atomic\_add}.
}
\begin{apiexamples}
\apicexample
{}
{./example_code/shmem_atomic_add_example.c}
{}
\end{apiexamples}
\end{apidefinition}