File tree Expand file tree Collapse file tree 8 files changed +56
-4
lines changed Expand file tree Collapse file tree 8 files changed +56
-4
lines changed Original file line number Diff line number Diff line change 12
12
#define FORTRAN_RUNTIME_REDUCTION_H_
13
13
14
14
#include " flang/Common/uint128.h"
15
- #include " flang/Runtime/descriptor.h"
16
15
#include " flang/Runtime/entry-names.h"
16
+ #include < cinttypes>
17
17
#include < complex>
18
18
#include < cstdint>
19
19
20
20
namespace Fortran ::runtime {
21
+
22
+ class Descriptor ;
23
+
21
24
extern " C" {
22
25
23
26
// Reductions that are known to return scalars have per-type entry
Original file line number Diff line number Diff line change
1
+ // ===-- include/flang/Runtime/support.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 APIs for runtime support code for lowering.
10
+ #ifndef FORTRAN_RUNTIME_SUPPORT_H_
11
+ #define FORTRAN_RUNTIME_SUPPORT_H_
12
+
13
+ #include " flang/Runtime/entry-names.h"
14
+
15
+ namespace Fortran ::runtime {
16
+
17
+ class Descriptor ;
18
+
19
+ extern " C" {
20
+
21
+ // Predicate: is the storage described by a Descriptor contiguous in memory?
22
+ bool RTNAME (IsContiguous)(const Descriptor &);
23
+
24
+ } // extern "C"
25
+ } // namespace Fortran::runtime
26
+ #endif // FORTRAN_RUNTIME_SUPPORT_H_
Original file line number Diff line number Diff line change 17
17
#ifndef FORTRAN_RUNTIME_TRANSFORMATIONAL_H_
18
18
#define FORTRAN_RUNTIME_TRANSFORMATIONAL_H_
19
19
20
- #include " flang/Runtime/descriptor.h"
21
20
#include " flang/Runtime/entry-names.h"
22
- #include " flang/Runtime/memory.h "
21
+ #include < cinttypes >
23
22
24
23
namespace Fortran ::runtime {
25
24
25
+ class Descriptor ;
26
+
26
27
extern " C" {
27
28
28
29
void RTNAME (Reshape)(Descriptor &result, const Descriptor &source,
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ add_flang_library(FortranRuntime PARTIAL_SOURCES_INTENDED
65
65
stat.cpp
66
66
stop.cpp
67
67
sum.cpp
68
+ support.cpp
68
69
terminator.cpp
69
70
time-intrinsic.cpp
70
71
tools.cpp
Original file line number Diff line number Diff line change 15
15
16
16
#include " flang/Runtime/reduction.h"
17
17
#include " reduction-templates.h"
18
+ #include " flang/Runtime/descriptor.h"
18
19
#include < cinttypes>
19
20
20
21
namespace Fortran ::runtime {
Original file line number Diff line number Diff line change
1
+ // ===-- runtime/support.cpp -----------------------------------------------===//
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
+ #include " flang/Runtime/support.h"
10
+ #include " flang/Runtime/descriptor.h"
11
+
12
+ namespace Fortran ::runtime {
13
+ extern " C" {
14
+
15
+ bool RTNAME (IsContiguous)(const Descriptor &descriptor) {
16
+ return descriptor.IsContiguous ();
17
+ }
18
+
19
+ } // extern "C"
20
+ } // namespace Fortran::runtime
Original file line number Diff line number Diff line change 11
11
#ifndef FORTRAN_RUNTIME_TERMINATOR_H_
12
12
#define FORTRAN_RUNTIME_TERMINATOR_H_
13
13
14
- #include " flang/Runtime/entry-names.h"
15
14
#include < cstdarg>
16
15
17
16
namespace Fortran ::runtime {
Original file line number Diff line number Diff line change 20
20
#include " copy.h"
21
21
#include " terminator.h"
22
22
#include " tools.h"
23
+ #include " flang/Runtime/descriptor.h"
23
24
#include < algorithm>
24
25
25
26
namespace Fortran ::runtime {
You can’t perform that action at this time.
0 commit comments