forked from openshmem-org/specification
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshmem_put.tex
107 lines (94 loc) · 4.5 KB
/
shmem_put.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
\apisummary{
The put routines provide a method for copying data from a contiguous local
data object to a data object on a specified \ac{PE}.
}
\begin{apidefinition}
\begin{C11synopsis}
void shmem_put(TYPE *dest, const TYPE *source, size_t nelems, int pe);
\end{C11synopsis}
where \TYPE{} is one of the standard \ac{RMA} types specified by Table \ref{stdrmatypes}.
\begin{Csynopsis}
void shmem_<TYPENAME>_put(TYPE *dest, const TYPE *source, size_t nelems, 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 shmem_put<SIZE>(void *dest, const void *source, size_t nelems, int pe);
\end{CsynopsisCol}
where \SIZE{} is one of \CONST{8, 16, 32, 64, 128}.
\begin{CsynopsisCol}
void shmem_putmem(void *dest, const void *source, size_t nelems, int pe);
\end{CsynopsisCol}
\begin{Fsynopsis}
CALL SHMEM_CHARACTER_PUT(dest, source, nelems, pe)
CALL SHMEM_COMPLEX_PUT(dest, source, nelems, pe)
CALL SHMEM_DOUBLE_PUT(dest, source, nelems, pe)
CALL SHMEM_INTEGER_PUT(dest, source, nelems, pe)
CALL SHMEM_LOGICAL_PUT(dest, source, nelems, pe)
CALL SHMEM_PUT4(dest, source, nelems, pe)
CALL SHMEM_PUT8(dest, source, nelems, pe)
CALL SHMEM_PUT32(dest, source, nelems, pe)
CALL SHMEM_PUT64(dest, source, nelems, pe)
CALL SHMEM_PUT128(dest, source, nelems, pe)
CALL SHMEM_PUTMEM(dest, source, nelems, pe)
CALL SHMEM_REAL_PUT(dest, source, nelems, pe)
\end{Fsynopsis}
\begin{apiarguments}
\apiargument{IN}{dest}{Data object to be updated on the remote \ac{PE}. This
data object must be remotely accessible.}
\apiargument{OUT}{source}{Data object containing the data to be copied.}
\apiargument{IN}{nelems}{Number of elements in the \VAR{dest} and \VAR{source}
arrays. \VAR{nelems} must be of type \VAR{size\_t} for \Cstd. When using
\Fortran, it must be a constant, variable, or array element of default
integer type.}
\apiargument{IN}{pe}{\ac{PE} number of the remote \ac{PE}. \VAR{pe} must be
of type integer. When using \Fortran, it must be a constant, variable,
or array element of default integer type.}
\end{apiarguments}
\apidescription{
The routines return after the data has been copied out of the \source{} array
on the local \ac{PE}. The delivery of data words into the data object on the
destination \ac{PE} may occur in any order. Furthermore, two successive put
routines may deliver data out of order unless a call to \FUNC{shmem\_fence} is
introduced between the two calls.
}
\apidesctable{
The \dest{} and \source{} data objects must conform to certain typing
constraints, which are as follows:}
{Routine}{Data type of \VAR{dest} and \VAR{source}}
\apitablerow{shmem\_putmem}{\Fortran: Any noncharacter type. \Cstd: Any
data type. nelems is scaled in bytes.}
\apitablerow{shmem\_put4, shmem\_put32}{Any noncharacter type
that has a storage size equal to \CONST{32} bits.}
\apitablerow{shmem\_put8}{\Cstd: Any noncharacter type that
has a storage size equal to \CONST{8} bits.}
\apitablerow{}{\Fortran: Any noncharacter type that
has a storage size equal to \CONST{64} bits.}
\apitablerow{shmem\_put64}{Any noncharacter type that
has a storage size equal to \CONST{64} bits.}
\apitablerow{shmem\_put128}{Any noncharacter type that has a
storage size equal to \CONST{128} bits.}
\apitablerow{SHMEM\_CHARACTER\_PUT}{Elements of type character. \VAR{nelems}
is the number of characters to transfer. The actual character lengths of
the \source{} and \dest{} variables are ignored. }
\apitablerow{SHMEM\_COMPLEX\_PUT}{Elements of type complex of default size.}
\apitablerow{SHMEM\_DOUBLE\_PUT}{Elements of type double precision. }
\apitablerow{SHMEM\_INTEGER\_PUT}{Elements of type integer.}
\apitablerow{SHMEM\_LOGICAL\_PUT}{Elements of type logical.}
\apitablerow{SHMEM\_REAL\_PUT}{Elements of type real.}
\apireturnvalues{
None.
}
\apinotes{
When using \Fortran, data types must be of default size. For example,
a real variable must be declared as \CONST{REAL}, \CONST{REAL*4}, or
\CONST{REAL(KIND=KIND(1.0))}. The Fortran API routine \FUNC{SHMEM\_PUT} has
been deprecated, and either \FUNC{SHMEM\_PUT8} or \FUNC{SHMEM\_PUT64} should
be used in its place.
}
\begin{apiexamples}
\apicexample
{ The following \FUNC{shmem\_put} example is for C11 programs:}
{./example_code/shmem_put_example.c}
{}
\end{apiexamples}
\end{apidefinition}