Skip to content

Commit b9b80e1

Browse files
committed
Replace pragma once with ifdef.
1 parent a0d36a6 commit b9b80e1

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

unified-runtime/source/adapters/cuda/adapter.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
//
99
//===----------------------------------------------------------------------===//
1010

11+
#ifndef UR_CUDA_ADAPTER_HPP_INCLUDED
12+
#define UR_CUDA_ADAPTER_HPP_INCLUDED
13+
1114
#include "logger/ur_logger.hpp"
1215
#include "platform.hpp"
1316
#include "tracing.hpp"
@@ -17,9 +20,6 @@
1720
#include <memory>
1821
#include <mutex>
1922

20-
// should maybe be an ifdef
21-
#pragma once
22-
2323
struct ur_platform_handle_t_;
2424

2525
struct ur_adapter_handle_t_ {
@@ -35,3 +35,5 @@ struct ur_adapter_handle_t_ {
3535
namespace ur::cuda {
3636
extern std::shared_ptr<ur_adapter_handle_t_> adapter;
3737
} // namespace ur::cuda
38+
39+
#endif // UR_CUDA_ADAPTER_HPP_INCLUDED

unified-runtime/source/adapters/cuda/platform.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
88
//
99
//===----------------------------------------------------------------------===//
10-
#pragma once
10+
11+
#ifndef UR_CUDA_PLATFORM_HPP_INCLUDED
12+
#define UR_CUDA_PLATFORM_HPP_INCLUDED
1113

1214
#include "device.hpp"
1315
#include <ur/ur.hpp>
@@ -18,3 +20,5 @@
1820
struct ur_platform_handle_t_ {
1921
std::vector<std::unique_ptr<ur_device_handle_t_>> Devices;
2022
};
23+
24+
#endif // UR_CUDA_PLATFORM_HPP_INCLUDED

0 commit comments

Comments
 (0)