Skip to content

Commit e3072f9

Browse files
committed
Address review comments
* remove library part of include files * move CufRuntime files into CUDA subdir
1 parent 765c2f9 commit e3072f9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+189
-189
lines changed

flang-rt/include/flang-rt/CufRuntime/allocator.h renamed to flang-rt/include/flang-rt/CUDA/allocator.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
//===-- include/flang-rt/CufRuntime/allocator.h -----------------*- C++ -*-===//
1+
//===-- include/flang-rt/CUDA/allocator.h -----------------------*- C++ -*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#ifndef FORTRAN_CUFRUNTIME_ALLOCATOR_H_
10-
#define FORTRAN_CUFRUNTIME_ALLOCATOR_H_
9+
#ifndef FLANGRT_CUDA_ALLOCATOR_H_
10+
#define FLANGRT_CUDA_ALLOCATOR_H_
1111

1212
#include "flang/Runtime/descriptor-consts.h"
1313
#include "flang/Runtime/entry-names.h"
@@ -43,4 +43,4 @@ void *CUFAllocUnified(std::size_t);
4343
void CUFFreeUnified(void *);
4444

4545
} // namespace Fortran::runtime::cuda
46-
#endif /* FORTRAN_CUFRUNTIME_ALLOCATOR_H_ */
46+
#endif /* FLANGRT_CUDA_ALLOCATOR_H_ */

flang-rt/include/flang-rt/flang_rt/allocator-registry.h renamed to flang-rt/include/flang-rt/allocator-registry.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
//===-- include/flang-rt/flang_rt/allocator-registry.h ----------*- C++ -*-===//
1+
//===-- include/flang-rt/allocator-registry.h -------------------*- C++ -*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#ifndef FORTRAN_FLANG_RT_ALLOCATOR_REGISTRY_H_
10-
#define FORTRAN_FLANG_RT_ALLOCATOR_REGISTRY_H_
9+
#ifndef FLANGRT_ALLOCATOR_REGISTRY_H_
10+
#define FLANGRT_ALLOCATOR_REGISTRY_H_
1111

1212
#include "flang/Common/api-attrs.h"
1313
#include "flang/Runtime/allocator-registry-consts.h"
@@ -55,4 +55,4 @@ RT_OFFLOAD_VAR_GROUP_END
5555

5656
} // namespace Fortran::runtime
5757

58-
#endif /* FORTRAN_FLANG_RT_ALLOCATOR_REGISTRY_H_ */
58+
#endif /* FLANGRT_ALLOCATOR_REGISTRY_H_ */

flang-rt/include/flang-rt/flang_rt/array-constructor.h renamed to flang-rt/include/flang-rt/array-constructor.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- include/flang-rt/flang_rt/array-constructor.h -----------*- C++ -*-===//
1+
//===-- include/flang-rt/array-constructor.h --------------------*- C++ -*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
@@ -9,10 +9,10 @@
99
// External APIs to create temporary storage for array constructors when their
1010
// final extents or length parameters cannot be pre-computed.
1111

12-
#ifndef FORTRAN_FLANG_RT_ARRAY_CONSTRUCTOR_H_
13-
#define FORTRAN_FLANG_RT_ARRAY_CONSTRUCTOR_H_
12+
#ifndef FLANGRT_ARRAY_CONSTRUCTOR_H_
13+
#define FLANGRT_ARRAY_CONSTRUCTOR_H_
1414

15-
#include "flang-rt/flang_rt/descriptor.h"
15+
#include "flang-rt/descriptor.h"
1616
#include "flang/Runtime/array-constructor-consts.h"
1717
#include "flang/Runtime/entry-names.h"
1818
#include <cstdint>
@@ -45,4 +45,4 @@ struct ArrayConstructorVector {
4545
};
4646

4747
} // namespace Fortran::runtime
48-
#endif /* FORTRAN_FLANG_RT_ARRAY_CONSTRUCTOR_H_ */
48+
#endif /* FLANGRT_ARRAY_CONSTRUCTOR_H_ */

flang-rt/include/flang-rt/flang_rt/descriptor.h renamed to flang-rt/include/flang-rt/descriptor.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
//===-- include/flang-rt/flang_rt/descriptor.h ------------------*- C++ -*-===//
1+
//===-- include/flang-rt/descriptor.h ---------------------------*- C++ -*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#ifndef FORTRAN_FLANG_RT_DESCRIPTOR_H_
10-
#define FORTRAN_FLANG_RT_DESCRIPTOR_H_
9+
#ifndef FLANGRT_DESCRIPTOR_H_
10+
#define FLANGRT_DESCRIPTOR_H_
1111

1212
// Defines data structures used during execution of a Fortran program
1313
// to implement nontrivial dummy arguments, pointers, allocatables,
@@ -18,8 +18,8 @@
1818
// User C code is welcome to depend on that ISO_Fortran_binding.h file,
1919
// but should never reference this internal header.
2020

21-
#include "flang-rt/flang_rt/memory.h"
22-
#include "flang-rt/flang_rt/type-code.h"
21+
#include "flang-rt/memory.h"
22+
#include "flang-rt/type-code.h"
2323
#include "flang/Common/ISO_Fortran_binding_wrapper.h"
2424
#include "flang/Runtime/descriptor-consts.h"
2525
#include <algorithm>
@@ -482,4 +482,4 @@ class alignas(Descriptor) StaticDescriptor {
482482
};
483483

484484
} // namespace Fortran::runtime
485-
#endif /* FORTRAN_FLANG_RT_DESCRIPTOR_H_ */
485+
#endif /* FLANGRT_DESCRIPTOR_H_ */

