reducer_opor.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599
  1. /* reducer_opor.h -*- C++ -*-
  2. *
  3. * @copyright
  4. * Copyright (C) 2009-2013, Intel Corporation
  5. * All rights reserved.
  6. *
  7. * @copyright
  8. * Redistribution and use in source and binary forms, with or without
  9. * modification, are permitted provided that the following conditions
  10. * are met:
  11. *
  12. * * Redistributions of source code must retain the above copyright
  13. * notice, this list of conditions and the following disclaimer.
  14. * * Redistributions in binary form must reproduce the above copyright
  15. * notice, this list of conditions and the following disclaimer in
  16. * the documentation and/or other materials provided with the
  17. * distribution.
  18. * * Neither the name of Intel Corporation nor the names of its
  19. * contributors may be used to endorse or promote products derived
  20. * from this software without specific prior written permission.
  21. *
  22. * @copyright
  23. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  24. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  25. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  26. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  27. * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  28. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  29. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  30. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  31. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  32. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
  33. * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  34. * POSSIBILITY OF SUCH DAMAGE.
  35. */
  36. /** @file reducer_opor.h
  37. *
  38. * @brief Defines classes for doing parallel bitwise or reductions.
  39. *
  40. * @ingroup ReducersOr
  41. *
  42. * @see ReducersOr
  43. */
  44. #ifndef REDUCER_OPOR_H_INCLUDED
  45. #define REDUCER_OPOR_H_INCLUDED
  46. #include <cilk/reducer.h>
  47. /** @defgroup ReducersOr Bitwise Or Reducers
  48. *
  49. * Bitwise and reducers allow the computation of the bitwise and of a set of
  50. * values in parallel.
  51. *
  52. * @ingroup Reducers
  53. *
  54. * You should be familiar with @ref pagereducers "Cilk reducers", described in
  55. * file `reducers.md`, and particularly with @ref reducers_using, before trying
  56. * to use the information in this file.
  57. *
  58. * @section redopor_usage Usage Example
  59. *
  60. * cilk::reducer< cilk::op_or<unsigned> > r;
  61. * cilk_for (int i = 0; i != N; ++i) {
  62. * *r |= a[i];
  63. * }
  64. * unsigned result;
  65. * r.move_out(result);
  66. *
  67. * @section redopor_monoid The Monoid
  68. *
  69. * @subsection redopor_monoid_values Value Set
  70. *
  71. * The value set of a bitwise or reducer is the set of values of `Type`, which
  72. * is expected to be a builtin integer type which has a representation as a
  73. * sequence of bits (or something like it, such as `bool` or `std::bitset`).
  74. *
  75. * @subsection redopor_monoid_operator Operator
  76. *
  77. * The operator of a bitwise or reducer is the bitwise or operator, defined by
  78. * the “`|`” binary operator on `Type`.
  79. *
  80. * @subsection redopor_monoid_identity Identity
  81. *
  82. * The identity value of the reducer is the value whose representation
  83. * contains all 0-bits. This is expected to be the value of the default
  84. * constructor `Type()`.
  85. *
  86. * @section redopor_operations Operations
  87. *
  88. * @subsection redopor_constructors Constructors
  89. *
  90. * reducer() // identity
  91. * reducer(const Type& value)
  92. * reducer(move_in(Type& variable))
  93. *
  94. * @subsection redopor_get_set Set and Get
  95. *
  96. * r.set_value(const Type& value)
  97. * const Type& = r.get_value() const
  98. * r.move_in(Type& variable)
  99. * r.move_out(Type& variable)
  100. *
  101. * @subsection redopor_initial Initial Values
  102. *
  103. * If a bitwise or reducer is constructed without an explicit initial value,
  104. * then its initial value will be its identity value, as long as `Type`
  105. * satisfies the requirements of @ref redopor_types.
  106. *
  107. * @subsection redopor_view_ops View Operations
  108. *
  109. * *r |= a
  110. * *r = *r | a
  111. * *r = *r | a1 | a2 … | an
  112. *
  113. * @section redopor_types Type and Operator Requirements
  114. *
  115. * `Type` must be `Copy Constructible`, `Default Constructible`, and
  116. * `Assignable`.
  117. *
  118. * The operator “`|=`” must be defined on `Type`, with `x |= a` having the
  119. * same meaning as `x = x | a`.
  120. *
  121. * The expression `Type()` must be a valid expression which yields the
  122. * identity value (the value of `Type` whose representation consists of all
  123. * 0-bits).
  124. *
  125. * @section redopor_in_c Bitwise Or Reducers in C
  126. *
  127. * The @ref CILK_C_REDUCER_OPOR and @ref CILK_C_REDUCER_OPOR_TYPE macros can
  128. * be used to do bitwise or reductions in C. For example:
  129. *
  130. * CILK_C_REDUCER_OPOR(r, uint, 0);
  131. * CILK_C_REGISTER_REDUCER(r);
  132. * cilk_for(int i = 0; i != n; ++i) {
  133. * REDUCER_VIEW(r) |= a[i];
  134. * }
  135. * CILK_C_UNREGISTER_REDUCER(r);
  136. * printf("The bitwise OR of the elements of a is %x\n", REDUCER_VIEW(r));
  137. *
  138. * See @ref reducers_c_predefined.
  139. */
  140. #ifdef __cplusplus
  141. namespace cilk {
  142. /** The bitwise or reducer view class.
  143. *
  144. * This is the view class for reducers created with
  145. * `cilk::reducer< cilk::op_or<Type> >`. It holds the accumulator variable for
  146. * the reduction, and allows only `or` operations to be performed on it.
  147. *
  148. * @note The reducer “dereference” operation (`reducer::operator *()`)
  149. * yields a reference to the view. Thus, for example, the view class’s
  150. * `|=` operation would be used in an expression like `*r |= a`, where
  151. * `r` is an opmod reducer variable.
  152. *
  153. * @tparam Type The type of the contained accumulator variable. This will
  154. * be the value type of a monoid_with_view that is
  155. * instantiated with this view.
  156. *
  157. * @see ReducersOr
  158. * @see op_or
  159. *
  160. * @ingroup ReducersOr
  161. */
  162. template <typename Type>
  163. class op_or_view : public scalar_view<Type>
  164. {
  165. typedef scalar_view<Type> base;
  166. public:
  167. /** Class to represent the right-hand side of `*reducer = *reducer | value`.
  168. *
  169. * The only assignment operator for the op_or_view class takes an
  170. * rhs_proxy as its operand. This results in the syntactic restriction
  171. * that the only expressions that can be assigned to an op_or_view are
  172. * ones which generate an rhs_proxy — that is, expressions of the form
  173. * `op_or_view | value ... | value`.
  174. *
  175. * @warning
  176. * The lhs and rhs views in such an assignment must be the same;
  177. * otherwise, the behavior will be undefined. (I.e., `v1 = v1 | x` is
  178. * legal; `v1 = v2 | x` is illegal.) This condition will be checked with
  179. * a runtime assertion when compiled in debug mode.
  180. *
  181. * @see op_or_view
  182. */
  183. class rhs_proxy {
  184. friend class op_or_view;
  185. const op_or_view* m_view;
  186. Type m_value;
  187. // Constructor is invoked only from op_or_view::operator|().
  188. //
  189. rhs_proxy(const op_or_view* view, const Type& value) : m_view(view), m_value(value) {}
  190. rhs_proxy& operator=(const rhs_proxy&); // Disable assignment operator
  191. rhs_proxy(); // Disable default constructor
  192. public:
  193. /** Bitwise or with an additional rhs value. If `v` is an op_or_view
  194. * and `a1` is a value, then the expression `v | a1` invokes the
  195. * view’s `operator|()` to create an rhs_proxy for `(v, a1)`; then
  196. * `v | a1 | a2` invokes the rhs_proxy’s `operator|()` to create a new
  197. * rhs_proxy for `(v, a1|a2)`. This allows the right-hand side of an
  198. * assignment to be not just `view | value`, but
  199. ( `view | value | value ... | value`. The effect is that
  200. *
  201. * v = v | a1 | a2 ... | an;
  202. *
  203. * is evaluated as
  204. *
  205. * v = v | (a1 | a2 ... | an);
  206. */
  207. rhs_proxy& operator|(const Type& x) { m_value |= x; return *this; }
  208. };
  209. /** Default/identity constructor. This constructor initializes the
  210. * contained value to `Type()`.
  211. */
  212. op_or_view() : base() {}
  213. /** Construct with a specified initial value.
  214. */
  215. explicit op_or_view(const Type& v) : base(v) {}
  216. /** Reduction operation.
  217. *
  218. * This function is invoked by the @ref op_or monoid to combine the views
  219. * of two strands when the right strand merges with the left one. It
  220. * “ors” the value contained in the left-strand view by the value
  221. * contained in the right-strand view, and leaves the value in the
  222. * right-strand view undefined.
  223. *
  224. * @param right A pointer to the right-strand view. (`this` points to
  225. * the left-strand view.)
  226. *
  227. * @note Used only by the @ref op_or monoid to implement the monoid
  228. * reduce operation.
  229. */
  230. void reduce(op_or_view* right) { this->m_value |= right->m_value; }
  231. /** @name Accumulator variable updates.
  232. *
  233. * These functions support the various syntaxes for “oring” the
  234. * accumulator variable contained in the view with some value.
  235. */
  236. //@{
  237. /** Or the accumulator variable with @a x.
  238. */
  239. op_or_view& operator|=(const Type& x) { this->m_value |= x; return *this; }
  240. /** Create an object representing `*this | x`.
  241. *
  242. * @see rhs_proxy
  243. */
  244. rhs_proxy operator|(const Type& x) const { return rhs_proxy(this, x); }
  245. /** Assign the result of a `view | value` expression to the view. Note that
  246. * this is the only assignment operator for this class.
  247. *
  248. * @see rhs_proxy
  249. */
  250. op_or_view& operator=(const rhs_proxy& rhs) {
  251. __CILKRTS_ASSERT(this == rhs.m_view);
  252. this->m_value |= rhs.m_value;
  253. return *this;
  254. }
  255. //@}
  256. };
  257. /** Monoid class for bitwise or reductions. Instantiate the cilk::reducer
  258. * template class with an op_or monoid to create a bitwise or reducer
  259. * class. For example, to compute the bitwise or of a set of `unsigned long`
  260. * values:
  261. *
  262. * cilk::reducer< cilk::op_or<unsigned long> > r;
  263. *
  264. * @tparam Type The reducer value type.
  265. * @tparam Align If `false` (the default), reducers instantiated on this
  266. * monoid will be naturally aligned (the Cilk library 1.0
  267. * behavior). If `true`, reducers instantiated on this monoid
  268. * will be cache-aligned for binary compatibility with
  269. * reducers in Cilk library version 0.9.
  270. *
  271. * @see ReducersOr
  272. * @see op_or_view
  273. *
  274. * @ingroup ReducersOr
  275. */
  276. template <typename Type, bool Align = false>
  277. struct op_or : public monoid_with_view<op_or_view<Type>, Align> {};
  278. /** Deprecated bitwise or reducer class.
  279. *
  280. * reducer_opor is the same as @ref reducer<@ref op_or>, except that
  281. * reducer_opor is a proxy for the contained view, so that accumulator
  282. * variable update operations can be applied directly to the reducer. For
  283. * example, a value is ored with a `reducer<%op_or>` with `*r |= a`, but a
  284. * value can be ored with a `%reducer_opor` with `r |= a`.
  285. *
  286. * @deprecated Users are strongly encouraged to use `reducer<monoid>`
  287. * reducers rather than the old wrappers like reducer_opor.
  288. * The `reducer<monoid>` reducers show the reducer/monoid/view
  289. * architecture more clearly, are more consistent in their
  290. * implementation, and present a simpler model for new
  291. * user-implemented reducers.
  292. *
  293. * @note Implicit conversions are provided between `%reducer_opor`
  294. * and `reducer<%op_or>`. This allows incremental code
  295. * conversion: old code that used `%reducer_opor` can pass a
  296. * `%reducer_opor` to a converted function that now expects a
  297. * pointer or reference to a `reducer<%op_or>`, and vice
  298. * versa.
  299. *
  300. * @tparam Type The value type of the reducer.
  301. *
  302. * @see op_or
  303. * @see reducer
  304. * @see ReducersOr
  305. *
  306. * @ingroup ReducersOr
  307. */
  308. template <typename Type>
  309. class reducer_opor : public reducer< op_or<Type, true> >
  310. {
  311. typedef reducer< op_or<Type, true> > base;
  312. using base::view;
  313. public:
  314. /// The view type for the reducer.
  315. typedef typename base::view_type view_type;
  316. /// The view’s rhs proxy type.
  317. typedef typename view_type::rhs_proxy rhs_proxy;
  318. /// The view type for the reducer.
  319. typedef view_type View;
  320. /// The monoid type for the reducer.
  321. typedef typename base::monoid_type Monoid;
  322. /** @name Constructors
  323. */
  324. //@{
  325. /** Default (identity) constructor.
  326. *
  327. * Constructs the wrapper with the default initial value of `Type()`.
  328. */
  329. reducer_opor() {}
  330. /** Value constructor.
  331. *
  332. * Constructs the wrapper with a specified initial value.
  333. */
  334. explicit reducer_opor(const Type& initial_value) : base(initial_value) {}
  335. //@}
  336. /** @name Forwarded functions
  337. * @details Functions that update the contained accumulator variable are
  338. * simply forwarded to the contained @ref op_and_view. */
  339. //@{
  340. /// @copydoc op_or_view::operator|=(const Type&)
  341. reducer_opor& operator|=(const Type& x)
  342. {
  343. view() |= x; return *this;
  344. }
  345. // The legacy definition of reducer_opor::operator|() has different
  346. // behavior and a different return type than this definition. The legacy
  347. // version is defined as a member function, so this new version is defined
  348. // as a free function to give it a different signature, so that they won’t
  349. // end up sharing a single object file entry.
  350. /// @copydoc op_or_view::operator|(const Type&) const
  351. friend rhs_proxy operator|(const reducer_opor& r, const Type& x)
  352. {
  353. return r.view() | x;
  354. }
  355. /// @copydoc op_and_view::operator=(const rhs_proxy&)
  356. reducer_opor& operator=(const rhs_proxy& temp)
  357. {
  358. view() = temp; return *this;
  359. }
  360. //@}
  361. /** @name Dereference
  362. * @details Dereferencing a wrapper is a no-op. It simply returns the
  363. * wrapper. Combined with the rule that the wrapper forwards view
  364. * operations to its contained view, this means that view operations can
  365. * be written the same way on reducers and wrappers, which is convenient
  366. * for incrementally converting old code using wrappers to use reducers
  367. * instead. That is:
  368. *
  369. * reducer< op_and<int> > r;
  370. * *r &= a; // *r returns the view
  371. * // operator &= is a view member function
  372. *
  373. * reducer_opand<int> w;
  374. * *w &= a; // *w returns the wrapper
  375. * // operator &= is a wrapper member function that
  376. * // calls the corresponding view function
  377. */
  378. //@{
  379. reducer_opor& operator*() { return *this; }
  380. reducer_opor const& operator*() const { return *this; }
  381. reducer_opor* operator->() { return this; }
  382. reducer_opor const* operator->() const { return this; }
  383. //@}
  384. /** @name Upcast
  385. * @details In Cilk library 0.9, reducers were always cache-aligned. In
  386. * library 1.0, reducer cache alignment is optional. By default, reducers
  387. * are unaligned (i.e., just naturally aligned), but legacy wrappers
  388. * inherit from cache-aligned reducers for binary compatibility.
  389. *
  390. * This means that a wrapper will automatically be upcast to its aligned
  391. * reducer base class. The following conversion operators provide
  392. * pseudo-upcasts to the corresponding unaligned reducer class.
  393. */
  394. //@{
  395. operator reducer< op_or<Type, false> >& ()
  396. {
  397. return *reinterpret_cast< reducer< op_or<Type, false> >* >(this);
  398. }
  399. operator const reducer< op_or<Type, false> >& () const
  400. {
  401. return *reinterpret_cast< const reducer< op_or<Type, false> >* >(this);
  402. }
  403. //@}
  404. };
  405. /// @cond internal
  406. /** Metafunction specialization for reducer conversion.
  407. *
  408. * This specialization of the @ref legacy_reducer_downcast template class
  409. * defined in reducer.h causes the `reducer< op_or<Type> >` class to have an
  410. * `operator reducer_opor<Type>& ()` conversion operator that statically
  411. * downcasts the `reducer<op_or>` to the corresponding `reducer_opor` type.
  412. * (The reverse conversion, from `reducer_opor` to `reducer<op_or>`, is just
  413. * an upcast, which is provided for free by the language.)
  414. *
  415. * @ingroup ReducersOr
  416. */
  417. template <typename Type, bool Align>
  418. struct legacy_reducer_downcast<reducer<op_or<Type, Align> > >
  419. {
  420. typedef reducer_opor<Type> type;
  421. };
  422. /// @endcond
  423. } // namespace cilk
  424. #endif /* __cplusplus */
  425. /** @ingroup ReducersOr
  426. */
  427. //@{
  428. /** @name C language reducer macros
  429. *
  430. * These macros are used to declare and work with op_or reducers in C code.
  431. *
  432. * @see @ref page_reducers_in_c
  433. */
  434. //@{
  435. __CILKRTS_BEGIN_EXTERN_C
  436. /** Opor reducer type name.
  437. *
  438. * This macro expands into the identifier which is the name of the op_or
  439. * reducer type for a specified numeric type.
  440. *
  441. * @param tn The @ref reducers_c_type_names "numeric type name" specifying
  442. * the type of the reducer.
  443. *
  444. * @see @ref reducers_c_predefined
  445. * @see ReducersOr
  446. */
  447. #define CILK_C_REDUCER_OPOR_TYPE(tn) \
  448. __CILKRTS_MKIDENT(cilk_c_reducer_opor_,tn)
  449. /** Declare an op_or reducer object.
  450. *
  451. * This macro expands into a declaration of an op_or reducer object for a
  452. * specified numeric type. For example:
  453. *
  454. * CILK_C_REDUCER_OPOR(my_reducer, ulong, 0);
  455. *
  456. * @param obj The variable name to be used for the declared reducer object.
  457. * @param tn The @ref reducers_c_type_names "numeric type name" specifying
  458. * the type of the reducer.
  459. * @param v The initial value for the reducer. (A value which can be
  460. * assigned to the numeric type represented by @a tn.)
  461. *
  462. * @see @ref reducers_c_predefined
  463. * @see ReducersOr
  464. */
  465. #define CILK_C_REDUCER_OPOR(obj,tn,v) \
  466. CILK_C_REDUCER_OPOR_TYPE(tn) obj = \
  467. CILK_C_INIT_REDUCER(_Typeof(obj.value), \
  468. __CILKRTS_MKIDENT(cilk_c_reducer_opor_reduce_,tn), \
  469. __CILKRTS_MKIDENT(cilk_c_reducer_opor_identity_,tn), \
  470. __cilkrts_hyperobject_noop_destroy, v)
  471. /// @cond internal
  472. /** Declare the op_or reducer functions for a numeric type.
  473. *
  474. * This macro expands into external function declarations for functions which
  475. * implement the reducer functionality for the op_or reducer type for a
  476. * specified numeric type.
  477. *
  478. * @param t The value type of the reducer.
  479. * @param tn The value “type name” identifier, used to construct the reducer
  480. * type name, function names, etc.
  481. */
  482. #define CILK_C_REDUCER_OPOR_DECLARATION(t,tn) \
  483. typedef CILK_C_DECLARE_REDUCER(t) CILK_C_REDUCER_OPOR_TYPE(tn); \
  484. __CILKRTS_DECLARE_REDUCER_REDUCE(cilk_c_reducer_opor,tn,l,r); \
  485. __CILKRTS_DECLARE_REDUCER_IDENTITY(cilk_c_reducer_opor,tn);
  486. /** Define the op_or reducer functions for a numeric type.
  487. *
  488. * This macro expands into function definitions for functions which implement
  489. * the reducer functionality for the op_or reducer type for a specified
  490. * numeric type.
  491. *
  492. * @param t The value type of the reducer.
  493. * @param tn The value “type name” identifier, used to construct the reducer
  494. * type name, function names, etc.
  495. */
  496. #define CILK_C_REDUCER_OPOR_DEFINITION(t,tn) \
  497. typedef CILK_C_DECLARE_REDUCER(t) CILK_C_REDUCER_OPOR_TYPE(tn); \
  498. __CILKRTS_DECLARE_REDUCER_REDUCE(cilk_c_reducer_opor,tn,l,r) \
  499. { *(t*)l |= *(t*)r; } \
  500. __CILKRTS_DECLARE_REDUCER_IDENTITY(cilk_c_reducer_opor,tn) \
  501. { *(t*)v = 0; }
  502. //@{
  503. /** @def CILK_C_REDUCER_OPOR_INSTANCE
  504. * @brief Declare or define implementation functions for a reducer type.
  505. *
  506. * In the runtime source file c_reducers.c, the macro `CILK_C_DEFINE_REDUCERS`
  507. * will be defined, and this macro will generate reducer implementation
  508. * functions. Everywhere else, `CILK_C_DEFINE_REDUCERS` will be undefined, and
  509. * this macro will expand into external declarations for the functions.
  510. */
  511. #ifdef CILK_C_DEFINE_REDUCERS
  512. # define CILK_C_REDUCER_OPOR_INSTANCE(t,tn) \
  513. CILK_C_REDUCER_OPOR_DEFINITION(t,tn)
  514. #else
  515. # define CILK_C_REDUCER_OPOR_INSTANCE(t,tn) \
  516. CILK_C_REDUCER_OPOR_DECLARATION(t,tn)
  517. #endif
  518. //@}
  519. /* Declare or define an instance of the reducer type and its functions for each
  520. * numeric type.
  521. */
  522. CILK_C_REDUCER_OPOR_INSTANCE(char, char)
  523. CILK_C_REDUCER_OPOR_INSTANCE(unsigned char, uchar)
  524. CILK_C_REDUCER_OPOR_INSTANCE(signed char, schar)
  525. CILK_C_REDUCER_OPOR_INSTANCE(wchar_t, wchar_t)
  526. CILK_C_REDUCER_OPOR_INSTANCE(short, short)
  527. CILK_C_REDUCER_OPOR_INSTANCE(unsigned short, ushort)
  528. CILK_C_REDUCER_OPOR_INSTANCE(int, int)
  529. CILK_C_REDUCER_OPOR_INSTANCE(unsigned int, uint)
  530. CILK_C_REDUCER_OPOR_INSTANCE(unsigned int, unsigned) /* alternate name */
  531. CILK_C_REDUCER_OPOR_INSTANCE(long, long)
  532. CILK_C_REDUCER_OPOR_INSTANCE(unsigned long, ulong)
  533. CILK_C_REDUCER_OPOR_INSTANCE(long long, longlong)
  534. CILK_C_REDUCER_OPOR_INSTANCE(unsigned long long, ulonglong)
  535. //@endcond
  536. __CILKRTS_END_EXTERN_C
  537. //@}
  538. //@}
  539. #endif /* REDUCER_OPOR_H_INCLUDED */