17#ifndef FORTRAN_RUNTIME_REDUCE_H_
18#define FORTRAN_RUNTIME_REDUCE_H_
20#include "flang/Common/float128.h"
21#include "flang/Common/uint128.h"
22#include "flang/Runtime/cpp-type.h"
23#include "flang/Runtime/entry-names.h"
26namespace Fortran::runtime {
31using ReferenceReductionOperation = T (*)(
const T *,
const T *);
32template <
typename T>
using ValueReductionOperation = T (*)(T, T);
33template <
typename CHAR>
34using ReductionCharOperation = void (*)(CHAR *hiddenResult,
35 std::size_t resultLen,
const CHAR *x,
const CHAR *y, std::size_t xLen,
37using ReductionDerivedTypeOperation = void (*)(
38 void *hiddenResult,
const void *x,
const void *y);
42std::int8_t RTDECL(ReduceInteger1Ref)(
const Descriptor &,
43 ReferenceReductionOperation<std::int8_t>,
const char *source,
int line,
44 int dim = 0,
const Descriptor *mask =
nullptr,
45 const std::int8_t *identity =
nullptr,
bool ordered =
true);
46std::int8_t RTDECL(ReduceInteger1Value)(
const Descriptor &,
47 ValueReductionOperation<std::int8_t>,
const char *source,
int line,
48 int dim = 0,
const Descriptor *mask =
nullptr,
49 const std::int8_t *identity =
nullptr,
bool ordered =
true);
50void RTDECL(ReduceInteger1DimRef)(Descriptor &result,
const Descriptor &array,
51 ReferenceReductionOperation<std::int8_t>,
const char *source,
int line,
52 int dim,
const Descriptor *mask =
nullptr,
53 const std::int8_t *identity =
nullptr,
bool ordered =
true);
54void RTDECL(ReduceInteger1DimValue)(Descriptor &result,
const Descriptor &array,
55 ValueReductionOperation<std::int8_t>,
const char *source,
int line,
int dim,
56 const Descriptor *mask =
nullptr,
const std::int8_t *identity =
nullptr,
58std::int16_t RTDECL(ReduceInteger2Ref)(
const Descriptor &,
59 ReferenceReductionOperation<std::int16_t>,
const char *source,
int line,
60 int dim = 0,
const Descriptor *mask =
nullptr,
61 const std::int16_t *identity =
nullptr,
bool ordered =
true);
62std::int16_t RTDECL(ReduceInteger2Value)(
const Descriptor &,
63 ValueReductionOperation<std::int16_t>,
const char *source,
int line,
64 int dim = 0,
const Descriptor *mask =
nullptr,
65 const std::int16_t *identity =
nullptr,
bool ordered =
true);
66void RTDECL(ReduceInteger2DimRef)(Descriptor &result,
const Descriptor &array,
67 ReferenceReductionOperation<std::int16_t>,
const char *source,
int line,
68 int dim,
const Descriptor *mask =
nullptr,
69 const std::int16_t *identity =
nullptr,
bool ordered =
true);
70void RTDECL(ReduceInteger2DimValue)(Descriptor &result,
const Descriptor &array,
71 ValueReductionOperation<std::int16_t>,
const char *source,
int line,
72 int dim,
const Descriptor *mask =
nullptr,
73 const std::int16_t *identity =
nullptr,
bool ordered =
true);
74std::int32_t RTDECL(ReduceInteger4Ref)(
const Descriptor &,
75 ReferenceReductionOperation<std::int32_t>,
const char *source,
int line,
76 int dim = 0,
const Descriptor *mask =
nullptr,
77 const std::int32_t *identity =
nullptr,
bool ordered =
true);
78std::int32_t RTDECL(ReduceInteger4Value)(
const Descriptor &,
79 ValueReductionOperation<std::int32_t>,
const char *source,
int line,
80 int dim = 0,
const Descriptor *mask =
nullptr,
81 const std::int32_t *identity =
nullptr,
bool ordered =
true);
82void RTDECL(ReduceInteger4DimRef)(Descriptor &result,
const Descriptor &array,
83 ReferenceReductionOperation<std::int32_t>,
const char *source,
int line,
84 int dim,
const Descriptor *mask =
nullptr,
85 const std::int32_t *identity =
nullptr,
bool ordered =
true);
86void RTDECL(ReduceInteger4DimValue)(Descriptor &result,
const Descriptor &array,
87 ValueReductionOperation<std::int32_t>,
const char *source,
int line,
88 int dim,
const Descriptor *mask =
nullptr,
89 const std::int32_t *identity =
nullptr,
bool ordered =
true);
90std::int64_t RTDECL(ReduceInteger8Ref)(
const Descriptor &,
91 ReferenceReductionOperation<std::int64_t>,
const char *source,
int line,
92 int dim = 0,
const Descriptor *mask =
nullptr,
93 const std::int64_t *identity =
nullptr,
bool ordered =
true);
94std::int64_t RTDECL(ReduceInteger8Value)(
const Descriptor &,
95 ValueReductionOperation<std::int64_t>,
const char *source,
int line,
96 int dim = 0,
const Descriptor *mask =
nullptr,
97 const std::int64_t *identity =
nullptr,
bool ordered =
true);
98void RTDECL(ReduceInteger8DimRef)(Descriptor &result,
const Descriptor &array,
99 ReferenceReductionOperation<std::int64_t>,
const char *source,
int line,
100 int dim,
const Descriptor *mask =
nullptr,
101 const std::int64_t *identity =
nullptr,
bool ordered =
true);
102void RTDECL(ReduceInteger8DimValue)(Descriptor &result,
const Descriptor &array,
103 ValueReductionOperation<std::int64_t>,
const char *source,
int line,
104 int dim,
const Descriptor *mask =
nullptr,
105 const std::int64_t *identity =
nullptr,
bool ordered =
true);
106#ifdef __SIZEOF_INT128__
107common::int128_t RTDECL(ReduceInteger16Ref)(
const Descriptor &,
108 ReferenceReductionOperation<common::int128_t>,
const char *source,
int line,
109 int dim = 0,
const Descriptor *mask =
nullptr,
110 const common::int128_t *identity =
nullptr,
bool ordered =
true);
111common::int128_t RTDECL(ReduceInteger16Value)(
const Descriptor &,
112 ValueReductionOperation<common::int128_t>,
const char *source,
int line,
113 int dim = 0,
const Descriptor *mask =
nullptr,
114 const common::int128_t *identity =
nullptr,
bool ordered =
true);
115void RTDECL(ReduceInteger16DimRef)(Descriptor &result,
const Descriptor &array,
116 ReferenceReductionOperation<common::int128_t>,
const char *source,
int line,
117 int dim,
const Descriptor *mask =
nullptr,
118 const common::int128_t *identity =
nullptr,
bool ordered =
true);
119void RTDECL(ReduceInteger16DimValue)(Descriptor &result,
120 const Descriptor &array, ValueReductionOperation<common::int128_t>,
121 const char *source,
int line,
int dim,
const Descriptor *mask =
nullptr,
122 const common::int128_t *identity =
nullptr,
bool ordered =
true);
125std::uint8_t RTDECL(ReduceUnsigned1Ref)(
const Descriptor &,
126 ReferenceReductionOperation<std::uint8_t>,
const char *source,
int line,
127 int dim = 0,
const Descriptor *mask =
nullptr,
128 const std::uint8_t *identity =
nullptr,
bool ordered =
true);
129std::uint8_t RTDECL(ReduceUnsigned1Value)(
const Descriptor &,
130 ValueReductionOperation<std::uint8_t>,
const char *source,
int line,
131 int dim = 0,
const Descriptor *mask =
nullptr,
132 const std::uint8_t *identity =
nullptr,
bool ordered =
true);
133void RTDECL(ReduceUnsigned1DimRef)(Descriptor &result,
const Descriptor &array,
134 ReferenceReductionOperation<std::uint8_t>,
const char *source,
int line,
135 int dim,
const Descriptor *mask =
nullptr,
136 const std::uint8_t *identity =
nullptr,
bool ordered =
true);
137void RTDECL(ReduceUnsigned1DimValue)(Descriptor &result,
138 const Descriptor &array, ValueReductionOperation<std::uint8_t>,
139 const char *source,
int line,
int dim,
const Descriptor *mask =
nullptr,
140 const std::uint8_t *identity =
nullptr,
bool ordered =
true);
141std::uint16_t RTDECL(ReduceUnsigned2Ref)(
const Descriptor &,
142 ReferenceReductionOperation<std::uint16_t>,
const char *source,
int line,
143 int dim = 0,
const Descriptor *mask =
nullptr,
144 const std::uint16_t *identity =
nullptr,
bool ordered =
true);
145std::uint16_t RTDECL(ReduceUnsigned2Value)(
const Descriptor &,
146 ValueReductionOperation<std::uint16_t>,
const char *source,
int line,
147 int dim = 0,
const Descriptor *mask =
nullptr,
148 const std::uint16_t *identity =
nullptr,
bool ordered =
true);
149void RTDECL(ReduceUnsigned2DimRef)(Descriptor &result,
const Descriptor &array,
150 ReferenceReductionOperation<std::uint16_t>,
const char *source,
int line,
151 int dim,
const Descriptor *mask =
nullptr,
152 const std::uint16_t *identity =
nullptr,
bool ordered =
true);
153void RTDECL(ReduceUnsigned2DimValue)(Descriptor &result,
154 const Descriptor &array, ValueReductionOperation<std::uint16_t>,
155 const char *source,
int line,
int dim,
const Descriptor *mask =
nullptr,
156 const std::uint16_t *identity =
nullptr,
bool ordered =
true);
157std::uint32_t RTDECL(ReduceUnsigned4Ref)(
const Descriptor &,
158 ReferenceReductionOperation<std::uint32_t>,
const char *source,
int line,
159 int dim = 0,
const Descriptor *mask =
nullptr,
160 const std::uint32_t *identity =
nullptr,
bool ordered =
true);
161std::uint32_t RTDECL(ReduceUnsigned4Value)(
const Descriptor &,
162 ValueReductionOperation<std::uint32_t>,
const char *source,
int line,
163 int dim = 0,
const Descriptor *mask =
nullptr,
164 const std::uint32_t *identity =
nullptr,
bool ordered =
true);
165void RTDECL(ReduceUnsigned4DimRef)(Descriptor &result,
const Descriptor &array,
166 ReferenceReductionOperation<std::uint32_t>,
const char *source,
int line,
167 int dim,
const Descriptor *mask =
nullptr,
168 const std::uint32_t *identity =
nullptr,
bool ordered =
true);
169void RTDECL(ReduceUnsigned4DimValue)(Descriptor &result,
170 const Descriptor &array, ValueReductionOperation<std::uint32_t>,
171 const char *source,
int line,
int dim,
const Descriptor *mask =
nullptr,
172 const std::uint32_t *identity =
nullptr,
bool ordered =
true);
173std::uint64_t RTDECL(ReduceUnsigned8Ref)(
const Descriptor &,
174 ReferenceReductionOperation<std::uint64_t>,
const char *source,
int line,
175 int dim = 0,
const Descriptor *mask =
nullptr,
176 const std::uint64_t *identity =
nullptr,
bool ordered =
true);
177std::uint64_t RTDECL(ReduceUnsigned8Value)(
const Descriptor &,
178 ValueReductionOperation<std::uint64_t>,
const char *source,
int line,
179 int dim = 0,
const Descriptor *mask =
nullptr,
180 const std::uint64_t *identity =
nullptr,
bool ordered =
true);
181void RTDECL(ReduceUnsigned8DimRef)(Descriptor &result,
const Descriptor &array,
182 ReferenceReductionOperation<std::uint64_t>,
const char *source,
int line,
183 int dim,
const Descriptor *mask =
nullptr,
184 const std::uint64_t *identity =
nullptr,
bool ordered =
true);
185void RTDECL(ReduceUnsigned8DimValue)(Descriptor &result,
186 const Descriptor &array, ValueReductionOperation<std::uint64_t>,
187 const char *source,
int line,
int dim,
const Descriptor *mask =
nullptr,
188 const std::uint64_t *identity =
nullptr,
bool ordered =
true);
189#ifdef __SIZEOF_INT128__
190common::uint128_t RTDECL(ReduceUnsigned16Ref)(
const Descriptor &,
191 ReferenceReductionOperation<common::uint128_t>,
const char *source,
192 int line,
int dim = 0,
const Descriptor *mask =
nullptr,
193 const common::uint128_t *identity =
nullptr,
bool ordered =
true);
194common::uint128_t RTDECL(ReduceUnsigned16Value)(
const Descriptor &,
195 ValueReductionOperation<common::uint128_t>,
const char *source,
int line,
196 int dim = 0,
const Descriptor *mask =
nullptr,
197 const common::uint128_t *identity =
nullptr,
bool ordered =
true);
198void RTDECL(ReduceUnsigned16DimRef)(Descriptor &result,
const Descriptor &array,
199 ReferenceReductionOperation<common::uint128_t>,
const char *source,
200 int line,
int dim,
const Descriptor *mask =
nullptr,
201 const common::uint128_t *identity =
nullptr,
bool ordered =
true);
202void RTDECL(ReduceUnsigned16DimValue)(Descriptor &result,
203 const Descriptor &array, ValueReductionOperation<common::uint128_t>,
204 const char *source,
int line,
int dim,
const Descriptor *mask =
nullptr,
205 const common::uint128_t *identity =
nullptr,
bool ordered =
true);
209float RTDECL(ReduceReal2Ref)(
const Descriptor &,
210 ReferenceReductionOperation<float>,
const char *source,
int line,
211 int dim = 0,
const Descriptor *mask =
nullptr,
212 const float *identity =
nullptr,
bool ordered =
true);
213float RTDECL(ReduceReal2Value)(
const Descriptor &,
214 ValueReductionOperation<float>,
const char *source,
int line,
int dim = 0,
215 const Descriptor *mask =
nullptr,
const float *identity =
nullptr,
216 bool ordered =
true);
217void RTDECL(ReduceReal2DimRef)(Descriptor &result,
const Descriptor &array,
218 ReferenceReductionOperation<float>,
const char *source,
int line,
int dim,
219 const Descriptor *mask =
nullptr,
const float *identity =
nullptr,
220 bool ordered =
true);
221void RTDECL(ReduceReal2DimValue)(Descriptor &result,
const Descriptor &array,
222 ValueReductionOperation<float>,
const char *source,
int line,
int dim,
223 const Descriptor *mask =
nullptr,
const float *identity =
nullptr,
224 bool ordered =
true);
225float RTDECL(ReduceReal3Ref)(
const Descriptor &,
226 ReferenceReductionOperation<float>,
const char *source,
int line,
227 int dim = 0,
const Descriptor *mask =
nullptr,
228 const float *identity =
nullptr,
bool ordered =
true);
229float RTDECL(ReduceReal3Value)(
const Descriptor &,
230 ValueReductionOperation<float>,
const char *source,
int line,
int dim = 0,
231 const Descriptor *mask =
nullptr,
const float *identity =
nullptr,
232 bool ordered =
true);
233void RTDECL(ReduceReal3DimRef)(Descriptor &result,
const Descriptor &array,
234 ReferenceReductionOperation<float>,
const char *source,
int line,
int dim,
235 const Descriptor *mask =
nullptr,
const float *identity =
nullptr,
236 bool ordered =
true);
237void RTDECL(ReduceReal3DimValue)(Descriptor &result,
const Descriptor &array,
238 ValueReductionOperation<float>,
const char *source,
int line,
int dim,
239 const Descriptor *mask =
nullptr,
const float *identity =
nullptr,
240 bool ordered =
true);
241float RTDECL(ReduceReal4Ref)(
const Descriptor &,
242 ReferenceReductionOperation<float>,
const char *source,
int line,
243 int dim = 0,
const Descriptor *mask =
nullptr,
244 const float *identity =
nullptr,
bool ordered =
true);
245float RTDECL(ReduceReal4Value)(
const Descriptor &,
246 ValueReductionOperation<float>,
const char *source,
int line,
int dim = 0,
247 const Descriptor *mask =
nullptr,
const float *identity =
nullptr,
248 bool ordered =
true);
249void RTDECL(ReduceReal4DimRef)(Descriptor &result,
const Descriptor &array,
250 ReferenceReductionOperation<float>,
const char *source,
int line,
int dim,
251 const Descriptor *mask =
nullptr,
const float *identity =
nullptr,
252 bool ordered =
true);
253void RTDECL(ReduceReal4DimValue)(Descriptor &result,
const Descriptor &array,
254 ValueReductionOperation<float>,
const char *source,
int line,
int dim,
255 const Descriptor *mask =
nullptr,
const float *identity =
nullptr,
256 bool ordered =
true);
257double RTDECL(ReduceReal8Ref)(
const Descriptor &,
258 ReferenceReductionOperation<double>,
const char *source,
int line,
259 int dim = 0,
const Descriptor *mask =
nullptr,
260 const double *identity =
nullptr,
bool ordered =
true);
261double RTDECL(ReduceReal8Value)(
const Descriptor &,
262 ValueReductionOperation<double>,
const char *source,
int line,
int dim = 0,
263 const Descriptor *mask =
nullptr,
const double *identity =
nullptr,
264 bool ordered =
true);
265void RTDECL(ReduceReal8DimRef)(Descriptor &result,
const Descriptor &array,
266 ReferenceReductionOperation<double>,
const char *source,
int line,
int dim,
267 const Descriptor *mask =
nullptr,
const double *identity =
nullptr,
268 bool ordered =
true);
269void RTDECL(ReduceReal8DimValue)(Descriptor &result,
const Descriptor &array,
270 ValueReductionOperation<double>,
const char *source,
int line,
int dim,
271 const Descriptor *mask =
nullptr,
const double *identity =
nullptr,
272 bool ordered =
true);
274CppTypeFor<TypeCategory::Real, 10> RTDECL(ReduceReal10Ref)(
const Descriptor &,
275 ReferenceReductionOperation<CppTypeFor<TypeCategory::Real, 10>>,
276 const char *source,
int line,
int dim = 0,
const Descriptor *mask =
nullptr,
277 const CppTypeFor<TypeCategory::Real, 10> *identity =
nullptr,
278 bool ordered =
true);
279CppTypeFor<TypeCategory::Real, 10> RTDECL(ReduceReal10Value)(
const Descriptor &,
280 ValueReductionOperation<CppTypeFor<TypeCategory::Real, 10>>,
281 const char *source,
int line,
int dim = 0,
const Descriptor *mask =
nullptr,
282 const CppTypeFor<TypeCategory::Real, 10> *identity =
nullptr,
283 bool ordered =
true);
284void RTDECL(ReduceReal10DimRef)(Descriptor &result,
const Descriptor &array,
285 ReferenceReductionOperation<CppTypeFor<TypeCategory::Real, 10>>,
286 const char *source,
int line,
int dim,
const Descriptor *mask =
nullptr,
287 const CppTypeFor<TypeCategory::Real, 10> *identity =
nullptr,
288 bool ordered =
true);
289void RTDECL(ReduceReal10DimValue)(Descriptor &result,
const Descriptor &array,
290 ValueReductionOperation<CppTypeFor<TypeCategory::Real, 10>>,
291 const char *source,
int line,
int dim,
const Descriptor *mask =
nullptr,
292 const CppTypeFor<TypeCategory::Real, 10> *identity =
nullptr,
293 bool ordered =
true);
295#if HAS_LDBL128 || HAS_FLOAT128
296CppFloat128Type RTDECL(ReduceReal16Ref)(
const Descriptor &,
297 ReferenceReductionOperation<CppFloat128Type>,
const char *source,
int line,
298 int dim = 0,
const Descriptor *mask =
nullptr,
299 const CppFloat128Type *identity =
nullptr,
bool ordered =
true);
300CppFloat128Type RTDECL(ReduceReal16Value)(
const Descriptor &,
301 ValueReductionOperation<CppFloat128Type>,
const char *source,
int line,
302 int dim = 0,
const Descriptor *mask =
nullptr,
303 const CppFloat128Type *identity =
nullptr,
bool ordered =
true);
304void RTDECL(ReduceReal16DimRef)(Descriptor &result,
const Descriptor &array,
305 ReferenceReductionOperation<CppFloat128Type>,
const char *source,
int line,
306 int dim,
const Descriptor *mask =
nullptr,
307 const CppFloat128Type *identity =
nullptr,
bool ordered =
true);
308void RTDECL(ReduceReal16DimValue)(Descriptor &result,
const Descriptor &array,
309 ValueReductionOperation<CppFloat128Type>,
const char *source,
int line,
310 int dim,
const Descriptor *mask =
nullptr,
311 const CppFloat128Type *identity =
nullptr,
bool ordered =
true);
314void RTDECL(CppReduceComplex2Ref)(CppTypeFor<TypeCategory::Complex, 4> &,
316 ReferenceReductionOperation<CppTypeFor<TypeCategory::Complex, 4>>,
317 const char *source,
int line,
int dim = 0,
const Descriptor *mask =
nullptr,
318 const CppTypeFor<TypeCategory::Complex, 4> *identity =
nullptr,
319 bool ordered =
true);
320void RTDECL(CppReduceComplex2Value)(CppTypeFor<TypeCategory::Complex, 4> &,
322 ValueReductionOperation<CppTypeFor<TypeCategory::Complex, 4>>,
323 const char *source,
int line,
int dim = 0,
const Descriptor *mask =
nullptr,
324 const CppTypeFor<TypeCategory::Complex, 4> *identity =
nullptr,
325 bool ordered =
true);
326void RTDECL(CppReduceComplex2DimRef)(Descriptor &result,
327 const Descriptor &array,
328 ReferenceReductionOperation<CppTypeFor<TypeCategory::Complex, 4>>,
329 const char *source,
int line,
int dim,
const Descriptor *mask =
nullptr,
330 const CppTypeFor<TypeCategory::Complex, 4> *identity =
nullptr,
331 bool ordered =
true);
332void RTDECL(CppReduceComplex2DimValue)(Descriptor &result,
333 const Descriptor &array,
334 ValueReductionOperation<CppTypeFor<TypeCategory::Complex, 4>>,
335 const char *source,
int line,
int dim,
const Descriptor *mask =
nullptr,
336 const CppTypeFor<TypeCategory::Complex, 4> *identity =
nullptr,
337 bool ordered =
true);
338void RTDECL(CppReduceComplex3Ref)(CppTypeFor<TypeCategory::Complex, 4> &,
340 ReferenceReductionOperation<CppTypeFor<TypeCategory::Complex, 4>>,
341 const char *source,
int line,
int dim = 0,
const Descriptor *mask =
nullptr,
342 const CppTypeFor<TypeCategory::Complex, 4> *identity =
nullptr,
343 bool ordered =
true);
344void RTDECL(CppReduceComplex3Value)(CppTypeFor<TypeCategory::Complex, 4> &,
346 ValueReductionOperation<CppTypeFor<TypeCategory::Complex, 4>>,
347 const char *source,
int line,
int dim = 0,
const Descriptor *mask =
nullptr,
348 const CppTypeFor<TypeCategory::Complex, 4> *identity =
nullptr,
349 bool ordered =
true);
350void RTDECL(CppReduceComplex3DimRef)(Descriptor &result,
351 const Descriptor &array,
352 ReferenceReductionOperation<CppTypeFor<TypeCategory::Complex, 4>>,
353 const char *source,
int line,
int dim,
const Descriptor *mask =
nullptr,
354 const CppTypeFor<TypeCategory::Complex, 4> *identity =
nullptr,
355 bool ordered =
true);
356void RTDECL(CppReduceComplex3DimValue)(Descriptor &result,
357 const Descriptor &array,
358 ValueReductionOperation<CppTypeFor<TypeCategory::Complex, 4>>,
359 const char *source,
int line,
int dim,
const Descriptor *mask =
nullptr,
360 const CppTypeFor<TypeCategory::Complex, 4> *identity =
nullptr,
361 bool ordered =
true);
362void RTDECL(CppReduceComplex4Ref)(CppTypeFor<TypeCategory::Complex, 4> &,
364 ReferenceReductionOperation<CppTypeFor<TypeCategory::Complex, 4>>,
365 const char *source,
int line,
int dim = 0,
const Descriptor *mask =
nullptr,
366 const CppTypeFor<TypeCategory::Complex, 4> *identity =
nullptr,
367 bool ordered =
true);
368void RTDECL(CppReduceComplex4Value)(CppTypeFor<TypeCategory::Complex, 4> &,
370 ValueReductionOperation<CppTypeFor<TypeCategory::Complex, 4>>,
371 const char *source,
int line,
int dim = 0,
const Descriptor *mask =
nullptr,
372 const CppTypeFor<TypeCategory::Complex, 4> *identity =
nullptr,
373 bool ordered =
true);
374void RTDECL(CppReduceComplex4DimRef)(Descriptor &result,
375 const Descriptor &array,
376 ReferenceReductionOperation<CppTypeFor<TypeCategory::Complex, 4>>,
377 const char *source,
int line,
int dim,
const Descriptor *mask =
nullptr,
378 const CppTypeFor<TypeCategory::Complex, 4> *identity =
nullptr,
379 bool ordered =
true);
380void RTDECL(CppReduceComplex4DimValue)(Descriptor &result,
381 const Descriptor &array,
382 ValueReductionOperation<CppTypeFor<TypeCategory::Complex, 4>>,
383 const char *source,
int line,
int dim,
const Descriptor *mask =
nullptr,
384 const CppTypeFor<TypeCategory::Complex, 4> *identity =
nullptr,
385 bool ordered =
true);
386void RTDECL(CppReduceComplex8Ref)(CppTypeFor<TypeCategory::Complex, 8> &,
388 ReferenceReductionOperation<CppTypeFor<TypeCategory::Complex, 8>>,
389 const char *source,
int line,
int dim = 0,
const Descriptor *mask =
nullptr,
390 const CppTypeFor<TypeCategory::Complex, 8> *identity =
nullptr,
391 bool ordered =
true);
392void RTDECL(CppReduceComplex8Value)(CppTypeFor<TypeCategory::Complex, 8> &,
394 ValueReductionOperation<CppTypeFor<TypeCategory::Complex, 8>>,
395 const char *source,
int line,
int dim = 0,
const Descriptor *mask =
nullptr,
396 const CppTypeFor<TypeCategory::Complex, 8> *identity =
nullptr,
397 bool ordered =
true);
398void RTDECL(CppReduceComplex8DimRef)(Descriptor &result,
399 const Descriptor &array,
400 ReferenceReductionOperation<CppTypeFor<TypeCategory::Complex, 8>>,
401 const char *source,
int line,
int dim,
const Descriptor *mask =
nullptr,
402 const CppTypeFor<TypeCategory::Complex, 8> *identity =
nullptr,
403 bool ordered =
true);
404void RTDECL(CppReduceComplex8DimValue)(Descriptor &result,
405 const Descriptor &array,
406 ValueReductionOperation<CppTypeFor<TypeCategory::Complex, 8>>,
407 const char *source,
int line,
int dim,
const Descriptor *mask =
nullptr,
408 const CppTypeFor<TypeCategory::Complex, 8> *identity =
nullptr,
409 bool ordered =
true);
411void RTDECL(CppReduceComplex10Ref)(CppTypeFor<TypeCategory::Complex, 10> &,
413 ReferenceReductionOperation<CppTypeFor<TypeCategory::Complex, 10>>,
414 const char *source,
int line,
int dim = 0,
const Descriptor *mask =
nullptr,
415 const CppTypeFor<TypeCategory::Complex, 10> *identity =
nullptr,
416 bool ordered =
true);
417void RTDECL(CppReduceComplex10Value)(CppTypeFor<TypeCategory::Complex, 10> &,
419 ValueReductionOperation<CppTypeFor<TypeCategory::Complex, 10>>,
420 const char *source,
int line,
int dim = 0,
const Descriptor *mask =
nullptr,
421 const CppTypeFor<TypeCategory::Complex, 10> *identity =
nullptr,
422 bool ordered =
true);
423void RTDECL(CppReduceComplex10DimRef)(Descriptor &result,
424 const Descriptor &array,
425 ReferenceReductionOperation<CppTypeFor<TypeCategory::Complex, 10>>,
426 const char *source,
int line,
int dim,
const Descriptor *mask =
nullptr,
427 const CppTypeFor<TypeCategory::Complex, 10> *identity =
nullptr,
428 bool ordered =
true);
429void RTDECL(CppReduceComplex10DimValue)(Descriptor &result,
430 const Descriptor &array,
431 ValueReductionOperation<CppTypeFor<TypeCategory::Complex, 10>>,
432 const char *source,
int line,
int dim,
const Descriptor *mask =
nullptr,
433 const CppTypeFor<TypeCategory::Complex, 10> *identity =
nullptr,
434 bool ordered =
true);
436#if HAS_LDBL128 || HAS_FLOAT128
437void RTDECL(CppReduceComplex16Ref)(CppTypeFor<TypeCategory::Complex, 16> &,
439 ReferenceReductionOperation<CppTypeFor<TypeCategory::Complex, 16>>,
440 const char *source,
int line,
int dim = 0,
const Descriptor *mask =
nullptr,
441 const CppTypeFor<TypeCategory::Complex, 16> *identity =
nullptr,
442 bool ordered =
true);
443void RTDECL(CppReduceComplex16Value)(CppTypeFor<TypeCategory::Complex, 16> &,
445 ValueReductionOperation<CppTypeFor<TypeCategory::Complex, 16>>,
446 const char *source,
int line,
int dim = 0,
const Descriptor *mask =
nullptr,
447 const CppTypeFor<TypeCategory::Complex, 16> *identity =
nullptr,
448 bool ordered =
true);
449void RTDECL(CppReduceComplex16DimRef)(Descriptor &result,
450 const Descriptor &array,
451 ReferenceReductionOperation<CppTypeFor<TypeCategory::Complex, 16>>,
452 const char *source,
int line,
int dim,
const Descriptor *mask =
nullptr,
453 const CppTypeFor<TypeCategory::Complex, 16> *identity =
nullptr,
454 bool ordered =
true);
455void RTDECL(CppReduceComplex16DimValue)(Descriptor &result,
456 const Descriptor &array,
457 ValueReductionOperation<CppTypeFor<TypeCategory::Complex, 16>>,
458 const char *source,
int line,
int dim,
const Descriptor *mask =
nullptr,
459 const CppTypeFor<TypeCategory::Complex, 16> *identity =
nullptr,
460 bool ordered =
true);
463bool RTDECL(ReduceLogical1Ref)(
const Descriptor &,
464 ReferenceReductionOperation<std::int8_t>,
const char *source,
int line,
465 int dim = 0,
const Descriptor *mask =
nullptr,
466 const std::int8_t *identity =
nullptr,
bool ordered =
true);
467bool RTDECL(ReduceLogical1Value)(
const Descriptor &,
468 ValueReductionOperation<std::int8_t>,
const char *source,
int line,
469 int dim = 0,
const Descriptor *mask =
nullptr,
470 const std::int8_t *identity =
nullptr,
bool ordered =
true);
471void RTDECL(ReduceLogical1DimRef)(Descriptor &result,
const Descriptor &array,
472 ReferenceReductionOperation<std::int8_t>,
const char *source,
int line,
473 int dim,
const Descriptor *mask =
nullptr,
474 const std::int8_t *identity =
nullptr,
bool ordered =
true);
475void RTDECL(ReduceLogical1DimValue)(Descriptor &result,
const Descriptor &array,
476 ValueReductionOperation<std::int8_t>,
const char *source,
int line,
int dim,
477 const Descriptor *mask =
nullptr,
const std::int8_t *identity =
nullptr,
478 bool ordered =
true);
479bool RTDECL(ReduceLogical2Ref)(
const Descriptor &,
480 ReferenceReductionOperation<std::int16_t>,
const char *source,
int line,
481 int dim = 0,
const Descriptor *mask =
nullptr,
482 const std::int16_t *identity =
nullptr,
bool ordered =
true);
483bool RTDECL(ReduceLogical2Value)(
const Descriptor &,
484 ValueReductionOperation<std::int16_t>,
const char *source,
int line,
485 int dim = 0,
const Descriptor *mask =
nullptr,
486 const std::int16_t *identity =
nullptr,
bool ordered =
true);
487void RTDECL(ReduceLogical2DimRef)(Descriptor &result,
const Descriptor &array,
488 ReferenceReductionOperation<std::int16_t>,
const char *source,
int line,
489 int dim,
const Descriptor *mask =
nullptr,
490 const std::int16_t *identity =
nullptr,
bool ordered =
true);
491void RTDECL(ReduceLogical2DimValue)(Descriptor &result,
const Descriptor &array,
492 ValueReductionOperation<std::int16_t>,
const char *source,
int line,
493 int dim,
const Descriptor *mask =
nullptr,
494 const std::int16_t *identity =
nullptr,
bool ordered =
true);
495bool RTDECL(ReduceLogical4Ref)(
const Descriptor &,
496 ReferenceReductionOperation<std::int32_t>,
const char *source,
int line,
497 int dim = 0,
const Descriptor *mask =
nullptr,
498 const std::int32_t *identity =
nullptr,
bool ordered =
true);
499bool RTDECL(ReduceLogical4Value)(
const Descriptor &,
500 ValueReductionOperation<std::int32_t>,
const char *source,
int line,
501 int dim = 0,
const Descriptor *mask =
nullptr,
502 const std::int32_t *identity =
nullptr,
bool ordered =
true);
503void RTDECL(ReduceLogical4DimRef)(Descriptor &result,
const Descriptor &array,
504 ReferenceReductionOperation<std::int32_t>,
const char *source,
int line,
505 int dim,
const Descriptor *mask =
nullptr,
506 const std::int32_t *identity =
nullptr,
bool ordered =
true);
507void RTDECL(ReduceLogical4DimValue)(Descriptor &result,
const Descriptor &array,
508 ValueReductionOperation<std::int32_t>,
const char *source,
int line,
509 int dim,
const Descriptor *mask =
nullptr,
510 const std::int32_t *identity =
nullptr,
bool ordered =
true);
511bool RTDECL(ReduceLogical8Ref)(
const Descriptor &,
512 ReferenceReductionOperation<std::int64_t>,
const char *source,
int line,
513 int dim = 0,
const Descriptor *mask =
nullptr,
514 const std::int64_t *identity =
nullptr,
bool ordered =
true);
515bool RTDECL(ReduceLogical8Value)(
const Descriptor &,
516 ValueReductionOperation<std::int64_t>,
const char *source,
int line,
517 int dim = 0,
const Descriptor *mask =
nullptr,
518 const std::int64_t *identity =
nullptr,
bool ordered =
true);
519void RTDECL(ReduceLogical8DimRef)(Descriptor &result,
const Descriptor &array,
520 ReferenceReductionOperation<std::int64_t>,
const char *source,
int line,
521 int dim,
const Descriptor *mask =
nullptr,
522 const std::int64_t *identity =
nullptr,
bool ordered =
true);
523void RTDECL(ReduceLogical8DimValue)(Descriptor &result,
const Descriptor &array,
524 ValueReductionOperation<std::int64_t>,
const char *source,
int line,
525 int dim,
const Descriptor *mask =
nullptr,
526 const std::int64_t *identity =
nullptr,
bool ordered =
true);
528void RTDECL(ReduceChar1)(
char *result,
const Descriptor &array,
529 ReductionCharOperation<char>,
const char *source,
int line,
int dim = 0,
530 const Descriptor *mask =
nullptr,
const char *identity =
nullptr,
531 bool ordered =
true);
532void RTDECL(ReduceCharacter1Dim)(Descriptor &result,
const Descriptor &array,
533 ReductionCharOperation<char>,
const char *source,
int line,
int dim,
534 const Descriptor *mask =
nullptr,
const char *identity =
nullptr,
535 bool ordered =
true);
536void RTDECL(ReduceChar2)(
char16_t *result,
const Descriptor &array,
537 ReductionCharOperation<char16_t>,
const char *source,
int line,
int dim = 0,
538 const Descriptor *mask =
nullptr,
const char16_t *identity =
nullptr,
539 bool ordered =
true);
540void RTDECL(ReduceCharacter2Dim)(Descriptor &result,
const Descriptor &array,
541 ReductionCharOperation<char16_t>,
const char *source,
int line,
int dim,
542 const Descriptor *mask =
nullptr,
const char16_t *identity =
nullptr,
543 bool ordered =
true);
544void RTDECL(ReduceChar4)(
char32_t *result,
const Descriptor &array,
545 ReductionCharOperation<char32_t>,
const char *source,
int line,
int dim = 0,
546 const Descriptor *mask =
nullptr,
const char32_t *identity =
nullptr,
547 bool ordered =
true);
548void RTDECL(ReduceCharacter4Dim)(Descriptor &result,
const Descriptor &array,
549 ReductionCharOperation<char32_t>,
const char *source,
int line,
int dim,
550 const Descriptor *mask =
nullptr,
const char32_t *identity =
nullptr,
551 bool ordered =
true);
553void RTDECL(ReduceDerivedType)(
char *result,
const Descriptor &array,
554 ReductionDerivedTypeOperation,
const char *source,
int line,
int dim = 0,
555 const Descriptor *mask =
nullptr,
const char *identity =
nullptr,
556 bool ordered =
true);
557void RTDECL(ReduceDerivedTypeDim)(Descriptor &result,
const Descriptor &array,
558 ReductionDerivedTypeOperation,
const char *source,
int line,
int dim,
559 const Descriptor *mask =
nullptr,
const char *identity =
nullptr,
560 bool ordered =
true);