Skip to content

Commit 9f03ee1

Browse files
committed
Fix for issue #22 (nonsense initializers for built-in reduction operations
1 parent 183f9a1 commit 9f03ee1

File tree

2 files changed

+28
-4
lines changed

2 files changed

+28
-4
lines changed

cplexts.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
% These parameters, and the documentclass options,
4747
% are about document identification and overall formatting.
48-
\docdate{2016}{01}{06}
48+
\docdate{2016}{01}{12}
4949
\newcommand{\wgdocno}{}
5050
\newcommand{\epptsno}{\placeholder{EPPTS}}
5151
\standard{\epptsno}

reduction.tex

+27-3
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,18 @@
120120
the proxied type shall be a real arithmetic type.
121121

122122
\pnum
123-
The initializer of a reduction
123+
If the combiner aspect of a reduction
124+
is any of the builtin combiner operations
125+
other than \tcode{_Last},
126+
then the initializer of the reduction,
127+
if specified,
128+
shall be a constant expression
129+
suitable to initialize an object of the proxied type
130+
to the default initializer value
131+
corresponding to the combiner operation,
132+
as specified in \tref{tab:init}.
133+
Otherwise, the initializer of a reduction,
134+
if specified,
124135
shall be suitable to initialize
125136
an object of the proxied type
126137
having static storage duration,
@@ -130,7 +141,8 @@
130141
taking one argument of pointer-to-proxied type.
131142

132143
\pnum
133-
The finalizer of a reduction
144+
The finalizer of a reduction,
145+
if specified,
134146
shall be an address constant referring to a function
135147
taking one argument of pointer-to-proxied type.
136148

@@ -296,12 +308,24 @@
296308
\tcode{*=}&
297309
the value 1, converted to the proxied type
298310
\\ \hline
311+
\tcode{+=}&
312+
the value 0, converted to the proxied type
313+
\\ \hline
299314
\tcode{\&=}&
300-
the bitwise complement of converting zero to the proxied type
315+
the bitwise complement of converting 0 to the proxied type
316+
\\ \hline
317+
\tcode{\textasciicircum=}&
318+
the value 0, converted to the proxied type
319+
\\ \hline
320+
\tcode{|=}&
321+
the value 0, converted to the proxied type
301322
\\ \hline
302323
\tcode{_And}&
303324
the value 1, converted to the proxied type
304325
\\ \hline
326+
\tcode{_Or}&
327+
the value 0, converted to the proxied type
328+
\\ \hline
305329
\tcode{_Min}&
306330
the maximum value representable by the proxied type
307331
\\ \hline

0 commit comments

Comments
 (0)