Warning: This file is not a C or C++ file. It does not have highlighting.
1 | //===-- include/flang/Runtime/reduction.h -----------------------*- C++ -*-===// |
---|---|
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | // Defines the API for the reduction transformational intrinsic functions. |
10 | |
11 | #ifndef FORTRAN_RUNTIME_REDUCTION_H_ |
12 | #define FORTRAN_RUNTIME_REDUCTION_H_ |
13 | |
14 | #include "flang/Common/float128.h" |
15 | #include "flang/Common/uint128.h" |
16 | #include "flang/Runtime/cpp-type.h" |
17 | #include "flang/Runtime/entry-names.h" |
18 | #include <cfloat> |
19 | #include <cinttypes> |
20 | #include <complex> |
21 | #include <cstdint> |
22 | |
23 | namespace Fortran::runtime { |
24 | |
25 | class Descriptor; |
26 | |
27 | extern "C" { |
28 | |
29 | // Reductions that are known to return scalars have per-type entry |
30 | // points. These cover the cases that either have no DIM= |
31 | // argument or have an argument rank of 1. Pass 0 for no DIM= |
32 | // or the value of the DIM= argument so that it may be checked. |
33 | // The data type in the descriptor is checked against the expected |
34 | // return type. |
35 | // |
36 | // Reductions that return arrays are the remaining cases in which |
37 | // the argument rank is greater than one and there is a DIM= |
38 | // argument present. These cases establish and allocate their |
39 | // results in a caller-supplied descriptor, which is assumed to |
40 | // be large enough. |
41 | // |
42 | // Complex-valued SUM and PRODUCT reductions and complex-valued |
43 | // DOT_PRODUCT have their API entry points defined in complex-reduction.h; |
44 | // these here are C wrappers around C++ implementations so as to keep |
45 | // usage of C's _Complex types out of C++ code. |
46 | |
47 | // SUM() |
48 | |
49 | std::int8_t RTDECL(SumInteger1)(const Descriptor &, const char *source, |
50 | int line, int dim = 0, const Descriptor *mask = nullptr); |
51 | std::int16_t RTDECL(SumInteger2)(const Descriptor &, const char *source, |
52 | int line, int dim = 0, const Descriptor *mask = nullptr); |
53 | std::int32_t RTDECL(SumInteger4)(const Descriptor &, const char *source, |
54 | int line, int dim = 0, const Descriptor *mask = nullptr); |
55 | std::int64_t RTDECL(SumInteger8)(const Descriptor &, const char *source, |
56 | int line, int dim = 0, const Descriptor *mask = nullptr); |
57 | #ifdef __SIZEOF_INT128__ |
58 | common::int128_t RTDECL(SumInteger16)(const Descriptor &, const char *source, |
59 | int line, int dim = 0, const Descriptor *mask = nullptr); |
60 | #endif |
61 | |
62 | // REAL/COMPLEX(2 & 3) return 32-bit float results for the caller to downconvert |
63 | float RTDECL(SumReal2)(const Descriptor &, const char *source, int line, |
64 | int dim = 0, const Descriptor *mask = nullptr); |
65 | float RTDECL(SumReal3)(const Descriptor &, const char *source, int line, |
66 | int dim = 0, const Descriptor *mask = nullptr); |
67 | float RTDECL(SumReal4)(const Descriptor &, const char *source, int line, |
68 | int dim = 0, const Descriptor *mask = nullptr); |
69 | double RTDECL(SumReal8)(const Descriptor &, const char *source, int line, |
70 | int dim = 0, const Descriptor *mask = nullptr); |
71 | #if LDBL_MANT_DIG == 64 |
72 | long double RTDECL(SumReal10)(const Descriptor &, const char *source, int line, |
73 | int dim = 0, const Descriptor *mask = nullptr); |
74 | #endif |
75 | #if LDBL_MANT_DIG == 113 || HAS_FLOAT128 |
76 | CppFloat128Type RTDECL(SumReal16)(const Descriptor &, const char *source, |
77 | int line, int dim = 0, const Descriptor *mask = nullptr); |
78 | #endif |
79 | |
80 | void RTDECL(CppSumComplex2)(std::complex<float> &, const Descriptor &, |
81 | const char *source, int line, int dim = 0, |
82 | const Descriptor *mask = nullptr); |
83 | void RTDECL(CppSumComplex3)(std::complex<float> &, const Descriptor &, |
84 | const char *source, int line, int dim = 0, |
85 | const Descriptor *mask = nullptr); |
86 | void RTDECL(CppSumComplex4)(std::complex<float> &, const Descriptor &, |
87 | const char *source, int line, int dim = 0, |
88 | const Descriptor *mask = nullptr); |
89 | void RTDECL(CppSumComplex8)(std::complex<double> &, const Descriptor &, |
90 | const char *source, int line, int dim = 0, |
91 | const Descriptor *mask = nullptr); |
92 | #if LDBL_MANT_DIG == 64 |
93 | void RTDECL(CppSumComplex10)(std::complex<long double> &, const Descriptor &, |
94 | const char *source, int line, int dim = 0, |
95 | const Descriptor *mask = nullptr); |
96 | #endif |
97 | #if LDBL_MANT_DIG == 113 || HAS_FLOAT128 |
98 | void RTDECL(CppSumComplex16)(std::complex<CppFloat128Type> &, |
99 | const Descriptor &, const char *source, int line, int dim = 0, |
100 | const Descriptor *mask = nullptr); |
101 | #endif |
102 | |
103 | void RTDECL(SumDim)(Descriptor &result, const Descriptor &array, int dim, |
104 | const char *source, int line, const Descriptor *mask = nullptr); |
105 | |
106 | // PRODUCT() |
107 | |
108 | std::int8_t RTDECL(ProductInteger1)(const Descriptor &, const char *source, |
109 | int line, int dim = 0, const Descriptor *mask = nullptr); |
110 | std::int16_t RTDECL(ProductInteger2)(const Descriptor &, const char *source, |
111 | int line, int dim = 0, const Descriptor *mask = nullptr); |
112 | std::int32_t RTDECL(ProductInteger4)(const Descriptor &, const char *source, |
113 | int line, int dim = 0, const Descriptor *mask = nullptr); |
114 | std::int64_t RTDECL(ProductInteger8)(const Descriptor &, const char *source, |
115 | int line, int dim = 0, const Descriptor *mask = nullptr); |
116 | #ifdef __SIZEOF_INT128__ |
117 | common::int128_t RTDECL(ProductInteger16)(const Descriptor &, |
118 | const char *source, int line, int dim = 0, |
119 | const Descriptor *mask = nullptr); |
120 | #endif |
121 | |
122 | // REAL/COMPLEX(2 & 3) return 32-bit float results for the caller to downconvert |
123 | float RTDECL(ProductReal2)(const Descriptor &, const char *source, int line, |
124 | int dim = 0, const Descriptor *mask = nullptr); |
125 | float RTDECL(ProductReal3)(const Descriptor &, const char *source, int line, |
126 | int dim = 0, const Descriptor *mask = nullptr); |
127 | float RTDECL(ProductReal4)(const Descriptor &, const char *source, int line, |
128 | int dim = 0, const Descriptor *mask = nullptr); |
129 | double RTDECL(ProductReal8)(const Descriptor &, const char *source, int line, |
130 | int dim = 0, const Descriptor *mask = nullptr); |
131 | #if LDBL_MANT_DIG == 64 |
132 | long double RTDECL(ProductReal10)(const Descriptor &, const char *source, |
133 | int line, int dim = 0, const Descriptor *mask = nullptr); |
134 | #endif |
135 | #if LDBL_MANT_DIG == 113 || HAS_FLOAT128 |
136 | CppFloat128Type RTDECL(ProductReal16)(const Descriptor &, const char *source, |
137 | int line, int dim = 0, const Descriptor *mask = nullptr); |
138 | #endif |
139 | |
140 | void RTDECL(CppProductComplex2)(std::complex<float> &, const Descriptor &, |
141 | const char *source, int line, int dim = 0, |
142 | const Descriptor *mask = nullptr); |
143 | void RTDECL(CppProductComplex3)(std::complex<float> &, const Descriptor &, |
144 | const char *source, int line, int dim = 0, |
145 | const Descriptor *mask = nullptr); |
146 | void RTDECL(CppProductComplex4)(std::complex<float> &, const Descriptor &, |
147 | const char *source, int line, int dim = 0, |
148 | const Descriptor *mask = nullptr); |
149 | void RTDECL(CppProductComplex8)(std::complex<double> &, const Descriptor &, |
150 | const char *source, int line, int dim = 0, |
151 | const Descriptor *mask = nullptr); |
152 | #if LDBL_MANT_DIG == 64 |
153 | void RTDECL(CppProductComplex10)(std::complex<long double> &, |
154 | const Descriptor &, const char *source, int line, int dim = 0, |
155 | const Descriptor *mask = nullptr); |
156 | #endif |
157 | #if LDBL_MANT_DIG == 113 || HAS_FLOAT128 |
158 | void RTDECL(CppProductComplex16)(std::complex<CppFloat128Type> &, |
159 | const Descriptor &, const char *source, int line, int dim = 0, |
160 | const Descriptor *mask = nullptr); |
161 | #endif |
162 | |
163 | void RTDECL(ProductDim)(Descriptor &result, const Descriptor &array, int dim, |
164 | const char *source, int line, const Descriptor *mask = nullptr); |
165 | |
166 | // IALL, IANY, IPARITY |
167 | std::int8_t RTDECL(IAll1)(const Descriptor &, const char *source, int line, |
168 | int dim = 0, const Descriptor *mask = nullptr); |
169 | std::int16_t RTDECL(IAll2)(const Descriptor &, const char *source, int line, |
170 | int dim = 0, const Descriptor *mask = nullptr); |
171 | std::int32_t RTDECL(IAll4)(const Descriptor &, const char *source, int line, |
172 | int dim = 0, const Descriptor *mask = nullptr); |
173 | std::int64_t RTDECL(IAll8)(const Descriptor &, const char *source, int line, |
174 | int dim = 0, const Descriptor *mask = nullptr); |
175 | #ifdef __SIZEOF_INT128__ |
176 | common::int128_t RTDECL(IAll16)(const Descriptor &, const char *source, |
177 | int line, int dim = 0, const Descriptor *mask = nullptr); |
178 | #endif |
179 | void RTDECL(IAllDim)(Descriptor &result, const Descriptor &array, int dim, |
180 | const char *source, int line, const Descriptor *mask = nullptr); |
181 | |
182 | std::int8_t RTDECL(IAny1)(const Descriptor &, const char *source, int line, |
183 | int dim = 0, const Descriptor *mask = nullptr); |
184 | std::int16_t RTDECL(IAny2)(const Descriptor &, const char *source, int line, |
185 | int dim = 0, const Descriptor *mask = nullptr); |
186 | std::int32_t RTDECL(IAny4)(const Descriptor &, const char *source, int line, |
187 | int dim = 0, const Descriptor *mask = nullptr); |
188 | std::int64_t RTDECL(IAny8)(const Descriptor &, const char *source, int line, |
189 | int dim = 0, const Descriptor *mask = nullptr); |
190 | #ifdef __SIZEOF_INT128__ |
191 | common::int128_t RTDECL(IAny16)(const Descriptor &, const char *source, |
192 | int line, int dim = 0, const Descriptor *mask = nullptr); |
193 | #endif |
194 | void RTDECL(IAnyDim)(Descriptor &result, const Descriptor &array, int dim, |
195 | const char *source, int line, const Descriptor *mask = nullptr); |
196 | |
197 | std::int8_t RTDECL(IParity1)(const Descriptor &, const char *source, int line, |
198 | int dim = 0, const Descriptor *mask = nullptr); |
199 | std::int16_t RTDECL(IParity2)(const Descriptor &, const char *source, int line, |
200 | int dim = 0, const Descriptor *mask = nullptr); |
201 | std::int32_t RTDECL(IParity4)(const Descriptor &, const char *source, int line, |
202 | int dim = 0, const Descriptor *mask = nullptr); |
203 | std::int64_t RTDECL(IParity8)(const Descriptor &, const char *source, int line, |
204 | int dim = 0, const Descriptor *mask = nullptr); |
205 | #ifdef __SIZEOF_INT128__ |
206 | common::int128_t RTDECL(IParity16)(const Descriptor &, const char *source, |
207 | int line, int dim = 0, const Descriptor *mask = nullptr); |
208 | #endif |
209 | void RTDECL(IParityDim)(Descriptor &result, const Descriptor &array, int dim, |
210 | const char *source, int line, const Descriptor *mask = nullptr); |
211 | |
212 | // FINDLOC, MAXLOC, & MINLOC |
213 | // These return allocated arrays in the supplied descriptor. |
214 | // The default value for KIND= should be the default INTEGER in effect at |
215 | // compilation time. |
216 | void RTDECL(Findloc)(Descriptor &, const Descriptor &x, |
217 | const Descriptor &target, int kind, const char *source, int line, |
218 | const Descriptor *mask = nullptr, bool back = false); |
219 | void RTDECL(FindlocDim)(Descriptor &, const Descriptor &x, |
220 | const Descriptor &target, int kind, int dim, const char *source, int line, |
221 | const Descriptor *mask = nullptr, bool back = false); |
222 | void RTDECL(MaxlocCharacter)(Descriptor &, const Descriptor &, int kind, |
223 | const char *source, int line, const Descriptor *mask = nullptr, |
224 | bool back = false); |
225 | void RTDECL(MaxlocInteger1)(Descriptor &, const Descriptor &, int kind, |
226 | const char *source, int line, const Descriptor *mask = nullptr, |
227 | bool back = false); |
228 | void RTDECL(MaxlocInteger2)(Descriptor &, const Descriptor &, int kind, |
229 | const char *source, int line, const Descriptor *mask = nullptr, |
230 | bool back = false); |
231 | void RTDECL(MaxlocInteger4)(Descriptor &, const Descriptor &, int kind, |
232 | const char *source, int line, const Descriptor *mask = nullptr, |
233 | bool back = false); |
234 | void RTDECL(MaxlocInteger8)(Descriptor &, const Descriptor &, int kind, |
235 | const char *source, int line, const Descriptor *mask = nullptr, |
236 | bool back = false); |
237 | void RTDECL(MaxlocInteger16)(Descriptor &, const Descriptor &, int kind, |
238 | const char *source, int line, const Descriptor *mask = nullptr, |
239 | bool back = false); |
240 | void RTDECL(MaxlocReal4)(Descriptor &, const Descriptor &, int kind, |
241 | const char *source, int line, const Descriptor *mask = nullptr, |
242 | bool back = false); |
243 | void RTDECL(MaxlocReal8)(Descriptor &, const Descriptor &, int kind, |
244 | const char *source, int line, const Descriptor *mask = nullptr, |
245 | bool back = false); |
246 | void RTDECL(MaxlocReal10)(Descriptor &, const Descriptor &, int kind, |
247 | const char *source, int line, const Descriptor *mask = nullptr, |
248 | bool back = false); |
249 | void RTDECL(MaxlocReal16)(Descriptor &, const Descriptor &, int kind, |
250 | const char *source, int line, const Descriptor *mask = nullptr, |
251 | bool back = false); |
252 | void RTDECL(MaxlocDim)(Descriptor &, const Descriptor &x, int kind, int dim, |
253 | const char *source, int line, const Descriptor *mask = nullptr, |
254 | bool back = false); |
255 | void RTDECL(MinlocCharacter)(Descriptor &, const Descriptor &, int kind, |
256 | const char *source, int line, const Descriptor *mask = nullptr, |
257 | bool back = false); |
258 | void RTDECL(MinlocInteger1)(Descriptor &, const Descriptor &, int kind, |
259 | const char *source, int line, const Descriptor *mask = nullptr, |
260 | bool back = false); |
261 | void RTDECL(MinlocInteger2)(Descriptor &, const Descriptor &, int kind, |
262 | const char *source, int line, const Descriptor *mask = nullptr, |
263 | bool back = false); |
264 | void RTDECL(MinlocInteger4)(Descriptor &, const Descriptor &, int kind, |
265 | const char *source, int line, const Descriptor *mask = nullptr, |
266 | bool back = false); |
267 | void RTDECL(MinlocInteger8)(Descriptor &, const Descriptor &, int kind, |
268 | const char *source, int line, const Descriptor *mask = nullptr, |
269 | bool back = false); |
270 | void RTDECL(MinlocInteger16)(Descriptor &, const Descriptor &, int kind, |
271 | const char *source, int line, const Descriptor *mask = nullptr, |
272 | bool back = false); |
273 | void RTDECL(MinlocReal4)(Descriptor &, const Descriptor &, int kind, |
274 | const char *source, int line, const Descriptor *mask = nullptr, |
275 | bool back = false); |
276 | void RTDECL(MinlocReal8)(Descriptor &, const Descriptor &, int kind, |
277 | const char *source, int line, const Descriptor *mask = nullptr, |
278 | bool back = false); |
279 | void RTDECL(MinlocReal10)(Descriptor &, const Descriptor &, int kind, |
280 | const char *source, int line, const Descriptor *mask = nullptr, |
281 | bool back = false); |
282 | void RTDECL(MinlocReal16)(Descriptor &, const Descriptor &, int kind, |
283 | const char *source, int line, const Descriptor *mask = nullptr, |
284 | bool back = false); |
285 | void RTDECL(MinlocDim)(Descriptor &, const Descriptor &x, int kind, int dim, |
286 | const char *source, int line, const Descriptor *mask = nullptr, |
287 | bool back = false); |
288 | |
289 | // MAXVAL and MINVAL |
290 | std::int8_t RTDECL(MaxvalInteger1)(const Descriptor &, const char *source, |
291 | int line, int dim = 0, const Descriptor *mask = nullptr); |
292 | std::int16_t RTDECL(MaxvalInteger2)(const Descriptor &, const char *source, |
293 | int line, int dim = 0, const Descriptor *mask = nullptr); |
294 | std::int32_t RTDECL(MaxvalInteger4)(const Descriptor &, const char *source, |
295 | int line, int dim = 0, const Descriptor *mask = nullptr); |
296 | std::int64_t RTDECL(MaxvalInteger8)(const Descriptor &, const char *source, |
297 | int line, int dim = 0, const Descriptor *mask = nullptr); |
298 | #ifdef __SIZEOF_INT128__ |
299 | common::int128_t RTDECL(MaxvalInteger16)(const Descriptor &, const char *source, |
300 | int line, int dim = 0, const Descriptor *mask = nullptr); |
301 | #endif |
302 | float RTDECL(MaxvalReal2)(const Descriptor &, const char *source, int line, |
303 | int dim = 0, const Descriptor *mask = nullptr); |
304 | float RTDECL(MaxvalReal3)(const Descriptor &, const char *source, int line, |
305 | int dim = 0, const Descriptor *mask = nullptr); |
306 | float RTDECL(MaxvalReal4)(const Descriptor &, const char *source, int line, |
307 | int dim = 0, const Descriptor *mask = nullptr); |
308 | double RTDECL(MaxvalReal8)(const Descriptor &, const char *source, int line, |
309 | int dim = 0, const Descriptor *mask = nullptr); |
310 | #if LDBL_MANT_DIG == 64 |
311 | long double RTDECL(MaxvalReal10)(const Descriptor &, const char *source, |
312 | int line, int dim = 0, const Descriptor *mask = nullptr); |
313 | #endif |
314 | #if LDBL_MANT_DIG == 113 || HAS_FLOAT128 |
315 | CppFloat128Type RTDECL(MaxvalReal16)(const Descriptor &, const char *source, |
316 | int line, int dim = 0, const Descriptor *mask = nullptr); |
317 | #endif |
318 | void RTDECL(MaxvalCharacter)(Descriptor &, const Descriptor &, |
319 | const char *source, int line, const Descriptor *mask = nullptr); |
320 | |
321 | std::int8_t RTDECL(MinvalInteger1)(const Descriptor &, const char *source, |
322 | int line, int dim = 0, const Descriptor *mask = nullptr); |
323 | std::int16_t RTDECL(MinvalInteger2)(const Descriptor &, const char *source, |
324 | int line, int dim = 0, const Descriptor *mask = nullptr); |
325 | std::int32_t RTDECL(MinvalInteger4)(const Descriptor &, const char *source, |
326 | int line, int dim = 0, const Descriptor *mask = nullptr); |
327 | std::int64_t RTDECL(MinvalInteger8)(const Descriptor &, const char *source, |
328 | int line, int dim = 0, const Descriptor *mask = nullptr); |
329 | #ifdef __SIZEOF_INT128__ |
330 | common::int128_t RTDECL(MinvalInteger16)(const Descriptor &, const char *source, |
331 | int line, int dim = 0, const Descriptor *mask = nullptr); |
332 | #endif |
333 | float RTDECL(MinvalReal2)(const Descriptor &, const char *source, int line, |
334 | int dim = 0, const Descriptor *mask = nullptr); |
335 | float RTDECL(MinvalReal3)(const Descriptor &, const char *source, int line, |
336 | int dim = 0, const Descriptor *mask = nullptr); |
337 | float RTDECL(MinvalReal4)(const Descriptor &, const char *source, int line, |
338 | int dim = 0, const Descriptor *mask = nullptr); |
339 | double RTDECL(MinvalReal8)(const Descriptor &, const char *source, int line, |
340 | int dim = 0, const Descriptor *mask = nullptr); |
341 | #if LDBL_MANT_DIG == 64 |
342 | long double RTDECL(MinvalReal10)(const Descriptor &, const char *source, |
343 | int line, int dim = 0, const Descriptor *mask = nullptr); |
344 | #endif |
345 | #if LDBL_MANT_DIG == 113 || HAS_FLOAT128 |
346 | CppFloat128Type RTDECL(MinvalReal16)(const Descriptor &, const char *source, |
347 | int line, int dim = 0, const Descriptor *mask = nullptr); |
348 | #endif |
349 | void RTDECL(MinvalCharacter)(Descriptor &, const Descriptor &, |
350 | const char *source, int line, const Descriptor *mask = nullptr); |
351 | |
352 | void RTDECL(MaxvalDim)(Descriptor &, const Descriptor &, int dim, |
353 | const char *source, int line, const Descriptor *mask = nullptr); |
354 | void RTDECL(MinvalDim)(Descriptor &, const Descriptor &, int dim, |
355 | const char *source, int line, const Descriptor *mask = nullptr); |
356 | |
357 | // NORM2 |
358 | float RTDECL(Norm2_2)( |
359 | const Descriptor &, const char *source, int line, int dim = 0); |
360 | float RTDECL(Norm2_3)( |
361 | const Descriptor &, const char *source, int line, int dim = 0); |
362 | float RTDECL(Norm2_4)( |
363 | const Descriptor &, const char *source, int line, int dim = 0); |
364 | double RTDECL(Norm2_8)( |
365 | const Descriptor &, const char *source, int line, int dim = 0); |
366 | #if LDBL_MANT_DIG == 64 |
367 | long double RTDECL(Norm2_10)( |
368 | const Descriptor &, const char *source, int line, int dim = 0); |
369 | #endif |
370 | #if LDBL_MANT_DIG == 113 || HAS_FLOAT128 |
371 | long double RTDECL(Norm2_16)( |
372 | const Descriptor &, const char *source, int line, int dim = 0); |
373 | void RTDECL(Norm2DimReal16)( |
374 | Descriptor &, const Descriptor &, int dim, const char *source, int line); |
375 | #endif |
376 | void RTDECL(Norm2Dim)( |
377 | Descriptor &, const Descriptor &, int dim, const char *source, int line); |
378 | |
379 | // ALL, ANY, COUNT, & PARITY logical reductions |
380 | bool RTDECL(All)(const Descriptor &, const char *source, int line, int dim = 0); |
381 | void RTDECL(AllDim)(Descriptor &result, const Descriptor &, int dim, |
382 | const char *source, int line); |
383 | bool RTDECL(Any)(const Descriptor &, const char *source, int line, int dim = 0); |
384 | void RTDECL(AnyDim)(Descriptor &result, const Descriptor &, int dim, |
385 | const char *source, int line); |
386 | std::int64_t RTDECL(Count)( |
387 | const Descriptor &, const char *source, int line, int dim = 0); |
388 | void RTDECL(CountDim)(Descriptor &result, const Descriptor &, int dim, int kind, |
389 | const char *source, int line); |
390 | bool RTDECL(Parity)( |
391 | const Descriptor &, const char *source, int line, int dim = 0); |
392 | void RTDECL(ParityDim)(Descriptor &result, const Descriptor &, int dim, |
393 | const char *source, int line); |
394 | |
395 | // DOT_PRODUCT |
396 | std::int8_t RTDECL(DotProductInteger1)(const Descriptor &, const Descriptor &, |
397 | const char *source = nullptr, int line = 0); |
398 | std::int16_t RTDECL(DotProductInteger2)(const Descriptor &, const Descriptor &, |
399 | const char *source = nullptr, int line = 0); |
400 | std::int32_t RTDECL(DotProductInteger4)(const Descriptor &, const Descriptor &, |
401 | const char *source = nullptr, int line = 0); |
402 | std::int64_t RTDECL(DotProductInteger8)(const Descriptor &, const Descriptor &, |
403 | const char *source = nullptr, int line = 0); |
404 | #ifdef __SIZEOF_INT128__ |
405 | common::int128_t RTDECL(DotProductInteger16)(const Descriptor &, |
406 | const Descriptor &, const char *source = nullptr, int line = 0); |
407 | #endif |
408 | float RTDECL(DotProductReal2)(const Descriptor &, const Descriptor &, |
409 | const char *source = nullptr, int line = 0); |
410 | float RTDECL(DotProductReal3)(const Descriptor &, const Descriptor &, |
411 | const char *source = nullptr, int line = 0); |
412 | float RTDECL(DotProductReal4)(const Descriptor &, const Descriptor &, |
413 | const char *source = nullptr, int line = 0); |
414 | double RTDECL(DotProductReal8)(const Descriptor &, const Descriptor &, |
415 | const char *source = nullptr, int line = 0); |
416 | #if LDBL_MANT_DIG == 64 |
417 | long double RTDECL(DotProductReal10)(const Descriptor &, const Descriptor &, |
418 | const char *source = nullptr, int line = 0); |
419 | #endif |
420 | #if LDBL_MANT_DIG == 113 || HAS_FLOAT128 |
421 | CppFloat128Type RTDECL(DotProductReal16)(const Descriptor &, const Descriptor &, |
422 | const char *source = nullptr, int line = 0); |
423 | #endif |
424 | void RTDECL(CppDotProductComplex2)(std::complex<float> &, const Descriptor &, |
425 | const Descriptor &, const char *source = nullptr, int line = 0); |
426 | void RTDECL(CppDotProductComplex3)(std::complex<float> &, const Descriptor &, |
427 | const Descriptor &, const char *source = nullptr, int line = 0); |
428 | void RTDECL(CppDotProductComplex4)(std::complex<float> &, const Descriptor &, |
429 | const Descriptor &, const char *source = nullptr, int line = 0); |
430 | void RTDECL(CppDotProductComplex8)(std::complex<double> &, const Descriptor &, |
431 | const Descriptor &, const char *source = nullptr, int line = 0); |
432 | #if LDBL_MANT_DIG == 64 |
433 | void RTDECL(CppDotProductComplex10)(std::complex<long double> &, |
434 | const Descriptor &, const Descriptor &, const char *source = nullptr, |
435 | int line = 0); |
436 | #endif |
437 | #if LDBL_MANT_DIG == 113 || HAS_FLOAT128 |
438 | void RTDECL(CppDotProductComplex16)(std::complex<CppFloat128Type> &, |
439 | const Descriptor &, const Descriptor &, const char *source = nullptr, |
440 | int line = 0); |
441 | #endif |
442 | bool RTDECL(DotProductLogical)(const Descriptor &, const Descriptor &, |
443 | const char *source = nullptr, int line = 0); |
444 | |
445 | } // extern "C" |
446 | } // namespace Fortran::runtime |
447 | #endif // FORTRAN_RUNTIME_REDUCTION_H_ |
448 |
Warning: This file is not a C or C++ file. It does not have highlighting.