Skip to content

Commit 8381bde

Browse files
committed
Added affinity parameter
Also a minor tweak to the definition of "execution agent"
1 parent 53135c4 commit 8381bde

File tree

3 files changed

+39
-2
lines changed

3 files changed

+39
-2
lines changed

cplexts.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
% These parameters, and the documentclass options,
4545
% are about document identification and overall formatting.
4646
\newcommand{\cplexts}{$CPLEXTS$}
47-
\renewcommand{\extrahead}{2014-08-13}
47+
\renewcommand{\extrahead}{2014-08-21}
4848
\standard{\cplexts}
4949
\yearofedition{2016}
5050
\languageofedition{(E)}

definitions.tex

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333

3434
\definition{execution agent}{
3535
entity, such as an OS thread,
36-
that may perform work in parallel with other execution agents%
36+
that may execute a thread of execution
37+
in parallel with other execution agents%
3738
\footnote{EN:
3839
Adapted from the C++ standard.
3940
}

loopparameter.tex

+36
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,18 @@
3939
\pfxdefn{workload_unbalanced}
4040
\end{ttfamily}
4141

42+
\pnum
43+
The
44+
\pfxdefn{affinity_t}
45+
type is an enumerated type
46+
with at least the following enumeration constants,
47+
each with nonzero value:
48+
49+
\begin{ttfamily}
50+
\pfxdefn{affinity_close}\\
51+
\pfxdefn{affinity_spread}
52+
\end{ttfamily}
53+
4254
\pnum
4355
When an object of type
4456
\pfx{loop_params_t}
@@ -191,3 +203,27 @@
191203
or
192204
\pfx{schedule_guided}.
193205
\end{note}
206+
207+
\sclause{The \tcode{affinity} parameter}
208+
\ssclause*{Synopsis}
209+
\begin{ttfamily}
210+
\#include <cplex.h>\\
211+
void \pfxdefn{set_affinity}(\pfx{loop_params_t} *hints, \pfx{affinity_t} kind);\\
212+
\pfx{affinity_t} \pfx{get_affinity}(\pfx{loop_params_t} *hints);
213+
\end{ttfamily}
214+
215+
\ssclause*{Description}
216+
\pnum
217+
The
218+
\pfx{set_affinity}
219+
macro sets to
220+
\tcode{kind}
221+
the recommended affinity
222+
for a parallel loop associated with the object pointed to by
223+
\tcode{hints}.
224+
225+
\pnum
226+
The affinity of a loop indicates whether the loop benefits
227+
from being executed by co-located hardware threads,
228+
or whether performance is likely to improve if the software threads
229+
are spread over multiple cores.

0 commit comments

Comments
 (0)