Base subreg rules on REGMODE_NATURAL_SIZE rather than UNITS_PER_WORD
[official-gcc.git] / libcilkrts / include / cilk / reducer_opadd.h
blob46d4b6e9b57b9d6a486f3d7481fc5cc4f43e1122
1 /* reducer_opadd.h -*- C++ -*-
3 * Copyright (C) 2009-2016, Intel Corporation
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * * Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in
14 * the documentation and/or other materials provided with the
15 * distribution.
16 * * Neither the name of Intel Corporation nor the names of its
17 * contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
27 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
28 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
30 * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE.
33 * *********************************************************************
35 * PLEASE NOTE: This file is a downstream copy of a file mainitained in
36 * a repository at cilkplus.org. Changes made to this file that are not
37 * submitted through the contribution process detailed at
38 * http://www.cilkplus.org/submit-cilk-contribution will be lost the next
39 * time that a new version is released. Changes only submitted to the
40 * GNU compiler collection or posted to the git repository at
41 * https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
42 * not tracked.
44 * We welcome your contributions to this open source project. Thank you
45 * for your assistance in helping us improve Cilk Plus.
48 /** @file reducer_opadd.h
50 * @brief Defines classes for doing parallel addition reductions.
52 * @ingroup ReducersAdd
54 * @see ReducersAdd
57 #ifndef REDUCER_OPADD_H_INCLUDED
58 #define REDUCER_OPADD_H_INCLUDED
60 #include <cilk/reducer.h>
62 /** @defgroup ReducersAdd Addition Reducers
64 * Addition reducers allow the computation of the sum of a set of values in
65 * parallel.
67 * @ingroup Reducers
69 * You should be familiar with @ref pagereducers "Intel(R) Cilk(TM) Plus reducers",
70 * described in file `reducers.md`, and particularly with @ref reducers_using,
71 * before trying to use the information in this file.
73 * @section redopadd_usage Usage Example
75 * cilk::reducer< cilk::op_add<int> > r;
76 * cilk_for (int i = 0; i != N; ++i) {
77 * *r += a[i];
78 * }
79 * return r.get_value();
81 * @section redopadd_monoid The Monoid
83 * @subsection redopadd_monoid_values Value Set
85 * The value set of an addition reducer is the set of values of `Type`, which
86 * is expected to be a builtin numeric type (or something like it, such as
87 * `std::complex`).
89 * @subsection redopadd_monoid_operator Operator
91 * The operator of an addition reducer is the addition operator, defined by
92 * the "`+`" binary operator on `Type`.
94 * @subsection redopadd_monoid_identity Identity
96 * The identity value of the reducer is the numeric value "`0`". This is
97 * expected to be the value of the default constructor `Type()`.
99 * @section redopadd_operations Operations
101 * @subsection redopadd_constructors Constructors
103 * reducer() // identity
104 * reducer(const Type& value)
105 * reducer(move_in(Type& variable))
107 * @subsection redopadd_get_set Set and Get
109 * r.set_value(const Type& value)
110 * const Type& = r.get_value() const
111 * r.move_in(Type& variable)
112 * r.move_out(Type& variable)
114 * @subsection redopadd_initial Initial Values
116 * If an addition reducer is constructed without an explicit initial value,
117 * then its initial value will be its identity value, as long as `Type`
118 * satisfies the requirements of @ref redopadd_types.
120 * @subsection redopadd_view_ops View Operations
122 * *r += a
123 * *r -= a
124 * ++*r
125 * --*r
126 * (*r)++
127 * (*r)--
128 * *r = *r + a
129 * *r = *r - a
130 * *r = *r ± a1 ± a2 … ± an
132 * The post-increment and post-decrement operations do not return a value. (If
133 * they did, they would expose the value contained in the view, which is
134 * non-deterministic in the middle of a reduction.)
136 * Note that subtraction operations are allowed on an addition reducer because
137 * subtraction is equivalent to addition with a negated operand. It is true
138 * that `(x - y) - z` is not equivalent to `x - (y - z)`, but
139 * `(x + (-y)) + (-z)` _is_ equivalent to `x + ((-y) + (-z))`.
141 * @section redopadd_floating_point Issues with Floating-Point Types
143 * Because of precision and round-off issues, floating-point addition is not
144 * really associative. For example, `(1e30 + -1e30) + 1 == 1`, but
145 * `1e30 + (-1e30 + 1) == 0`.
147 * In many cases, this won't matter, but computations which have been
148 * carefully ordered to control round-off errors may not deal well with
149 * being reassociated. In general, you should be sure to understand the
150 * floating-point behavior of your program before doing any transformation
151 * that will reassociate its computations.
153 * @section redopadd_types Type and Operator Requirements
155 * `Type` must be `Copy Constructible`, `Default Constructible`, and
156 * `Assignable`.
158 * The operator "`+=`" must be defined on `Type`, with `x += a` having the
159 * same meaning as `x = x + a`. In addition, if the code uses the "`-=`",
160 * pre-increment, post-increment, pre-decrement, or post-decrement operators,
161 * then the corresponding operators must be defined on `Type`.
163 * The expression `Type()` must be a valid expression which yields the
164 * identity value (the value of `Type` whose numeric value is zero).
166 * @section redopadd_in_c Addition Reducers in C
168 * The @ref CILK_C_REDUCER_OPADD and @ref CILK_C_REDUCER_OPADD_TYPE macros can
169 * be used to do addition reductions in C. For example:
171 * CILK_C_REDUCER_OPADD(r, double, 0);
172 * CILK_C_REGISTER_REDUCER(r);
173 * cilk_for(int i = 0; i != n; ++i) {
174 * REDUCER_VIEW(r) += a[i];
176 * CILK_C_UNREGISTER_REDUCER(r);
177 * printf("The sum of the elements of a is %f\n", REDUCER_VIEW(r));
179 * See @ref reducers_c_predefined.
182 #ifdef __cplusplus
184 namespace cilk {
186 /** The addition reducer view class.
188 * This is the view class for reducers created with
189 * `cilk::reducer< cilk::op_add<Type> >`. It holds the accumulator variable
190 * for the reduction, and allows only addition and subtraction operations to
191 * be performed on it.
193 * @note The reducer "dereference" operation (`reducer::operator *()`)
194 * yields a reference to the view. Thus, for example, the view class's
195 * `+=` operation would be used in an expression like `*r += a`, where
196 * `r` is an op_add reducer variable.
198 * @tparam Type The type of the contained accumulator variable. This will
199 * be the value type of a monoid_with_view that is
200 * instantiated with this view.
202 * @see ReducersAdd
203 * @see op_add
205 * @ingroup ReducersAdd
207 template <typename Type>
208 class op_add_view : public scalar_view<Type>
210 typedef scalar_view<Type> base;
212 public:
213 /** Class to represent the right-hand side of
214 * `*reducer = *reducer ± value`.
216 * The only assignment operator for the op_add_view class takes an
217 * rhs_proxy as its operand. This results in the syntactic restriction
218 * that the only expressions that can be assigned to an op_add_view are
219 * ones which generate an rhs_proxy - that is, expressions of the form
220 * `op_add_view ± value ... ± value`.
222 * @warning
223 * The lhs and rhs views in such an assignment must be the same;
224 * otherwise, the behavior will be undefined. (I.e., `v1 = v1 + x` is
225 * legal; `v1 = v2 + x` is illegal.) This condition will be checked with a
226 * runtime assertion when compiled in debug mode.
228 * @see op_add_view
230 class rhs_proxy {
231 friend class op_add_view;
233 const op_add_view* m_view;
234 Type m_value;
236 // Constructor is invoked only from op_add_view::operator+() and
237 // op_add_view::operator-().
239 rhs_proxy(const op_add_view* view, const Type& value) :
240 m_view(view), m_value(value) {}
242 rhs_proxy& operator=(const rhs_proxy&); // Disable assignment operator
243 rhs_proxy(); // Disable default constructor
245 public:
246 ///@{
247 /** Adds or subtracts an additional rhs value. If `v` is an op_add_view
248 * and `a1` is a value, then the expression `v + a1` invokes the view's
249 * `operator+()` to create an rhs_proxy for `(v, a1)`; then
250 * `v + a1 + a2` invokes the rhs_proxy's `operator+()` to create a new
251 * rhs_proxy for `(v, a1+a2)`. This allows the right-hand side of an
252 * assignment to be not just `view ± value`, but
253 * `view ± value ± value ... ± value`. The effect is that
255 * v = v ± a1 ± a2 ... ± an;
257 * is evaluated as
259 * v = v ± (±a1 ± a2 ... ± an);
261 rhs_proxy& operator+(const Type& x) { m_value += x; return *this; }
262 rhs_proxy& operator-(const Type& x) { m_value -= x; return *this; }
263 ///@}
267 /** Default/identity constructor. This constructor initializes the
268 * contained value to `Type()`, which is expected to be the identity value
269 * for addition on `Type`.
271 op_add_view() : base() {}
273 /** Construct with a specified initial value.
275 explicit op_add_view(const Type& v) : base(v) {}
277 /** Reduces the views of two strands.
279 * This function is invoked by the @ref op_add monoid to combine the views
280 * of two strands when the right strand merges with the left one. It adds
281 * the value contained in the right-strand view to the value contained in
282 * the left-strand view, and leaves the value in the right-strand view
283 * undefined.
285 * @param right A pointer to the right-strand view. (`this` points to
286 * the left-strand view.)
288 * @note Used only by the @ref op_add monoid to implement the monoid
289 * reduce operation.
291 void reduce(op_add_view* right) { this->m_value += right->m_value; }
293 /** @name Accumulator variable updates.
295 * These functions support the various syntaxes for incrementing or
296 * decrementing the accumulator variable contained in the view.
298 ///@{
300 /** Increments the accumulator variable by @a x.
302 op_add_view& operator+=(const Type& x) { this->m_value += x; return *this; }
304 /** Decrements the accumulator variable by @a x.
306 op_add_view& operator-=(const Type& x) { this->m_value -= x; return *this; }
308 /** Pre-increment.
310 op_add_view& operator++() { ++this->m_value; return *this; }
312 /** Post-increments.
314 * @note Conventionally, post-increment operators return the old value
315 * of the incremented variable. However, reducer views do not
316 * expose their contained values, so `view++` does not have a
317 * return value.
319 void operator++(int) { this->m_value++; }
321 /** Pre-decrements.
323 op_add_view& operator--() { --this->m_value; return *this; }
325 /** Post-decrements.
327 * @note Conventionally, post-decrement operators return the old value
328 * of the decremented variable. However, reducer views do not
329 * expose their contained values, so `view--` does not have a
330 * return value.
332 void operator--(int) { this->m_value--; }
334 /** Creates an object representing `*this + x`.
336 * @see rhs_proxy
338 rhs_proxy operator+(const Type& x) const { return rhs_proxy(this, x); }
340 /** Creates an object representing `*this - x`.
342 * @see rhs_proxy
344 rhs_proxy operator-(const Type& x) const { return rhs_proxy(this, -x); }
346 /** Assigns the result of a `view ± value` expression to the view. Note that
347 * this is the only assignment operator for this class.
349 * @see rhs_proxy
351 op_add_view& operator=(const rhs_proxy& rhs) {
352 __CILKRTS_ASSERT(this == rhs.m_view);
353 this->m_value += rhs.m_value;
354 return *this;
357 ///@}
361 /** Monoid class for addition reductions. Instantiate the cilk::reducer
362 * template class with an op_add monoid to create an addition reducer class.
363 * For example, to compute
364 * the sum of a set of `int` values:
366 * cilk::reducer< cilk::op_add<int> > r;
368 * @tparam Type The reducer value type.
369 * @tparam Align If `false` (the default), reducers instantiated on this
370 * monoid will be naturally aligned (the Intel Cilk Plus library 1.0
371 * behavior). If `true`, reducers instantiated on this monoid
372 * will be cache-aligned for binary compatibility with
373 * reducers in Intel Cilk Plus library version 0.9.
375 * @see ReducersAdd
376 * @see op_add_view
378 * @ingroup ReducersAdd
380 template <typename Type, bool Align = false>
381 struct op_add : public monoid_with_view<op_add_view<Type>, Align> {};
383 /** **Deprecated** addition reducer wrapper class.
385 * reducer_opadd is the same as @ref reducer<@ref op_add>, except that
386 * reducer_opadd is a proxy for the contained view, so that accumulator
387 * variable update operations can be applied directly to the reducer. For
388 * example, a value is added to a `reducer<%op_add>` with `*r += a`, but a
389 * value can be added to a `%reducer_opadd` with `r += a`.
391 * @deprecated Users are strongly encouraged to use `reducer<monoid>`
392 * reducers rather than the old wrappers like reducer_opadd.
393 * The `reducer<monoid>` reducers show the reducer/monoid/view
394 * architecture more clearly, are more consistent in their
395 * implementation, and present a simpler model for new
396 * user-implemented reducers.
398 * @note Implicit conversions are provided between `%reducer_opadd`
399 * and `reducer<%op_add>`. This allows incremental code
400 * conversion: old code that used `%reducer_opadd` can pass a
401 * `%reducer_opadd` to a converted function that now expects a
402 * pointer or reference to a `reducer<%op_add>`, and vice
403 * versa.
405 * @tparam Type The value type of the reducer.
407 * @see op_add
408 * @see reducer
409 * @see ReducersAdd
411 * @ingroup ReducersAdd
413 template <typename Type>
414 class reducer_opadd : public reducer< op_add<Type, true> >
416 typedef reducer< op_add<Type, true> > base;
417 using base::view;
419 public:
420 /// The view type for the reducer.
421 typedef typename base::view_type view_type;
423 /// The view's rhs proxy type.
424 typedef typename view_type::rhs_proxy rhs_proxy;
426 /// The view type for the reducer.
427 typedef view_type View;
429 /// The monoid type for the reducer.
430 typedef typename base::monoid_type Monoid;
432 /** @name Constructors
434 ///@{
436 /** Default (identity) constructor.
438 * Constructs the wrapper with the default initial value of `Type()`.
440 reducer_opadd() {}
442 /** Value constructor.
444 * Constructs the wrapper with a specified initial value.
446 explicit reducer_opadd(const Type& initial_value) : base(initial_value) {}
448 ///@}
450 /** @name Forwarded functions
451 * @details Functions that update the contained accumulator variable are
452 * simply forwarded to the contained @ref op_add_view. */
453 ///@{
455 /// @copydoc op_add_view::operator+=(const Type&)
456 reducer_opadd& operator+=(const Type& x) { view() += x; return *this; }
458 /// @copydoc op_add_view::operator-=(const Type&)
459 reducer_opadd& operator-=(const Type& x) { view() -= x; return *this; }
461 /// @copydoc op_add_view::operator++()
462 reducer_opadd& operator++() { ++view(); return *this; }
464 /// @copydoc op_add_view::operator++(int)
465 void operator++(int) { view()++; }
467 /// @copydoc op_add_view::operator-\-()
468 reducer_opadd& operator--() { --view(); return *this; }
470 /// @copydoc op_add_view::operator-\-(int)
471 void operator--(int) { view()--; }
473 // The legacy definitions of reducer_opadd::operator+() and
474 // reducer_opadd::operator-() have different behavior and a different
475 // return type than this definition. The legacy version is defined as a
476 // member function, so this new version is defined as a free function to
477 // give it a different signature, so that they won't end up sharing a
478 // single object file entry.
480 /// @copydoc op_add_view::operator+(const Type&) const
481 friend rhs_proxy operator+(const reducer_opadd& r, const Type& x)
483 return r.view() + x;
485 /// @copydoc op_add_view::operator-(const Type&) const
486 friend rhs_proxy operator-(const reducer_opadd& r, const Type& x)
488 return r.view() - x;
490 /// @copydoc op_add_view::operator=(const rhs_proxy&)
491 reducer_opadd& operator=(const rhs_proxy& temp)
493 view() = temp;
494 return *this;
496 ///@}
498 /** @name Dereference
499 * @details Dereferencing a wrapper is a no-op. It simply returns the
500 * wrapper. Combined with the rule that the wrapper forwards view
501 * operations to its contained view, this means that view operations can
502 * be written the same way on reducers and wrappers, which is convenient
503 * for incrementally converting old code using wrappers to use reducers
504 * instead. That is:
506 * reducer< op_add<int> > r;
507 * *r += a; // *r returns the view
508 * // operator += is a view member function
510 * reducer_opadd<int> w;
511 * *w += a; // *w returns the wrapper
512 * // operator += is a wrapper member function that
513 * // calls the corresponding view function
515 ///@{
516 reducer_opadd& operator*() { return *this; }
517 reducer_opadd const& operator*() const { return *this; }
519 reducer_opadd* operator->() { return this; }
520 reducer_opadd const* operator->() const { return this; }
521 ///@}
523 /** @name Upcast
524 * @details In Intel Cilk Plus library 0.9, reducers were always cache-aligned.
525 * In library 1.0, reducer cache alignment is optional. By default,
526 * reducers are unaligned (i.e., just naturally aligned), but legacy
527 * wrappers inherit from cache-aligned reducers for binary compatibility.
529 * This means that a wrapper will automatically be upcast to its aligned
530 * reducer base class. The following conversion operators provide
531 * pseudo-upcasts to the corresponding unaligned reducer class.
533 ///@{
534 operator reducer< op_add<Type, false> >& ()
536 return *reinterpret_cast< reducer< op_add<Type, false> >* >(this);
538 operator const reducer< op_add<Type, false> >& () const
540 return *reinterpret_cast< const reducer< op_add<Type, false> >* >(this);
542 ///@}
545 /// @cond internal
546 /** Metafunction specialization for reducer conversion.
548 * This specialization of the @ref legacy_reducer_downcast template class
549 * defined in reducer.h causes the `reducer< op_add<Type> >` class to have an
550 * `operator reducer_opadd<Type>& ()` conversion operator that statically
551 * downcasts the `reducer<op_add>` to the corresponding `reducer_opadd` type.
552 * (The reverse conversion, from `reducer_opadd` to `reducer<op_add>`, is just
553 * an upcast, which is provided for free by the language.)
555 * @ingroup ReducersAdd
557 template <typename Type, bool Align>
558 struct legacy_reducer_downcast<reducer<op_add<Type, Align> > >
560 typedef reducer_opadd<Type> type;
562 /// @endcond
564 } // namespace cilk
566 #endif // __cplusplus
569 /** @ingroup ReducersAdd
571 ///@{
573 /** @name C Language Reducer Macros
575 * These macros are used to declare and work with numeric op_add reducers in
576 * C code.
578 * @see @ref page_reducers_in_c
580 ///@{
582 __CILKRTS_BEGIN_EXTERN_C
584 /** Declares opadd reducer type name.
586 * This macro expands into the identifier which is the name of the op_add
587 * reducer type for a specified numeric type.
589 * @param tn The @ref reducers_c_type_names "numeric type name" specifying
590 * the type of the reducer.
592 * @see @ref reducers_c_predefined
593 * @see ReducersAdd
595 #define CILK_C_REDUCER_OPADD_TYPE(tn) \
596 __CILKRTS_MKIDENT(cilk_c_reducer_opadd_,tn)
598 /** Declares an op_add reducer object.
600 * This macro expands into a declaration of an op_add reducer object for a
601 * specified numeric type. For example:
603 * CILK_C_REDUCER_OPADD(my_reducer, double, 0.0);
605 * @param obj The variable name to be used for the declared reducer object.
606 * @param tn The @ref reducers_c_type_names "numeric type name" specifying
607 * the type of the reducer.
608 * @param v The initial value for the reducer. (A value which can be
609 * assigned to the numeric type represented by @a tn.)
611 * @see @ref reducers_c_predefined
612 * @see ReducersAdd
614 #define CILK_C_REDUCER_OPADD(obj,tn,v) \
615 CILK_C_REDUCER_OPADD_TYPE(tn) obj = \
616 CILK_C_INIT_REDUCER(_Typeof(obj.value), \
617 __CILKRTS_MKIDENT(cilk_c_reducer_opadd_reduce_,tn), \
618 __CILKRTS_MKIDENT(cilk_c_reducer_opadd_identity_,tn), \
619 __cilkrts_hyperobject_noop_destroy, v)
621 /// @cond internal
623 /** Declares the op_add reducer functions for a numeric type.
625 * This macro expands into external function declarations for functions which
626 * implement the reducer functionality for the op_add reducer type for a
627 * specified numeric type.
629 * @param t The value type of the reducer.
630 * @param tn The value "type name" identifier, used to construct the reducer
631 * type name, function names, etc.
633 #define CILK_C_REDUCER_OPADD_DECLARATION(t,tn) \
634 typedef CILK_C_DECLARE_REDUCER(t) CILK_C_REDUCER_OPADD_TYPE(tn); \
635 __CILKRTS_DECLARE_REDUCER_REDUCE(cilk_c_reducer_opadd,tn,l,r); \
636 __CILKRTS_DECLARE_REDUCER_IDENTITY(cilk_c_reducer_opadd,tn);
638 /** Defines the op_add reducer functions for a numeric type.
640 * This macro expands into function definitions for functions which implement
641 * the reducer functionality for the op_add reducer type for a specified
642 * numeric type.
644 * @param t The value type of the reducer.
645 * @param tn The value "type name" identifier, used to construct the reducer
646 * type name, function names, etc.
648 #define CILK_C_REDUCER_OPADD_DEFINITION(t,tn) \
649 typedef CILK_C_DECLARE_REDUCER(t) CILK_C_REDUCER_OPADD_TYPE(tn); \
650 __CILKRTS_DECLARE_REDUCER_REDUCE(cilk_c_reducer_opadd,tn,l,r) \
651 { *(t*)l += *(t*)r; } \
652 __CILKRTS_DECLARE_REDUCER_IDENTITY(cilk_c_reducer_opadd,tn) \
653 { *(t*)v = 0; }
655 ///@{
656 /** @def CILK_C_REDUCER_OPADD_INSTANCE
657 * @brief Declares or defines implementation functions for a reducer type.
659 * In the runtime source file c_reducers.c, the macro `CILK_C_DEFINE_REDUCERS`
660 * will be defined, and this macro will generate reducer implementation
661 * functions. Everywhere else, `CILK_C_DEFINE_REDUCERS` will be undefined,
662 * and this macro will expand into external declarations for the functions.
664 #ifdef CILK_C_DEFINE_REDUCERS
665 # define CILK_C_REDUCER_OPADD_INSTANCE(t,tn) \
666 CILK_C_REDUCER_OPADD_DEFINITION(t,tn)
667 #else
668 # define CILK_C_REDUCER_OPADD_INSTANCE(t,tn) \
669 CILK_C_REDUCER_OPADD_DECLARATION(t,tn)
670 #endif
671 ///@}
673 /* Declares or defines an instance of the reducer type and its functions for each
674 * numeric type.
676 CILK_C_REDUCER_OPADD_INSTANCE(char, char)
677 CILK_C_REDUCER_OPADD_INSTANCE(unsigned char, uchar)
678 CILK_C_REDUCER_OPADD_INSTANCE(signed char, schar)
679 CILK_C_REDUCER_OPADD_INSTANCE(wchar_t, wchar_t)
680 CILK_C_REDUCER_OPADD_INSTANCE(short, short)
681 CILK_C_REDUCER_OPADD_INSTANCE(unsigned short, ushort)
682 CILK_C_REDUCER_OPADD_INSTANCE(int, int)
683 CILK_C_REDUCER_OPADD_INSTANCE(unsigned int, uint)
684 CILK_C_REDUCER_OPADD_INSTANCE(unsigned int, unsigned) /* alternate name */
685 CILK_C_REDUCER_OPADD_INSTANCE(long, long)
686 CILK_C_REDUCER_OPADD_INSTANCE(unsigned long, ulong)
687 CILK_C_REDUCER_OPADD_INSTANCE(long long, longlong)
688 CILK_C_REDUCER_OPADD_INSTANCE(unsigned long long, ulonglong)
689 CILK_C_REDUCER_OPADD_INSTANCE(float, float)
690 CILK_C_REDUCER_OPADD_INSTANCE(double, double)
691 CILK_C_REDUCER_OPADD_INSTANCE(long double, longdouble)
693 //@endcond
695 __CILKRTS_END_EXTERN_C
697 ///@}
699 ///@}
701 #endif /* REDUCER_OPADD_H_INCLUDED */