flang-rt/include/flang-rt/flang_rt/io-api-funcs.h renamed to flang-rt/include/flang-rt/io-api-funcs.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- include/flang-rt/flang_rt/io-api-funcs.h ----------------*- C++ -*-===//
1+
//===-- include/flang-rt/io-api-funcs.h -------------------------*- C++ -*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
@@ -8,8 +8,8 @@
88

99
// Defines API between compiled code and I/O runtime library.
1010

11-
#ifndef FORTRAN_FLANG_RT_IO_API_FUNCS_H_
12-
#define FORTRAN_FLANG_RT_IO_API_FUNCS_H_
11+
#ifndef FLANGRT_IO_API_FUNCS_H_
12+
#define FLANGRT_IO_API_FUNCS_H_
1313

1414
#include "flang/Common/uint128.h"
1515
#include "flang/Runtime/entry-names.h"
@@ -36,4 +36,4 @@ RT_API_ATTRS const char *InquiryKeywordHashDecode(
3636
char *buffer, std::size_t, InquiryKeywordHash);
3737

3838
} // namespace Fortran::runtime::io
39-
#endif /* FORTRAN_FLANG_RT_IO_API_FUNCS_H_ */
39+
#endif /* FLANGRT_IO_API_FUNCS_H_ */

flang-rt/include/flang-rt/flang_rt/iostat-funcs.h renamed to flang-rt/include/flang-rt/iostat-funcs.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- include/flang-rt/flang_rt/iostat-funcs.h ----------------*- C++ -*-===//
1+
//===-- include/flang-rt/iostat-funcs.h -------------------------*- C++ -*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
@@ -9,8 +9,8 @@
99
// Defines the values returned by the runtime for IOSTAT= specifiers
1010
// on I/O statements.
1111

12-
#ifndef FORTRAN_FLANG_RT_IOSTAT_FUNCS_H_
13-
#define FORTRAN_FLANG_RT_IOSTAT_FUNCS_H_
12+
#ifndef FLANGRT_IOSTAT_FUNCS_H_
13+
#define FLANGRT_IOSTAT_FUNCS_H_
1414

1515
#include "flang/Common/api-attrs.h"
1616
#include "flang/Runtime/iostat.h"
@@ -20,4 +20,4 @@ namespace Fortran::runtime::io {
2020
RT_API_ATTRS const char *IostatErrorString(int);
2121

2222
} // namespace Fortran::runtime::io
23-
#endif /* FORTRAN_FLANG_RT_IOSTAT_FUNCS_H_ */
23+
#endif /* FLANGRT_IOSTAT_FUNCS_H_ */

flang-rt/include/flang-rt/flang_rt/memory.h renamed to flang-rt/include/flang-rt/memory.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- include/flang-rt/flang_rt/memory.h ----------------------*- C++ -*-===//
1+
//===-- include/flang-rt/memory.h -------------------------------*- C++ -*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
@@ -9,8 +9,8 @@
99
// Thin wrapper around malloc()/free() to isolate the dependency,
1010
// ease porting, and provide an owning pointer.
1111

12-
#ifndef FORTRAN_FLANG_RT_MEMORY_H_
13-
#define FORTRAN_FLANG_RT_MEMORY_H_
12+
#ifndef FLANGRT_MEMORY_H_
13+
#define FLANGRT_MEMORY_H_
1414

1515
#include "flang/Common/api-attrs.h"
1616
#include <cassert>
@@ -170,4 +170,4 @@ template <typename A> struct Allocator {
170170
};
171171
} // namespace Fortran::runtime
172172

173-
#endif /* FORTRAN_FLANG_RT_MEMORY_H_ */
173+
#endif /* FLANGRT_MEMORY_H_ */

flang-rt/include/flang-rt/flang_rt/type-code.h renamed to flang-rt/include/flang-rt/type-code.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
//===-- include/flang-rt/flang_rt/type-code.h -------------------*- C++ -*-===//
1+
//===-- include/flang-rt/type-code.h ----------------------------*- C++ -*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#ifndef FORTRAN_FLANG_RT_TYPE_CODE_H_
10-
#define FORTRAN_FLANG_RT_TYPE_CODE_H_
9+
#ifndef FLANGRT_TYPE_CODE_H_
10+
#define FLANGRT_TYPE_CODE_H_
1111

1212
#include "flang/Common/Fortran-consts.h"
1313
#include "flang/Common/ISO_Fortran_binding_wrapper.h"
@@ -75,4 +75,4 @@ class TypeCode {
7575
ISO::CFI_type_t raw_{CFI_type_other};
7676
};
7777
} // namespace Fortran::runtime
78-
#endif /* FORTRAN_FLANG_RT_TYPE_CODE_H_ */
78+
#endif /* FLANGRT_TYPE_CODE_H_ */

flang-rt/lib/CufRuntime/allocator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "flang-rt/CufRuntime/allocator.h"
10-
#include "flang-rt/flang_rt/allocator-registry.h"
9+
#include "flang-rt/CUDA/allocator.h"
10+
#include "flang-rt/allocator-registry.h"
1111
#include "../flang_rt/derived.h"
1212
#include "../flang_rt/stat.h"
1313
#include "../flang_rt/terminator.h"

flang-rt/lib/CufRuntime/descriptor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "flang/Runtime/CUDA/descriptor.h"
10-
#include "flang-rt/CufRuntime/allocator.h"
10+
#include "flang-rt/CUDA/allocator.h"
1111

1212
namespace Fortran::runtime::cuda {
1313
extern "C" {

0 commit comments

Comments
 (0)