diff --git a/src/ray/common/buffer.h b/src/ray/common/buffer.h index 3ccda8fc1..501f86886 100644 --- a/src/ray/common/buffer.h +++ b/src/ray/common/buffer.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_COMMON_BUFFER_H -#define RAY_COMMON_BUFFER_H +#pragma once #include #include @@ -140,5 +139,3 @@ class PlasmaBuffer : public Buffer { }; } // namespace ray - -#endif // RAY_COMMON_BUFFER_H diff --git a/src/ray/common/client_connection.h b/src/ray/common/client_connection.h index 9383b57e5..8f57325fa 100644 --- a/src/ray/common/client_connection.h +++ b/src/ray/common/client_connection.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_COMMON_CLIENT_CONNECTION_H -#define RAY_COMMON_CLIENT_CONNECTION_H +#pragma once #include #include @@ -217,5 +216,3 @@ class ClientConnection : public ServerConnection { }; } // namespace ray - -#endif // RAY_COMMON_CLIENT_CONNECTION_H diff --git a/src/ray/common/common_protocol.h b/src/ray/common/common_protocol.h index f7bd0dcf3..d7dccf734 100644 --- a/src/ray/common/common_protocol.h +++ b/src/ray/common/common_protocol.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef COMMON_PROTOCOL_H -#define COMMON_PROTOCOL_H +#pragma once #include #include @@ -201,5 +200,3 @@ to_flatbuf(flatbuffers::FlatBufferBuilder &fbb, const std::unordered_set &id } return fbb.CreateVector(results); } - -#endif diff --git a/src/ray/common/constants.h b/src/ray/common/constants.h index 5b3d27a1b..4d816ab17 100644 --- a/src/ray/common/constants.h +++ b/src/ray/common/constants.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_CONSTANTS_H_ -#define RAY_CONSTANTS_H_ +#pragma once #include #include @@ -43,5 +42,3 @@ constexpr char kWorkerRayletConfigPlaceholder[] = "RAY_WORKER_RAYLET_CONFIG_PLAC /// Public DNS address which is is used to connect and get local IP. constexpr char kPublicDNSServerIp[] = "8.8.8.8"; constexpr int kPublicDNSServerPort = 53; - -#endif // RAY_CONSTANTS_H_ diff --git a/src/ray/common/function_descriptor.h b/src/ray/common/function_descriptor.h index 6c528bf2e..b6c7e8f7b 100644 --- a/src/ray/common/function_descriptor.h +++ b/src/ray/common/function_descriptor.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_CORE_WORKER_FUNCTION_DESCRIPTOR_H -#define RAY_CORE_WORKER_FUNCTION_DESCRIPTOR_H +#pragma once #include @@ -252,5 +251,3 @@ class FunctionDescriptorBuilder { static FunctionDescriptor Deserialize(const std::string &serialized_binary); }; } // namespace ray - -#endif diff --git a/src/ray/common/grpc_util.h b/src/ray/common/grpc_util.h index 756588070..4b80c8272 100644 --- a/src/ray/common/grpc_util.h +++ b/src/ray/common/grpc_util.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_COMMON_GRPC_UTIL_H -#define RAY_COMMON_GRPC_UTIL_H +#pragma once #include #include @@ -121,5 +120,3 @@ inline std::unordered_map MapFromProtobuf(::google::protobuf::Map pb } } // namespace ray - -#endif diff --git a/src/ray/common/id.h b/src/ray/common/id.h index 71047ab6f..00475f3b2 100644 --- a/src/ray/common/id.h +++ b/src/ray/common/id.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_ID_H_ -#define RAY_ID_H_ +#pragma once #include #include @@ -494,4 +493,3 @@ DEFINE_UNIQUE_ID(ObjectID); #undef DEFINE_UNIQUE_ID } // namespace std -#endif // RAY_ID_H_ diff --git a/src/ray/common/network_util.h b/src/ray/common/network_util.h index a9898b87a..03ce37659 100644 --- a/src/ray/common/network_util.h +++ b/src/ray/common/network_util.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_COMMON_NETWORK_UTIL_H -#define RAY_COMMON_NETWORK_UTIL_H +#pragma once #include #include @@ -125,4 +124,3 @@ std::string GetValidLocalIp(int port, int64_t timeout_ms); bool Ping(const std::string &ip, int port, int64_t timeout_ms); bool CheckFree(int port); -#endif // RAY_COMMON_NETWORK_UTIL_H diff --git a/src/ray/common/ray_config.h b/src/ray/common/ray_config.h index 340dd9bb9..0a38f0597 100644 --- a/src/ray/common/ray_config.h +++ b/src/ray/common/ray_config.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_CONFIG_H -#define RAY_CONFIG_H +#pragma once #include #include @@ -68,5 +67,3 @@ class RayConfig { #undef RAY_CONFIG }; // clang-format on - -#endif // RAY_CONFIG_H diff --git a/src/ray/common/ray_object.h b/src/ray/common/ray_object.h index e785e98c7..7f4b261ad 100644 --- a/src/ray/common/ray_object.h +++ b/src/ray/common/ray_object.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_COMMON_RAY_OBJECT_H -#define RAY_COMMON_RAY_OBJECT_H +#pragma once #include "absl/types/optional.h" #include "ray/common/buffer.h" @@ -102,5 +101,3 @@ class RayObject { }; } // namespace ray - -#endif // RAY_COMMON_RAY_OBJECT_H diff --git a/src/ray/common/scheduling/cluster_resource_scheduler.h b/src/ray/common/scheduling/cluster_resource_scheduler.h index 21794467b..00a5e90c6 100644 --- a/src/ray/common/scheduling/cluster_resource_scheduler.h +++ b/src/ray/common/scheduling/cluster_resource_scheduler.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_COMMON_SCHEDULING_SCHEDULING_H -#define RAY_COMMON_SCHEDULING_SCHEDULING_H +#pragma once #include "absl/container/flat_hash_map.h" #include "absl/container/flat_hash_set.h" @@ -536,5 +535,3 @@ class ClusterResourceScheduler { /// Return human-readable string for this scheduler state. std::string DebugString() const; }; - -#endif // RAY_COMMON_SCHEDULING_SCHEDULING_H diff --git a/src/ray/common/scheduling/scheduling_ids.h b/src/ray/common/scheduling/scheduling_ids.h index 33ff45c0f..1f19f56bf 100644 --- a/src/ray/common/scheduling/scheduling_ids.h +++ b/src/ray/common/scheduling/scheduling_ids.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_COMMON_SCHEDULING_SCHEDULING_IDS_H -#define RAY_COMMON_SCHEDULING_SCHEDULING_IDS_H +#pragma once #include "absl/container/flat_hash_map.h" #include "ray/util/logging.h" @@ -66,5 +65,3 @@ class StringIdMap { /// Get number of identifiers. int64_t Count(); }; - -#endif // RAY_COMMON_SCHEDULING_SCHEDULING_IDS_H diff --git a/src/ray/common/status.h b/src/ray/common/status.h index 348b4e5e3..63a094084 100644 --- a/src/ray/common/status.h +++ b/src/ray/common/status.h @@ -26,8 +26,7 @@ // Adapted from Apache Arrow, Apache Kudu, TensorFlow -#ifndef RAY_STATUS_H_ -#define RAY_STATUS_H_ +#pragma once #include #include @@ -258,5 +257,3 @@ inline void Status::operator=(const Status &s) { Status boost_to_ray_status(const boost::system::error_code &error); } // namespace ray - -#endif // RAY_STATUS_H_ diff --git a/src/ray/common/task/scheduling_resources.h b/src/ray/common/task/scheduling_resources.h index 90df85a2f..9d39a8963 100644 --- a/src/ray/common/task/scheduling_resources.h +++ b/src/ray/common/task/scheduling_resources.h @@ -1,5 +1,4 @@ -#ifndef RAY_COMMON_TASK_SCHEDULING_RESOURCES_H -#define RAY_COMMON_TASK_SCHEDULING_RESOURCES_H +#pragma once #include #include @@ -546,5 +545,3 @@ struct hash { } }; } // namespace std - -#endif // RAY_COMMON_TASK_SCHEDULING_RESOURCES_H diff --git a/src/ray/common/task/task.h b/src/ray/common/task/task.h index 99396fb42..57f1a2aa2 100644 --- a/src/ray/common/task/task.h +++ b/src/ray/common/task/task.h @@ -1,5 +1,4 @@ -#ifndef RAY_COMMON_TASK_TASK_H -#define RAY_COMMON_TASK_TASK_H +#pragma once #include @@ -125,5 +124,3 @@ class Task { }; } // namespace ray - -#endif // RAY_COMMON_TASK_TASK_H diff --git a/src/ray/common/task/task_common.h b/src/ray/common/task/task_common.h index e67820758..a95fbaffb 100644 --- a/src/ray/common/task/task_common.h +++ b/src/ray/common/task/task_common.h @@ -1,5 +1,4 @@ -#ifndef RAY_COMMON_TASK_TASK_COMMON_H -#define RAY_COMMON_TASK_TASK_COMMON_H +#pragma once #include "ray/protobuf/common.pb.h" @@ -16,5 +15,3 @@ using Language = rpc::Language; using TaskType = rpc::TaskType; } // namespace ray - -#endif diff --git a/src/ray/common/task/task_execution_spec.h b/src/ray/common/task/task_execution_spec.h index ea35bc3de..930c5a292 100644 --- a/src/ray/common/task/task_execution_spec.h +++ b/src/ray/common/task/task_execution_spec.h @@ -1,5 +1,4 @@ -#ifndef RAY_COMMON_TASK_TASK_EXECUTION_SPEC_H -#define RAY_COMMON_TASK_TASK_EXECUTION_SPEC_H +#pragma once #include @@ -41,5 +40,3 @@ class TaskExecutionSpecification : public MessageWrapper }; } // namespace ray - -#endif // RAY_COMMON_TASK_TASK_EXECUTION_SPEC_H diff --git a/src/ray/common/task/task_spec.h b/src/ray/common/task/task_spec.h index e9eb78b40..0fd91578a 100644 --- a/src/ray/common/task/task_spec.h +++ b/src/ray/common/task/task_spec.h @@ -1,5 +1,4 @@ -#ifndef RAY_COMMON_TASK_TASK_SPEC_H -#define RAY_COMMON_TASK_TASK_SPEC_H +#pragma once #include #include @@ -208,5 +207,3 @@ struct hash { } }; } // namespace std - -#endif // RAY_COMMON_TASK_TASK_SPEC_H diff --git a/src/ray/common/task/task_util.h b/src/ray/common/task/task_util.h index 0833d82b2..df6529c98 100644 --- a/src/ray/common/task/task_util.h +++ b/src/ray/common/task/task_util.h @@ -1,5 +1,4 @@ -#ifndef RAY_COMMON_TASK_TASK_UTIL_H -#define RAY_COMMON_TASK_TASK_UTIL_H +#pragma once #include "ray/common/buffer.h" #include "ray/common/ray_object.h" @@ -144,5 +143,3 @@ class TaskSpecBuilder { }; } // namespace ray - -#endif // RAY_COMMON_TASK_TASK_UTIL_H diff --git a/src/ray/common/test_util.h b/src/ray/common/test_util.h index afa6ca38d..b48ca586c 100644 --- a/src/ray/common/test_util.h +++ b/src/ray/common/test_util.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_COMMON_TEST_UTIL_H -#define RAY_COMMON_TEST_UTIL_H +#pragma once #include @@ -117,5 +116,3 @@ class TestSetupUtil { }; } // namespace ray - -#endif // RAY_UTIL_TEST_UTIL_H diff --git a/src/ray/core_worker/actor_handle.h b/src/ray/core_worker/actor_handle.h index 8e49a0e5a..9ca4de445 100644 --- a/src/ray/core_worker/actor_handle.h +++ b/src/ray/core_worker/actor_handle.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_CORE_WORKER_ACTOR_HANDLE_H -#define RAY_CORE_WORKER_ACTOR_HANDLE_H +#pragma once #include @@ -89,5 +88,3 @@ class ActorHandle { }; } // namespace ray - -#endif // RAY_CORE_WORKER_ACTOR_HANDLE_H diff --git a/src/ray/core_worker/actor_manager.h b/src/ray/core_worker/actor_manager.h index f9b7d9c0b..a297c6b1e 100644 --- a/src/ray/core_worker/actor_manager.h +++ b/src/ray/core_worker/actor_manager.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_CORE_WORKER_ACTOR_MANAGER_H -#define RAY_CORE_WORKER_ACTOR_MANAGER_H +#pragma once #include "ray/core_worker/actor_handle.h" #include "ray/gcs/redis_gcs_client.h" @@ -46,5 +45,3 @@ class ActorManager : public ActorManagerInterface { }; } // namespace ray - -#endif // RAY_CORE_WORKER_ACTOR_MANAGER_H diff --git a/src/ray/core_worker/common.h b/src/ray/core_worker/common.h index 64c165dfe..6ecd49265 100644 --- a/src/ray/core_worker/common.h +++ b/src/ray/core_worker/common.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_CORE_WORKER_COMMON_H -#define RAY_CORE_WORKER_COMMON_H +#pragma once #include @@ -156,5 +155,3 @@ struct ActorCreationOptions { }; } // namespace ray - -#endif // RAY_CORE_WORKER_COMMON_H diff --git a/src/ray/core_worker/context.h b/src/ray/core_worker/context.h index cfea89b3f..b377c6e12 100644 --- a/src/ray/core_worker/context.h +++ b/src/ray/core_worker/context.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_CORE_WORKER_CONTEXT_H -#define RAY_CORE_WORKER_CONTEXT_H +#pragma once #include @@ -96,5 +95,3 @@ class WorkerContext { }; } // namespace ray - -#endif // RAY_CORE_WORKER_CONTEXT_H diff --git a/src/ray/core_worker/core_worker.h b/src/ray/core_worker/core_worker.h index 8cf30db26..728a67b8f 100644 --- a/src/ray/core_worker/core_worker.h +++ b/src/ray/core_worker/core_worker.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_CORE_WORKER_CORE_WORKER_H -#define RAY_CORE_WORKER_CORE_WORKER_H +#pragma once #include "absl/base/optimization.h" #include "absl/container/flat_hash_map.h" @@ -1081,5 +1080,3 @@ class CoreWorker : public rpc::CoreWorkerServiceHandler { }; } // namespace ray - -#endif // RAY_CORE_WORKER_CORE_WORKER_H diff --git a/src/ray/core_worker/fiber.h b/src/ray/core_worker/fiber.h index 09dde16df..ff0806da9 100644 --- a/src/ray/core_worker/fiber.h +++ b/src/ray/core_worker/fiber.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_CORE_WORKER_FIBER_H -#define RAY_CORE_WORKER_FIBER_H +#pragma once #include #include @@ -142,5 +141,3 @@ class FiberState { }; } // namespace ray - -#endif // RAY_CORE_WORKER_FIBER_H diff --git a/src/ray/core_worker/future_resolver.h b/src/ray/core_worker/future_resolver.h index 1d52114ff..dbe1965fc 100644 --- a/src/ray/core_worker/future_resolver.h +++ b/src/ray/core_worker/future_resolver.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_CORE_WORKER_FUTURE_RESOLVER_H -#define RAY_CORE_WORKER_FUTURE_RESOLVER_H +#pragma once #include @@ -60,5 +59,3 @@ class FutureResolver { }; } // namespace ray - -#endif // RAY_CORE_WORKER_FUTURE_RESOLVER_H diff --git a/src/ray/core_worker/lib/java/jni_utils.h b/src/ray/core_worker/lib/java/jni_utils.h index 687a5bc6a..15280cc8a 100644 --- a/src/ray/core_worker/lib/java/jni_utils.h +++ b/src/ray/core_worker/lib/java/jni_utils.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_COMMON_JAVA_JNI_UTILS_H -#define RAY_COMMON_JAVA_JNI_UTILS_H +#pragma once #include @@ -422,5 +421,3 @@ inline jobject NativeRayFunctionDescriptorToJavaStringList( RAY_LOG(FATAL) << "Unknown function descriptor type: " << function_descriptor->Type(); return NativeStringVectorToJavaStringList(env, std::vector()); } - -#endif // RAY_COMMON_JAVA_JNI_UTILS_H diff --git a/src/ray/core_worker/object_recovery_manager.h b/src/ray/core_worker/object_recovery_manager.h index b324714e6..9e8769f36 100644 --- a/src/ray/core_worker/object_recovery_manager.h +++ b/src/ray/core_worker/object_recovery_manager.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_CORE_WORKER_OBJECT_RECOVERY_MANAGER_H -#define RAY_CORE_WORKER_OBJECT_RECOVERY_MANAGER_H +#pragma once #include "absl/base/thread_annotations.h" #include "absl/synchronization/mutex.h" @@ -147,5 +146,3 @@ class ObjectRecoveryManager { }; } // namespace ray - -#endif // RAY_CORE_WORKER_OBJECT_RECOVERY_MANAGER_H diff --git a/src/ray/core_worker/profiling.h b/src/ray/core_worker/profiling.h index dd9551195..908fb77a3 100644 --- a/src/ray/core_worker/profiling.h +++ b/src/ray/core_worker/profiling.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_CORE_WORKER_PROFILING_H -#define RAY_CORE_WORKER_PROFILING_H +#pragma once #include "absl/base/thread_annotations.h" #include "absl/synchronization/mutex.h" @@ -81,5 +80,3 @@ class ProfileEvent { } // namespace worker } // namespace ray - -#endif // RAY_CORE_WORKER_PROFILING_H diff --git a/src/ray/core_worker/reference_count.h b/src/ray/core_worker/reference_count.h index 238735f30..9f73c4e44 100644 --- a/src/ray/core_worker/reference_count.h +++ b/src/ray/core_worker/reference_count.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_CORE_WORKER_REF_COUNT_H -#define RAY_CORE_WORKER_REF_COUNT_H +#pragma once #include "absl/base/thread_annotations.h" #include "absl/container/flat_hash_map.h" @@ -628,5 +627,3 @@ class ReferenceCounter { }; } // namespace ray - -#endif // RAY_CORE_WORKER_REF_COUNT_H diff --git a/src/ray/core_worker/store_provider/memory_store/memory_store.h b/src/ray/core_worker/store_provider/memory_store/memory_store.h index 9e791803e..8d7bdfe65 100644 --- a/src/ray/core_worker/store_provider/memory_store/memory_store.h +++ b/src/ray/core_worker/store_provider/memory_store/memory_store.h @@ -1,5 +1,4 @@ -#ifndef RAY_CORE_WORKER_MEMORY_STORE_H -#define RAY_CORE_WORKER_MEMORY_STORE_H +#pragma once #include "absl/container/flat_hash_map.h" #include "absl/container/flat_hash_set.h" @@ -177,5 +176,3 @@ class CoreWorkerMemoryStore { }; } // namespace ray - -#endif // RAY_CORE_WORKER_MEMORY_STORE_H diff --git a/src/ray/core_worker/store_provider/plasma_store_provider.h b/src/ray/core_worker/store_provider/plasma_store_provider.h index f2936763a..34626e058 100644 --- a/src/ray/core_worker/store_provider/plasma_store_provider.h +++ b/src/ray/core_worker/store_provider/plasma_store_provider.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_CORE_WORKER_PLASMA_STORE_PROVIDER_H -#define RAY_CORE_WORKER_PLASMA_STORE_PROVIDER_H +#pragma once #include "absl/container/flat_hash_map.h" #include "absl/container/flat_hash_set.h" @@ -164,5 +163,3 @@ class CoreWorkerPlasmaStoreProvider { }; } // namespace ray - -#endif // RAY_CORE_WORKER_PLASMA_STORE_PROVIDER_H diff --git a/src/ray/core_worker/task_manager.h b/src/ray/core_worker/task_manager.h index ef646ee42..e2aea2eee 100644 --- a/src/ray/core_worker/task_manager.h +++ b/src/ray/core_worker/task_manager.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_CORE_WORKER_TASK_MANAGER_H -#define RAY_CORE_WORKER_TASK_MANAGER_H +#pragma once #include "absl/base/thread_annotations.h" #include "absl/container/flat_hash_map.h" @@ -279,5 +278,3 @@ class TaskManager : public TaskFinisherInterface, public TaskResubmissionInterfa }; } // namespace ray - -#endif // RAY_CORE_WORKER_TASK_MANAGER_H diff --git a/src/ray/core_worker/transport/dependency_resolver.h b/src/ray/core_worker/transport/dependency_resolver.h index 7613e65a3..529b1a6ef 100644 --- a/src/ray/core_worker/transport/dependency_resolver.h +++ b/src/ray/core_worker/transport/dependency_resolver.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_CORE_WORKER_DEPENDENCY_RESOLVER_H -#define RAY_CORE_WORKER_DEPENDENCY_RESOLVER_H +#pragma once #include @@ -60,5 +59,3 @@ class LocalDependencyResolver { }; } // namespace ray - -#endif // RAY_CORE_WORKER_DEPENDENCY_RESOLVER_H diff --git a/src/ray/core_worker/transport/direct_actor_transport.h b/src/ray/core_worker/transport/direct_actor_transport.h index 7df2bf373..7549dd488 100644 --- a/src/ray/core_worker/transport/direct_actor_transport.h +++ b/src/ray/core_worker/transport/direct_actor_transport.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_CORE_WORKER_DIRECT_ACTOR_TRANSPORT_H -#define RAY_CORE_WORKER_DIRECT_ACTOR_TRANSPORT_H +#pragma once #include #include @@ -504,5 +503,3 @@ class CoreWorkerDirectTaskReceiver { }; } // namespace ray - -#endif // RAY_CORE_WORKER_DIRECT_ACTOR_TRANSPORT_H diff --git a/src/ray/core_worker/transport/direct_task_transport.h b/src/ray/core_worker/transport/direct_task_transport.h index 9be1d0323..ea80109fb 100644 --- a/src/ray/core_worker/transport/direct_task_transport.h +++ b/src/ray/core_worker/transport/direct_task_transport.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_CORE_WORKER_DIRECT_TASK_H -#define RAY_CORE_WORKER_DIRECT_TASK_H +#pragma once #include @@ -203,5 +202,3 @@ class CoreWorkerDirectTaskSubmitter { }; }; // namespace ray - -#endif // RAY_CORE_WORKER_DIRECT_TASK_H diff --git a/src/ray/core_worker/transport/raylet_transport.h b/src/ray/core_worker/transport/raylet_transport.h index 3772dedda..39c39e364 100644 --- a/src/ray/core_worker/transport/raylet_transport.h +++ b/src/ray/core_worker/transport/raylet_transport.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_CORE_WORKER_RAYLET_TRANSPORT_H -#define RAY_CORE_WORKER_RAYLET_TRANSPORT_H +#pragma once #include @@ -60,5 +59,3 @@ class CoreWorkerRayletTaskReceiver { }; } // namespace ray - -#endif // RAY_CORE_WORKER_RAYLET_TRANSPORT_H diff --git a/src/ray/gcs/accessor.h b/src/ray/gcs/accessor.h index 46bdbf5e8..e41673525 100644 --- a/src/ray/gcs/accessor.h +++ b/src/ray/gcs/accessor.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_ACCESSOR_H -#define RAY_GCS_ACCESSOR_H +#pragma once #include "ray/common/id.h" #include "ray/common/task/task_spec.h" @@ -669,5 +668,3 @@ class WorkerInfoAccessor { } // namespace gcs } // namespace ray - -#endif // RAY_GCS_ACCESSOR_H diff --git a/src/ray/gcs/asio.h b/src/ray/gcs/asio.h index 3cfa12cea..7f5d30c69 100644 --- a/src/ray/gcs/asio.h +++ b/src/ray/gcs/asio.h @@ -32,8 +32,7 @@ // Adapted from https://github.com/ryangraham/hiredis-boostasio-adapter // (Copyright 2018 Ryan Graham) -#ifndef RAY_GCS_ASIO_H -#define RAY_GCS_ASIO_H +#pragma once #include #include @@ -92,5 +91,3 @@ extern "C" void call_C_delRead(void *private_data); extern "C" void call_C_addWrite(void *private_data); extern "C" void call_C_delWrite(void *private_data); extern "C" void call_C_cleanup(void *private_data); - -#endif // RAY_GCS_ASIO_H diff --git a/src/ray/gcs/callback.h b/src/ray/gcs/callback.h index 80ea7a280..3d869d66f 100644 --- a/src/ray/gcs/callback.h +++ b/src/ray/gcs/callback.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_CALLBACK_H -#define RAY_GCS_CALLBACK_H +#pragma once #include #include @@ -66,5 +65,3 @@ using MapCallback = std::function &res } // namespace gcs } // namespace ray - -#endif // RAY_GCS_CALLBACK_H diff --git a/src/ray/gcs/entry_change_notification.h b/src/ray/gcs/entry_change_notification.h index 06c966253..14458f8f8 100644 --- a/src/ray/gcs/entry_change_notification.h +++ b/src/ray/gcs/entry_change_notification.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_ENTRY_CHANGE_NOTIFICATION_H -#define RAY_GCS_ENTRY_CHANGE_NOTIFICATION_H +#pragma once #include #include @@ -76,5 +75,3 @@ typedef MapNotification ResourceChangeNotif } // namespace gcs } // namespace ray - -#endif // RAY_GCS_ENTRY_CHANGE_NOTIFICATION_H diff --git a/src/ray/gcs/gcs_client.h b/src/ray/gcs/gcs_client.h index e61ea035c..8e2a7248b 100644 --- a/src/ray/gcs/gcs_client.h +++ b/src/ray/gcs/gcs_client.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_GCS_CLIENT_H -#define RAY_GCS_GCS_CLIENT_H +#pragma once #include #include @@ -159,5 +158,3 @@ class GcsClient : public std::enable_shared_from_this { } // namespace gcs } // namespace ray - -#endif // RAY_GCS_GCS_CLIENT_H diff --git a/src/ray/gcs/gcs_client/global_state_accessor.h b/src/ray/gcs/gcs_client/global_state_accessor.h index 2ea4ec6df..eb63e3c56 100644 --- a/src/ray/gcs/gcs_client/global_state_accessor.h +++ b/src/ray/gcs/gcs_client/global_state_accessor.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_GLOBAL_STATE_ACCESSOR_H -#define RAY_GCS_GLOBAL_STATE_ACCESSOR_H +#pragma once #include "ray/rpc/server_call.h" #include "service_based_gcs_client.h" @@ -151,5 +150,3 @@ class GlobalStateAccessor { } // namespace gcs } // namespace ray - -#endif // RAY_GCS_GLOBAL_STATE_ACCESSOR_H diff --git a/src/ray/gcs/gcs_client/service_based_accessor.h b/src/ray/gcs/gcs_client/service_based_accessor.h index db912d4ee..2fc7b7ff9 100644 --- a/src/ray/gcs/gcs_client/service_based_accessor.h +++ b/src/ray/gcs/gcs_client/service_based_accessor.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_SERVICE_BASED_ACCESSOR_H -#define RAY_GCS_SERVICE_BASED_ACCESSOR_H +#pragma once #include #include "ray/gcs/accessor.h" @@ -375,5 +374,3 @@ class ServiceBasedWorkerInfoAccessor : public WorkerInfoAccessor { } // namespace gcs } // namespace ray - -#endif // RAY_GCS_SERVICE_BASED_ACCESSOR_H diff --git a/src/ray/gcs/gcs_client/service_based_gcs_client.h b/src/ray/gcs/gcs_client/service_based_gcs_client.h index ba111fe9a..7295f4447 100644 --- a/src/ray/gcs/gcs_client/service_based_gcs_client.h +++ b/src/ray/gcs/gcs_client/service_based_gcs_client.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_SERVICE_BASED_GCS_CLIENT_H -#define RAY_GCS_SERVICE_BASED_GCS_CLIENT_H +#pragma once #include "ray/gcs/pubsub/gcs_pub_sub.h" #include "ray/gcs/redis_gcs_client.h" @@ -56,5 +55,3 @@ class RAY_EXPORT ServiceBasedGcsClient : public GcsClient { } // namespace gcs } // namespace ray - -#endif // RAY_GCS_SERVICE_BASED_GCS_CLIENT_H diff --git a/src/ray/gcs/gcs_server/error_info_handler_impl.h b/src/ray/gcs/gcs_server/error_info_handler_impl.h index 081437541..5830dc797 100644 --- a/src/ray/gcs/gcs_server/error_info_handler_impl.h +++ b/src/ray/gcs/gcs_server/error_info_handler_impl.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_ERROR_INFO_HANDLER_IMPL_H -#define RAY_GCS_ERROR_INFO_HANDLER_IMPL_H +#pragma once #include "ray/gcs/redis_gcs_client.h" #include "ray/rpc/gcs_server/gcs_rpc_server.h" @@ -37,5 +36,3 @@ class DefaultErrorInfoHandler : public rpc::ErrorInfoHandler { } // namespace rpc } // namespace ray - -#endif // RAY_GCS_ERROR_INFO_HANDLER_IMPL_H diff --git a/src/ray/gcs/gcs_server/gcs_actor_manager.h b/src/ray/gcs/gcs_server/gcs_actor_manager.h index dafcbc8cc..1698d26a0 100644 --- a/src/ray/gcs/gcs_server/gcs_actor_manager.h +++ b/src/ray/gcs/gcs_server/gcs_actor_manager.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_ACTOR_MANAGER_H -#define RAY_GCS_ACTOR_MANAGER_H +#pragma once #include #include @@ -289,5 +288,3 @@ class GcsActorManager : public rpc::ActorInfoHandler { } // namespace gcs } // namespace ray - -#endif // RAY_GCS_ACTOR_MANAGER_H diff --git a/src/ray/gcs/gcs_server/gcs_actor_scheduler.h b/src/ray/gcs/gcs_server/gcs_actor_scheduler.h index 284480290..f618cfe25 100644 --- a/src/ray/gcs/gcs_server/gcs_actor_scheduler.h +++ b/src/ray/gcs/gcs_server/gcs_actor_scheduler.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_ACTOR_SCHEDULER_H -#define RAY_GCS_ACTOR_SCHEDULER_H +#pragma once #include #include @@ -264,5 +263,3 @@ class GcsActorScheduler : public GcsActorSchedulerInterface { } // namespace gcs } // namespace ray - -#endif // RAY_GCS_ACTOR_SCHEDULER_H diff --git a/src/ray/gcs/gcs_server/gcs_node_manager.h b/src/ray/gcs/gcs_server/gcs_node_manager.h index dbcec1f30..34823079c 100644 --- a/src/ray/gcs/gcs_server/gcs_node_manager.h +++ b/src/ray/gcs/gcs_server/gcs_node_manager.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_NODE_MANAGER_H -#define RAY_GCS_NODE_MANAGER_H +#pragma once #include #include @@ -219,5 +218,3 @@ class GcsNodeManager : public rpc::NodeInfoHandler { } // namespace gcs } // namespace ray - -#endif // RAY_GCS_NODE_MANAGER_H diff --git a/src/ray/gcs/gcs_server/gcs_object_manager.h b/src/ray/gcs/gcs_server/gcs_object_manager.h index f6d55b09c..a0e1f31ed 100644 --- a/src/ray/gcs/gcs_server/gcs_object_manager.h +++ b/src/ray/gcs/gcs_server/gcs_object_manager.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_OBJECT_MANAGER_H -#define RAY_GCS_OBJECT_MANAGER_H +#pragma once #include "gcs_node_manager.h" #include "gcs_table_storage.h" @@ -140,5 +139,3 @@ class GcsObjectManager : public rpc::ObjectInfoHandler { } // namespace gcs } // namespace ray - -#endif // RAY_GCS_OBJECT_MANAGER_H diff --git a/src/ray/gcs/gcs_server/gcs_redis_failure_detector.h b/src/ray/gcs/gcs_server/gcs_redis_failure_detector.h index f3d42534c..8580c50ef 100644 --- a/src/ray/gcs/gcs_server/gcs_redis_failure_detector.h +++ b/src/ray/gcs/gcs_server/gcs_redis_failure_detector.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_REDIS_FAILURE_DETECTOR_H -#define RAY_GCS_REDIS_FAILURE_DETECTOR_H +#pragma once #include #include "ray/gcs/redis_context.h" @@ -67,5 +66,3 @@ class GcsRedisFailureDetector { } // namespace gcs } // namespace ray - -#endif // RAY_GCS_REDIS_FAILURE_DETECTOR_H diff --git a/src/ray/gcs/gcs_server/gcs_server.h b/src/ray/gcs/gcs_server/gcs_server.h index 3e607c785..49f8dfcda 100644 --- a/src/ray/gcs/gcs_server/gcs_server.h +++ b/src/ray/gcs/gcs_server/gcs_server.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_GCS_SERVER_H -#define RAY_GCS_GCS_SERVER_H +#pragma once #include #include @@ -156,5 +155,3 @@ class GcsServer { } // namespace gcs } // namespace ray - -#endif diff --git a/src/ray/gcs/gcs_server/gcs_table_storage.h b/src/ray/gcs/gcs_server/gcs_table_storage.h index 7f1c1e622..591a49d43 100644 --- a/src/ray/gcs/gcs_server/gcs_table_storage.h +++ b/src/ray/gcs/gcs_server/gcs_table_storage.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_GCS_TABLE_STORAGE_H_ -#define RAY_GCS_GCS_TABLE_STORAGE_H_ +#pragma once #include @@ -426,5 +425,3 @@ class InMemoryGcsTableStorage : public GcsTableStorage { } // namespace gcs } // namespace ray - -#endif // RAY_GCS_GCS_TABLE_STORAGE_H_ diff --git a/src/ray/gcs/gcs_server/job_info_handler_impl.h b/src/ray/gcs/gcs_server/job_info_handler_impl.h index 7b8531232..19d935c1d 100644 --- a/src/ray/gcs/gcs_server/job_info_handler_impl.h +++ b/src/ray/gcs/gcs_server/job_info_handler_impl.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_JOB_INFO_HANDLER_IMPL_H -#define RAY_GCS_JOB_INFO_HANDLER_IMPL_H +#pragma once #include "gcs_table_storage.h" #include "ray/gcs/pubsub/gcs_pub_sub.h" @@ -48,5 +47,3 @@ class DefaultJobInfoHandler : public rpc::JobInfoHandler { } // namespace rpc } // namespace ray - -#endif // RAY_GCS_JOB_INFO_HANDLER_IMPL_H diff --git a/src/ray/gcs/gcs_server/stats_handler_impl.h b/src/ray/gcs/gcs_server/stats_handler_impl.h index 6ee6a8a26..86599eb36 100644 --- a/src/ray/gcs/gcs_server/stats_handler_impl.h +++ b/src/ray/gcs/gcs_server/stats_handler_impl.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_STATS_HANDLER_IMPL_H -#define RAY_GCS_STATS_HANDLER_IMPL_H +#pragma once #include "gcs_table_storage.h" #include "ray/gcs/redis_gcs_client.h" @@ -42,5 +41,3 @@ class DefaultStatsHandler : public rpc::StatsHandler { } // namespace rpc } // namespace ray - -#endif // RAY_GCS_STATS_HANDLER_IMPL_H diff --git a/src/ray/gcs/gcs_server/task_info_handler_impl.h b/src/ray/gcs/gcs_server/task_info_handler_impl.h index 29fb8b9ff..d84dbd185 100644 --- a/src/ray/gcs/gcs_server/task_info_handler_impl.h +++ b/src/ray/gcs/gcs_server/task_info_handler_impl.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_TASK_INFO_HANDLER_IMPL_H -#define RAY_GCS_TASK_INFO_HANDLER_IMPL_H +#pragma once #include "gcs_table_storage.h" #include "ray/gcs/pubsub/gcs_pub_sub.h" @@ -56,5 +55,3 @@ class DefaultTaskInfoHandler : public rpc::TaskInfoHandler { } // namespace rpc } // namespace ray - -#endif // RAY_GCS_TASK_INFO_HANDLER_IMPL_H diff --git a/src/ray/gcs/gcs_server/test/gcs_server_test_util.h b/src/ray/gcs/gcs_server/test/gcs_server_test_util.h index e1b7e0dc2..b1d88eca6 100644 --- a/src/ray/gcs/gcs_server/test/gcs_server_test_util.h +++ b/src/ray/gcs/gcs_server/test/gcs_server_test_util.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_SERVER_TEST_UTIL_H -#define RAY_GCS_SERVER_TEST_UTIL_H +#pragma once #include #include @@ -317,5 +316,3 @@ struct GcsServerMocker { }; } // namespace ray - -#endif // RAY_GCS_SERVER_TEST_UTIL_H diff --git a/src/ray/gcs/gcs_server/test/gcs_table_storage_test_base.h b/src/ray/gcs/gcs_server/test/gcs_table_storage_test_base.h index 2457373f1..8940b71ee 100644 --- a/src/ray/gcs/gcs_server/test/gcs_table_storage_test_base.h +++ b/src/ray/gcs/gcs_server/test/gcs_table_storage_test_base.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#pragma once + #include "gtest/gtest.h" #include "ray/common/id.h" #include "ray/common/test_util.h" diff --git a/src/ray/gcs/gcs_server/worker_info_handler_impl.h b/src/ray/gcs/gcs_server/worker_info_handler_impl.h index b8d844111..1b556b14b 100644 --- a/src/ray/gcs/gcs_server/worker_info_handler_impl.h +++ b/src/ray/gcs/gcs_server/worker_info_handler_impl.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_WORKER_INFO_HANDLER_IMPL_H -#define RAY_GCS_WORKER_INFO_HANDLER_IMPL_H +#pragma once #include "gcs_table_storage.h" #include "ray/gcs/pubsub/gcs_pub_sub.h" @@ -50,5 +49,3 @@ class DefaultWorkerInfoHandler : public rpc::WorkerInfoHandler { } // namespace rpc } // namespace ray - -#endif // RAY_GCS_WORKER_INFO_HANDLER_IMPL_H diff --git a/src/ray/gcs/pb_util.h b/src/ray/gcs/pb_util.h index 10820dbc1..bc40c981e 100644 --- a/src/ray/gcs/pb_util.h +++ b/src/ray/gcs/pb_util.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_PB_UTIL_H -#define RAY_GCS_PB_UTIL_H +#pragma once #include @@ -115,5 +114,3 @@ inline std::shared_ptr CreateObjectLocationChang } // namespace gcs } // namespace ray - -#endif // RAY_GCS_PB_UTIL_H diff --git a/src/ray/gcs/pubsub/gcs_pub_sub.h b/src/ray/gcs/pubsub/gcs_pub_sub.h index 8b41e00ac..69a94b5fc 100644 --- a/src/ray/gcs/pubsub/gcs_pub_sub.h +++ b/src/ray/gcs/pubsub/gcs_pub_sub.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_GCS_PUB_SUB_H_ -#define RAY_GCS_GCS_PUB_SUB_H_ +#pragma once #include "absl/container/flat_hash_map.h" #include "absl/synchronization/mutex.h" @@ -158,5 +157,3 @@ class GcsPubSub { } // namespace gcs } // namespace ray - -#endif // RAY_GCS_GCS_PUB_SUB_H_ diff --git a/src/ray/gcs/redis_accessor.h b/src/ray/gcs/redis_accessor.h index 82ecb5cc0..2eebf3e30 100644 --- a/src/ray/gcs/redis_accessor.h +++ b/src/ray/gcs/redis_accessor.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_REDIS_ACCESSOR_H -#define RAY_GCS_REDIS_ACCESSOR_H +#pragma once #include #include "ray/common/id.h" @@ -467,5 +466,3 @@ class RedisWorkerInfoAccessor : public WorkerInfoAccessor { } // namespace gcs } // namespace ray - -#endif // RAY_GCS_REDIS_ACCESSOR_H diff --git a/src/ray/gcs/redis_async_context.h b/src/ray/gcs/redis_async_context.h index 198579bfd..31025069b 100644 --- a/src/ray/gcs/redis_async_context.h +++ b/src/ray/gcs/redis_async_context.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_REDIS_ASYNC_CONTEXT_H -#define RAY_GCS_REDIS_ASYNC_CONTEXT_H +#pragma once #include #include @@ -83,5 +82,3 @@ class RedisAsyncContext { } // namespace gcs } // namespace ray - -#endif // RAY_GCS_REDIS_ASYNC_CONTEXT_H diff --git a/src/ray/gcs/redis_client.h b/src/ray/gcs/redis_client.h index cc062f8e0..c4e422fb7 100644 --- a/src/ray/gcs/redis_client.h +++ b/src/ray/gcs/redis_client.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_REDIS_CLIENT_H -#define RAY_GCS_REDIS_CLIENT_H +#pragma once #include #include @@ -107,5 +106,3 @@ class RedisClient { } // namespace gcs } // namespace ray - -#endif // RAY_GCS_REDIS_CLIENT_H \ No newline at end of file diff --git a/src/ray/gcs/redis_context.h b/src/ray/gcs/redis_context.h index 317277fb9..688a2fc08 100644 --- a/src/ray/gcs/redis_context.h +++ b/src/ray/gcs/redis_context.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_REDIS_CONTEXT_H -#define RAY_GCS_REDIS_CONTEXT_H +#pragma once #include #include @@ -366,5 +365,3 @@ std::shared_ptr RedisContext::RunSync( } // namespace gcs } // namespace ray - -#endif // RAY_GCS_REDIS_CONTEXT_H diff --git a/src/ray/gcs/redis_gcs_client.h b/src/ray/gcs/redis_gcs_client.h index 0d00b1e77..cccecc0aa 100644 --- a/src/ray/gcs/redis_gcs_client.h +++ b/src/ray/gcs/redis_gcs_client.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_REDIS_GCS_CLIENT_H -#define RAY_GCS_REDIS_GCS_CLIENT_H +#pragma once #include #include @@ -138,5 +137,3 @@ class RAY_EXPORT RedisGcsClient : public GcsClient { } // namespace gcs } // namespace ray - -#endif // RAY_GCS_REDIS_GCS_CLIENT_H diff --git a/src/ray/gcs/redis_module/chain_module.h b/src/ray/gcs/redis_module/chain_module.h index b5d226a90..c0d92a656 100644 --- a/src/ray/gcs/redis_module/chain_module.h +++ b/src/ray/gcs/redis_module/chain_module.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_CHAIN_MODULE_H_ -#define RAY_CHAIN_MODULE_H_ +#pragma once #include @@ -72,5 +71,3 @@ class RedisChainModule { int ChainReplicate(RedisModuleCtx *ctx, RedisModuleString **argv, int argc, NodeFunc node_func, TailFunc tail_func); }; - -#endif // RAY_CHAIN_MODULE_H_ diff --git a/src/ray/gcs/redis_module/redis_string.h b/src/ray/gcs/redis_module/redis_string.h index f5ba2efc3..7185ed59e 100644 --- a/src/ray/gcs/redis_module/redis_string.h +++ b/src/ray/gcs/redis_module/redis_string.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_REDIS_STRING_H_ -#define RAY_REDIS_STRING_H_ +#pragma once #include #include @@ -89,5 +88,3 @@ std::string RedisString_ToString(RedisModuleString *string) { const char *data = RedisModule_StringPtrLen(string, &size); return std::string(data, size); } - -#endif // RAY_REDIS_STRING_H_ diff --git a/src/ray/gcs/redis_module/redismodule.h b/src/ray/gcs/redis_module/redismodule.h index 17a308a63..36383e7a3 100644 --- a/src/ray/gcs/redis_module/redismodule.h +++ b/src/ray/gcs/redis_module/redismodule.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef REDISMODULE_H -#define REDISMODULE_H +#pragma once #include #include @@ -415,4 +414,3 @@ static int RedisModule_Init(RedisModuleCtx *ctx, const char *name, int ver, int #define RedisModuleString robj #endif /* REDISMODULE_CORE */ -#endif /* REDISMOUDLE_H */ diff --git a/src/ray/gcs/store_client/in_memory_store_client.h b/src/ray/gcs/store_client/in_memory_store_client.h index f51480c15..00a9fe25e 100644 --- a/src/ray/gcs/store_client/in_memory_store_client.h +++ b/src/ray/gcs/store_client/in_memory_store_client.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_STORE_CLIENT_IN_MEMORY_STORE_CLIENT_H -#define RAY_GCS_STORE_CLIENT_IN_MEMORY_STORE_CLIENT_H +#pragma once #include "absl/container/flat_hash_map.h" #include "absl/synchronization/mutex.h" @@ -85,5 +84,3 @@ class InMemoryStoreClient : public StoreClient { } // namespace gcs } // namespace ray - -#endif // RAY_GCS_STORE_CLIENT_IN_MEMORY_STORE_CLIENT_H diff --git a/src/ray/gcs/store_client/redis_store_client.h b/src/ray/gcs/store_client/redis_store_client.h index 8f8eb748c..2a25b369f 100644 --- a/src/ray/gcs/store_client/redis_store_client.h +++ b/src/ray/gcs/store_client/redis_store_client.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_STORE_CLIENT_REDIS_STORE_CLIENT_H -#define RAY_GCS_STORE_CLIENT_REDIS_STORE_CLIENT_H +#pragma once #include "absl/container/flat_hash_set.h" #include "ray/gcs/redis_client.h" @@ -139,5 +138,3 @@ class RedisStoreClient : public StoreClient { } // namespace gcs } // namespace ray - -#endif // RAY_GCS_STORE_CLIENT_REDIS_STORE_CLIENT_H diff --git a/src/ray/gcs/store_client/store_client.h b/src/ray/gcs/store_client/store_client.h index a59fe87ec..a2dfd07fe 100644 --- a/src/ray/gcs/store_client/store_client.h +++ b/src/ray/gcs/store_client/store_client.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_STORE_CLIENT_STORE_CLIENT_H -#define RAY_GCS_STORE_CLIENT_STORE_CLIENT_H +#pragma once #include #include @@ -120,5 +119,3 @@ class StoreClient { } // namespace gcs } // namespace ray - -#endif // RAY_GCS_STORE_CLIENT_STORE_CLIENT_H diff --git a/src/ray/gcs/store_client/test/store_client_test_base.h b/src/ray/gcs/store_client/test/store_client_test_base.h index 1705e49dc..0b062d976 100644 --- a/src/ray/gcs/store_client/test/store_client_test_base.h +++ b/src/ray/gcs/store_client/test/store_client_test_base.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#pragma once + #include #include #include diff --git a/src/ray/gcs/subscription_executor.h b/src/ray/gcs/subscription_executor.h index bc8f7a4a3..2ecde7791 100644 --- a/src/ray/gcs/subscription_executor.h +++ b/src/ray/gcs/subscription_executor.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_SUBSCRIPTION_EXECUTOR_H -#define RAY_GCS_SUBSCRIPTION_EXECUTOR_H +#pragma once #include #include @@ -106,5 +105,3 @@ class SubscriptionExecutor { } // namespace gcs } // namespace ray - -#endif // RAY_GCS_SUBSCRIPTION_EXECUTOR_H diff --git a/src/ray/gcs/tables.h b/src/ray/gcs/tables.h index cd65db869..8433e508a 100644 --- a/src/ray/gcs/tables.h +++ b/src/ray/gcs/tables.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_TABLES_H -#define RAY_GCS_TABLES_H +#pragma once #include #include @@ -1024,5 +1023,3 @@ class ClientTable : public Log { } // namespace gcs } // namespace ray - -#endif // RAY_GCS_TABLES_H diff --git a/src/ray/gcs/test/accessor_test_base.h b/src/ray/gcs/test/accessor_test_base.h index 798fb6432..7ce8d0bfa 100644 --- a/src/ray/gcs/test/accessor_test_base.h +++ b/src/ray/gcs/test/accessor_test_base.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_ACCESSOR_TEST_BASE_H -#define RAY_GCS_ACCESSOR_TEST_BASE_H +#pragma once #include #include @@ -94,5 +93,3 @@ class AccessorTestBase : public ::testing::Test { } // namespace gcs } // namespace ray - -#endif // RAY_GCS_ACCESSOR_TEST_BASE_H diff --git a/src/ray/gcs/test/gcs_test_util.h b/src/ray/gcs/test/gcs_test_util.h index 1d122d169..1c5ce09bc 100644 --- a/src/ray/gcs/test/gcs_test_util.h +++ b/src/ray/gcs/test/gcs_test_util.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_GCS_TEST_UTIL_H -#define RAY_GCS_TEST_UTIL_H +#pragma once #include #include @@ -136,5 +135,3 @@ struct Mocker { }; } // namespace ray - -#endif // RAY_GCS_TEST_UTIL_H diff --git a/src/ray/object_manager/object_buffer_pool.h b/src/ray/object_manager/object_buffer_pool.h index aea4ec62d..851645469 100644 --- a/src/ray/object_manager/object_buffer_pool.h +++ b/src/ray/object_manager/object_buffer_pool.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_OBJECT_MANAGER_OBJECT_BUFFER_POOL_H -#define RAY_OBJECT_MANAGER_OBJECT_BUFFER_POOL_H +#pragma once #include #include @@ -211,5 +210,3 @@ class ObjectBufferPool { }; } // namespace ray - -#endif // RAY_OBJECT_MANAGER_OBJECT_BUFFER_POOL_H diff --git a/src/ray/object_manager/object_directory.h b/src/ray/object_manager/object_directory.h index 47e287418..ad391bfd0 100644 --- a/src/ray/object_manager/object_directory.h +++ b/src/ray/object_manager/object_directory.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_OBJECT_MANAGER_OBJECT_DIRECTORY_H -#define RAY_OBJECT_MANAGER_OBJECT_DIRECTORY_H +#pragma once #include #include @@ -197,5 +196,3 @@ class ObjectDirectory : public ObjectDirectoryInterface { }; } // namespace ray - -#endif // RAY_OBJECT_MANAGER_OBJECT_DIRECTORY_H diff --git a/src/ray/object_manager/object_manager.h b/src/ray/object_manager/object_manager.h index f4bc3f9c1..a1b821f8b 100644 --- a/src/ray/object_manager/object_manager.h +++ b/src/ray/object_manager/object_manager.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_OBJECT_MANAGER_OBJECT_MANAGER_H -#define RAY_OBJECT_MANAGER_OBJECT_MANAGER_H +#pragma once #include #include @@ -454,5 +453,3 @@ class ObjectManager : public ObjectManagerInterface, }; } // namespace ray - -#endif // RAY_OBJECT_MANAGER_OBJECT_MANAGER_H diff --git a/src/ray/object_manager/object_store_notification_manager.h b/src/ray/object_manager/object_store_notification_manager.h index af9ec010c..204cb8e96 100644 --- a/src/ray/object_manager/object_store_notification_manager.h +++ b/src/ray/object_manager/object_store_notification_manager.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_OBJECT_MANAGER_OBJECT_STORE_CLIENT_H -#define RAY_OBJECT_MANAGER_OBJECT_STORE_CLIENT_H +#pragma once #include #include @@ -99,5 +98,3 @@ class ObjectStoreNotificationManager { }; } // namespace ray - -#endif // RAY_OBJECT_MANAGER_OBJECT_STORE_CLIENT_H diff --git a/src/ray/object_manager/plasma/client.h b/src/ray/object_manager/plasma/client.h index a701221bb..27c57d636 100644 --- a/src/ray/object_manager/plasma/client.h +++ b/src/ray/object_manager/plasma/client.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef PLASMA_CLIENT_H -#define PLASMA_CLIENT_H +#pragma once #include #include @@ -308,5 +307,3 @@ class ARROW_EXPORT PlasmaClient { }; } // namespace plasma - -#endif // PLASMA_CLIENT_H diff --git a/src/ray/object_manager/plasma/common.h b/src/ray/object_manager/plasma/common.h index c72a139c6..7b623cf75 100644 --- a/src/ray/object_manager/plasma/common.h +++ b/src/ray/object_manager/plasma/common.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef PLASMA_COMMON_H -#define PLASMA_COMMON_H +#pragma once #include @@ -123,5 +122,3 @@ typedef std::unordered_map> ObjectTa struct PlasmaStoreInfo; extern const PlasmaStoreInfo* plasma_config; } // namespace plasma - -#endif // PLASMA_COMMON_H diff --git a/src/ray/object_manager/plasma/compat.h b/src/ray/object_manager/plasma/compat.h index ce751da1d..504b523da 100644 --- a/src/ray/object_manager/plasma/compat.h +++ b/src/ray/object_manager/plasma/compat.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef PLASMA_COMPAT_H -#define PLASMA_COMPAT_H +#pragma once // Workaround for multithreading on XCode 9, see // https://issues.apache.org/jira/browse/ARROW-1622 and @@ -31,5 +30,3 @@ typedef __darwin_mach_port_t mach_port_t; mach_port_t pthread_mach_thread_np(pthread_t); #endif /* _MACH_PORT_T */ #endif /* __APPLE__ */ - -#endif // PLASMA_COMPAT_H diff --git a/src/ray/object_manager/plasma/events.h b/src/ray/object_manager/plasma/events.h index 765be9c01..7b08d4443 100644 --- a/src/ray/object_manager/plasma/events.h +++ b/src/ray/object_manager/plasma/events.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef PLASMA_EVENTS -#define PLASMA_EVENTS +#pragma once #include #include @@ -107,5 +106,3 @@ class EventLoop { }; } // namespace plasma - -#endif // PLASMA_EVENTS diff --git a/src/ray/object_manager/plasma/eviction_policy.h b/src/ray/object_manager/plasma/eviction_policy.h index 10ea94013..d646dbd3f 100644 --- a/src/ray/object_manager/plasma/eviction_policy.h +++ b/src/ray/object_manager/plasma/eviction_policy.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef PLASMA_EVICTION_POLICY_H -#define PLASMA_EVICTION_POLICY_H +#pragma once #include #include @@ -208,5 +207,3 @@ class EvictionPolicy { }; } // namespace plasma - -#endif // PLASMA_EVICTION_POLICY_H diff --git a/src/ray/object_manager/plasma/external_store.h b/src/ray/object_manager/plasma/external_store.h index 2be27d5ca..41df8ec33 100644 --- a/src/ray/object_manager/plasma/external_store.h +++ b/src/ray/object_manager/plasma/external_store.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef EXTERNAL_STORE_H -#define EXTERNAL_STORE_H +#pragma once #include #include @@ -119,5 +118,3 @@ class ExternalStores { store##Class singleton_##store = store##Class() } // namespace plasma - -#endif // EXTERNAL_STORE_H diff --git a/src/ray/object_manager/plasma/fling.h b/src/ray/object_manager/plasma/fling.h index d1582c3c8..e3cb20e9b 100644 --- a/src/ray/object_manager/plasma/fling.h +++ b/src/ray/object_manager/plasma/fling.h @@ -23,6 +23,8 @@ // // Most of the code is from https://github.com/sharvil/flingfd +#pragma once + #include #include #include diff --git a/src/ray/object_manager/plasma/hash_table_store.h b/src/ray/object_manager/plasma/hash_table_store.h index 94335af26..a3e9f082f 100644 --- a/src/ray/object_manager/plasma/hash_table_store.h +++ b/src/ray/object_manager/plasma/hash_table_store.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef HASH_TABLE_STORE_H -#define HASH_TABLE_STORE_H +#pragma once #include #include @@ -49,5 +48,3 @@ class HashTableStore : public ExternalStore { }; } // namespace plasma - -#endif // HASH_TABLE_STORE_H diff --git a/src/ray/object_manager/plasma/io.h b/src/ray/object_manager/plasma/io.h index 08cfc0d83..4a0844f7c 100644 --- a/src/ray/object_manager/plasma/io.h +++ b/src/ray/object_manager/plasma/io.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef PLASMA_IO_H -#define PLASMA_IO_H +#pragma once #include #include @@ -65,5 +64,3 @@ int AcceptClient(int socket_fd); std::unique_ptr ReadMessageAsync(int sock); } // namespace plasma - -#endif // PLASMA_IO_H diff --git a/src/ray/object_manager/plasma/malloc.h b/src/ray/object_manager/plasma/malloc.h index 92d6537e9..edc0763a5 100644 --- a/src/ray/object_manager/plasma/malloc.h +++ b/src/ray/object_manager/plasma/malloc.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef PLASMA_MALLOC_H -#define PLASMA_MALLOC_H +#pragma once #include #include @@ -50,5 +49,3 @@ struct MmapRecord { extern std::unordered_map mmap_records; } // namespace plasma - -#endif // PLASMA_MALLOC_H diff --git a/src/ray/object_manager/plasma/plasma.h b/src/ray/object_manager/plasma/plasma.h index a0d203be9..5dbc502e8 100644 --- a/src/ray/object_manager/plasma/plasma.h +++ b/src/ray/object_manager/plasma/plasma.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef PLASMA_PLASMA_H -#define PLASMA_PLASMA_H +#pragma once #include #include @@ -173,5 +172,3 @@ std::unique_ptr CreatePlasmaNotificationBuffer( std::vector& object_info); } // namespace plasma - -#endif // PLASMA_PLASMA_H diff --git a/src/ray/object_manager/plasma/plasma_allocator.h b/src/ray/object_manager/plasma/plasma_allocator.h index d9d4cc0ec..f0e23246b 100644 --- a/src/ray/object_manager/plasma/plasma_allocator.h +++ b/src/ray/object_manager/plasma/plasma_allocator.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef PLASMA_ALLOCATOR_H -#define PLASMA_ALLOCATOR_H +#pragma once #include #include @@ -60,5 +59,3 @@ class PlasmaAllocator { }; } // namespace plasma - -#endif // ARROW_PLASMA_ALLOCATOR_H diff --git a/src/ray/object_manager/plasma/protocol.h b/src/ray/object_manager/plasma/protocol.h index 392dae804..d48a509b8 100644 --- a/src/ray/object_manager/plasma/protocol.h +++ b/src/ray/object_manager/plasma/protocol.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef PLASMA_PROTOCOL_H -#define PLASMA_PROTOCOL_H +#pragma once #include #include @@ -247,5 +246,3 @@ Status SendRefreshLRUReply(int sock); Status ReadRefreshLRUReply(uint8_t* data, size_t size); } // namespace plasma - -#endif /* PLASMA_PROTOCOL */ diff --git a/src/ray/object_manager/plasma/quota_aware_policy.h b/src/ray/object_manager/plasma/quota_aware_policy.h index 0700c9322..fbb7030f2 100644 --- a/src/ray/object_manager/plasma/quota_aware_policy.h +++ b/src/ray/object_manager/plasma/quota_aware_policy.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef PLASMA_QUOTA_AWARE_POLICY_H -#define PLASMA_QUOTA_AWARE_POLICY_H +#pragma once #include #include @@ -87,5 +86,3 @@ class QuotaAwarePolicy : public EvictionPolicy { }; } // namespace plasma - -#endif // PLASMA_EVICTION_POLICY_H diff --git a/src/ray/object_manager/plasma/store.h b/src/ray/object_manager/plasma/store.h index 8eab7677c..f1a24788d 100644 --- a/src/ray/object_manager/plasma/store.h +++ b/src/ray/object_manager/plasma/store.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef PLASMA_STORE_H -#define PLASMA_STORE_H +#pragma once #include #include @@ -246,5 +245,3 @@ class PlasmaStore { }; } // namespace plasma - -#endif // PLASMA_STORE_H diff --git a/src/ray/object_manager/plasma/store_runner.h b/src/ray/object_manager/plasma/store_runner.h index 89d52be63..942c1e4d3 100644 --- a/src/ray/object_manager/plasma/store_runner.h +++ b/src/ray/object_manager/plasma/store_runner.h @@ -1,5 +1,4 @@ -#ifndef PLASMA_STORE_RUNNER_H -#define PLASMA_STORE_RUNNER_H +#pragma once #include @@ -34,5 +33,3 @@ class PlasmaStoreRunner { extern std::unique_ptr plasma_store_runner; } // namespace plasma - -#endif // PLASMA_STORE_RUNNER_H diff --git a/src/ray/object_manager/plasma/test_util.h b/src/ray/object_manager/plasma/test_util.h index bc81cb1cf..1151b3fbd 100644 --- a/src/ray/object_manager/plasma/test_util.h +++ b/src/ray/object_manager/plasma/test_util.h @@ -15,8 +15,7 @@ // specific language governing permissions and limitations // under the License. -#ifndef PLASMA_TEST_UTIL_H -#define PLASMA_TEST_UTIL_H +#pragma once #include #include @@ -45,5 +44,3 @@ ObjectID random_object_id() { } while (false); } // namespace plasma - -#endif // PLASMA_TEST_UTIL_H diff --git a/src/ray/raylet/actor_registration.h b/src/ray/raylet/actor_registration.h index 833603330..0e156f0fd 100644 --- a/src/ray/raylet/actor_registration.h +++ b/src/ray/raylet/actor_registration.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_RAYLET_ACTOR_REGISTRATION_H -#define RAY_RAYLET_ACTOR_REGISTRATION_H +#pragma once #include @@ -180,5 +179,3 @@ class ActorRegistration { } // namespace raylet } // namespace ray - -#endif // RAY_RAYLET_ACTOR_REGISTRATION_H diff --git a/src/ray/raylet/lineage_cache.h b/src/ray/raylet/lineage_cache.h index 2b58ada17..36b219f0a 100644 --- a/src/ray/raylet/lineage_cache.h +++ b/src/ray/raylet/lineage_cache.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_RAYLET_LINEAGE_CACHE_H -#define RAY_RAYLET_LINEAGE_CACHE_H +#pragma once #include #include @@ -326,5 +325,3 @@ class LineageCache { } // namespace raylet } // namespace ray - -#endif // RAY_RAYLET_LINEAGE_CACHE_H diff --git a/src/ray/raylet/mock_gcs_client.h b/src/ray/raylet/mock_gcs_client.h index 40443ea6c..2f4ea41e3 100644 --- a/src/ray/raylet/mock_gcs_client.h +++ b/src/ray/raylet/mock_gcs_client.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_RAYLET_MOCK_GCS_CLIENT_H -#define RAY_RAYLET_MOCK_GCS_CLIENT_H +#pragma once #include #include @@ -101,5 +100,3 @@ class GcsClient { std::unique_ptr client_table_; }; } // namespace ray - -#endif // RAY_RAYLET_MOCK_GCS_CLIENT_H diff --git a/src/ray/raylet/monitor.h b/src/ray/raylet/monitor.h index 791b761f8..17a4006f9 100644 --- a/src/ray/raylet/monitor.h +++ b/src/ray/raylet/monitor.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_RAYLET_MONITOR_H -#define RAY_RAYLET_MONITOR_H +#pragma once #include #include @@ -74,5 +73,3 @@ class Monitor { } // namespace raylet } // namespace ray - -#endif // RAY_RAYLET_MONITOR_H diff --git a/src/ray/raylet/node_manager.h b/src/ray/raylet/node_manager.h index 68d37f70d..4a52eab36 100644 --- a/src/ray/raylet/node_manager.h +++ b/src/ray/raylet/node_manager.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_RAYLET_NODE_MANAGER_H -#define RAY_RAYLET_NODE_MANAGER_H +#pragma once #include @@ -789,5 +788,3 @@ class NodeManager : public rpc::NodeManagerServiceHandler { } // namespace raylet } // end namespace ray - -#endif // RAY_RAYLET_NODE_MANAGER_H diff --git a/src/ray/raylet/raylet.h b/src/ray/raylet/raylet.h index 53bbff053..3f4140ce2 100644 --- a/src/ray/raylet/raylet.h +++ b/src/ray/raylet/raylet.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_RAYLET_RAYLET_H -#define RAY_RAYLET_RAYLET_H +#pragma once #include @@ -103,5 +102,3 @@ class Raylet { } // namespace raylet } // namespace ray - -#endif // RAY_RAYLET_RAYLET_H diff --git a/src/ray/raylet/raylet_client.h b/src/ray/raylet/raylet_client.h index 2203cf4a2..8678582e8 100644 --- a/src/ray/raylet/raylet_client.h +++ b/src/ray/raylet/raylet_client.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAYLET_CLIENT_H -#define RAYLET_CLIENT_H +#pragma once #include #include @@ -340,5 +339,3 @@ class RayletClient : public PinObjectsInterface, } // namespace raylet } // namespace ray - -#endif diff --git a/src/ray/raylet/reconstruction_policy.h b/src/ray/raylet/reconstruction_policy.h index 18962284f..f3eb8fa93 100644 --- a/src/ray/raylet/reconstruction_policy.h +++ b/src/ray/raylet/reconstruction_policy.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_RAYLET_RECONSTRUCTION_POLICY_H -#define RAY_RAYLET_RECONSTRUCTION_POLICY_H +#pragma once #include #include @@ -166,5 +165,3 @@ class ReconstructionPolicy : public ReconstructionPolicyInterface { } // namespace raylet } // namespace ray - -#endif // RAY_RAYLET_RECONSTRUCTION_POLICY_H diff --git a/src/ray/raylet/scheduling_policy.h b/src/ray/raylet/scheduling_policy.h index 39ce36620..62349ca95 100644 --- a/src/ray/raylet/scheduling_policy.h +++ b/src/ray/raylet/scheduling_policy.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_RAYLET_SCHEDULING_POLICY_H -#define RAY_RAYLET_SCHEDULING_POLICY_H +#pragma once #include #include @@ -72,5 +71,3 @@ class SchedulingPolicy { } // namespace raylet } // namespace ray - -#endif // RAY_RAYLET_SCHEDULING_POLICY_H diff --git a/src/ray/raylet/scheduling_queue.h b/src/ray/raylet/scheduling_queue.h index 17c3d0f28..029998827 100644 --- a/src/ray/raylet/scheduling_queue.h +++ b/src/ray/raylet/scheduling_queue.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_RAYLET_SCHEDULING_QUEUE_H -#define RAY_RAYLET_SCHEDULING_QUEUE_H +#pragma once #include #include @@ -366,5 +365,3 @@ class SchedulingQueue { } // namespace raylet } // namespace ray - -#endif // RAY_RAYLET_SCHEDULING_QUEUE_H diff --git a/src/ray/raylet/task_dependency_manager.h b/src/ray/raylet/task_dependency_manager.h index 3fa9b5564..dbddf4c8b 100644 --- a/src/ray/raylet/task_dependency_manager.h +++ b/src/ray/raylet/task_dependency_manager.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_RAYLET_TASK_DEPENDENCY_MANAGER_H -#define RAY_RAYLET_TASK_DEPENDENCY_MANAGER_H +#pragma once // clang-format off #include "ray/common/id.h" @@ -268,5 +267,3 @@ class TaskDependencyManager { } // namespace raylet } // namespace ray - -#endif // RAY_RAYLET_TASK_DEPENDENCY_MANAGER_H diff --git a/src/ray/raylet/worker.h b/src/ray/raylet/worker.h index e777b8e11..94a38c4b1 100644 --- a/src/ray/raylet/worker.h +++ b/src/ray/raylet/worker.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_RAYLET_WORKER_H -#define RAY_RAYLET_WORKER_H +#pragma once #include @@ -202,5 +201,3 @@ class Worker { } // namespace raylet } // namespace ray - -#endif // RAY_RAYLET_WORKER_H diff --git a/src/ray/raylet/worker_pool.h b/src/ray/raylet/worker_pool.h index 7f80fb9d5..322d8b230 100644 --- a/src/ray/raylet/worker_pool.h +++ b/src/ray/raylet/worker_pool.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_RAYLET_WORKER_POOL_H -#define RAY_RAYLET_WORKER_POOL_H +#pragma once #include @@ -290,5 +289,3 @@ class WorkerPool { } // namespace raylet } // namespace ray - -#endif // RAY_RAYLET_WORKER_POOL_H diff --git a/src/ray/rpc/client_call.h b/src/ray/rpc/client_call.h index a61ac3788..23194d105 100644 --- a/src/ray/rpc/client_call.h +++ b/src/ray/rpc/client_call.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_RPC_CLIENT_CALL_H -#define RAY_RPC_CLIENT_CALL_H +#pragma once #include #include @@ -281,5 +280,3 @@ class ClientCallManager { } // namespace rpc } // namespace ray - -#endif diff --git a/src/ray/rpc/gcs_server/gcs_rpc_client.h b/src/ray/rpc/gcs_server/gcs_rpc_client.h index 7720d9bc5..2884b0f50 100644 --- a/src/ray/rpc/gcs_server/gcs_rpc_client.h +++ b/src/ray/rpc/gcs_server/gcs_rpc_client.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_RPC_GCS_RPC_CLIENT_H -#define RAY_RPC_GCS_RPC_CLIENT_H +#pragma once #include @@ -291,5 +290,3 @@ class GcsRpcClient { } // namespace rpc } // namespace ray - -#endif // RAY_RPC_GCS_RPC_CLIENT_H diff --git a/src/ray/rpc/gcs_server/gcs_rpc_server.h b/src/ray/rpc/gcs_server/gcs_rpc_server.h index 30f2846a4..5f572ca02 100644 --- a/src/ray/rpc/gcs_server/gcs_rpc_server.h +++ b/src/ray/rpc/gcs_server/gcs_rpc_server.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_RPC_GCS_RPC_SERVER_H -#define RAY_RPC_GCS_RPC_SERVER_H +#pragma once #include "ray/protobuf/gcs_service.grpc.pb.h" #include "ray/rpc/grpc_server.h" @@ -468,5 +467,3 @@ using WorkerInfoHandler = WorkerInfoGcsServiceHandler; } // namespace rpc } // namespace ray - -#endif // RAY_RPC_GCS_RPC_SERVER_H diff --git a/src/ray/rpc/grpc_client.h b/src/ray/rpc/grpc_client.h index 437956592..49745f239 100644 --- a/src/ray/rpc/grpc_client.h +++ b/src/ray/rpc/grpc_client.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_RPC_GRPC_CLIENT_H -#define RAY_RPC_GRPC_CLIENT_H +#pragma once #include #include @@ -109,5 +108,3 @@ class GrpcClient { } // namespace rpc } // namespace ray - -#endif diff --git a/src/ray/rpc/grpc_server.h b/src/ray/rpc/grpc_server.h index 68537cae0..9a1d74454 100644 --- a/src/ray/rpc/grpc_server.h +++ b/src/ray/rpc/grpc_server.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_RPC_GRPC_SERVER_H -#define RAY_RPC_GRPC_SERVER_H +#pragma once #include @@ -160,5 +159,3 @@ class GrpcService { } // namespace rpc } // namespace ray - -#endif diff --git a/src/ray/rpc/node_manager/node_manager_client.h b/src/ray/rpc/node_manager/node_manager_client.h index a35883439..976990ea6 100644 --- a/src/ray/rpc/node_manager/node_manager_client.h +++ b/src/ray/rpc/node_manager/node_manager_client.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_RPC_NODE_MANAGER_CLIENT_H -#define RAY_RPC_NODE_MANAGER_CLIENT_H +#pragma once #include @@ -118,5 +117,3 @@ class NodeManagerWorkerClient } // namespace rpc } // namespace ray - -#endif // RAY_RPC_NODE_MANAGER_CLIENT_H diff --git a/src/ray/rpc/node_manager/node_manager_server.h b/src/ray/rpc/node_manager/node_manager_server.h index b1a0ea9cf..de80ae260 100644 --- a/src/ray/rpc/node_manager/node_manager_server.h +++ b/src/ray/rpc/node_manager/node_manager_server.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_RPC_NODE_MANAGER_SERVER_H -#define RAY_RPC_NODE_MANAGER_SERVER_H +#pragma once #include "ray/protobuf/node_manager.grpc.pb.h" #include "ray/protobuf/node_manager.pb.h" @@ -110,5 +109,3 @@ class NodeManagerGrpcService : public GrpcService { } // namespace rpc } // namespace ray - -#endif diff --git a/src/ray/rpc/object_manager/object_manager_client.h b/src/ray/rpc/object_manager/object_manager_client.h index b17dbb25a..c601d50d8 100644 --- a/src/ray/rpc/object_manager/object_manager_client.h +++ b/src/ray/rpc/object_manager/object_manager_client.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_RPC_OBJECT_MANAGER_CLIENT_H -#define RAY_RPC_OBJECT_MANAGER_CLIENT_H +#pragma once #include #include @@ -93,5 +92,3 @@ class ObjectManagerClient { } // namespace rpc } // namespace ray - -#endif // RAY_RPC_OBJECT_MANAGER_CLIENT_H diff --git a/src/ray/rpc/object_manager/object_manager_server.h b/src/ray/rpc/object_manager/object_manager_server.h index a76446551..834f313c2 100644 --- a/src/ray/rpc/object_manager/object_manager_server.h +++ b/src/ray/rpc/object_manager/object_manager_server.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_RPC_OBJECT_MANAGER_SERVER_H -#define RAY_RPC_OBJECT_MANAGER_SERVER_H +#pragma once #include "ray/protobuf/object_manager.grpc.pb.h" #include "ray/protobuf/object_manager.pb.h" @@ -79,5 +78,3 @@ class ObjectManagerGrpcService : public GrpcService { } // namespace rpc } // namespace ray - -#endif diff --git a/src/ray/rpc/server_call.h b/src/ray/rpc/server_call.h index 36f3354cf..62295093a 100644 --- a/src/ray/rpc/server_call.h +++ b/src/ray/rpc/server_call.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_RPC_SERVER_CALL_H -#define RAY_RPC_SERVER_CALL_H +#pragma once #include #include @@ -310,5 +309,3 @@ class ServerCallFactoryImpl : public ServerCallFactory { } // namespace rpc } // namespace ray - -#endif diff --git a/src/ray/rpc/worker/core_worker_client.h b/src/ray/rpc/worker/core_worker_client.h index 15a3cafdc..9cc235518 100644 --- a/src/ray/rpc/worker/core_worker_client.h +++ b/src/ray/rpc/worker/core_worker_client.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_RPC_CORE_WORKER_CLIENT_H -#define RAY_RPC_CORE_WORKER_CLIENT_H +#pragma once #include @@ -341,5 +340,3 @@ class CoreWorkerClient : public std::enable_shared_from_this, } // namespace rpc } // namespace ray - -#endif // RAY_RPC_CORE_WORKER_CLIENT_H diff --git a/src/ray/rpc/worker/core_worker_server.h b/src/ray/rpc/worker/core_worker_server.h index 0e2f78f79..a6da78276 100644 --- a/src/ray/rpc/worker/core_worker_server.h +++ b/src/ray/rpc/worker/core_worker_server.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_RPC_CORE_WORKER_SERVER_H -#define RAY_RPC_CORE_WORKER_SERVER_H +#pragma once #include "ray/protobuf/core_worker.grpc.pb.h" #include "ray/protobuf/core_worker.pb.h" @@ -103,5 +102,3 @@ class CoreWorkerGrpcService : public GrpcService { } // namespace rpc } // namespace ray - -#endif // RAY_RPC_CORE_WORKER_SERVER_H diff --git a/src/ray/stats/metric.h b/src/ray/stats/metric.h index 396514224..964383daa 100644 --- a/src/ray/stats/metric.h +++ b/src/ray/stats/metric.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_STATS_METRIC_H -#define RAY_STATS_METRIC_H +#pragma once #include #include @@ -145,5 +144,3 @@ class Sum : public Metric { } // namespace stats } // namespace ray - -#endif // RAY_STATS_METRIC_H diff --git a/src/ray/stats/metric_defs.h b/src/ray/stats/metric_defs.h index bd9d45e1d..4c84e8fbb 100644 --- a/src/ray/stats/metric_defs.h +++ b/src/ray/stats/metric_defs.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_STATS_METRIC_DEFS_H -#define RAY_STATS_METRIC_DEFS_H +#pragma once /// The definitions of metrics that you can use everywhere. /// @@ -75,5 +74,3 @@ static Gauge ReconstructionPolicyStats( static Gauge ConnectionPoolStats("connection_pool_stats", "Stats the connection pool metrics.", "pcs", {ValueTypeKey}); - -#endif // RAY_STATS_METRIC_DEFS_H diff --git a/src/ray/stats/stats.h b/src/ray/stats/stats.h index e4139759c..637220c7c 100644 --- a/src/ray/stats/stats.h +++ b/src/ray/stats/stats.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_STATS_STATS_H -#define RAY_STATS_STATS_H +#pragma once #include #include @@ -72,5 +71,3 @@ static void Init(const std::string &address, const TagsType &global_tags, } // namespace stats } // namespace ray - -#endif // RAY_STATS_STATS_H diff --git a/src/ray/stats/tag_defs.h b/src/ray/stats/tag_defs.h index 675545520..28edd54b7 100644 --- a/src/ray/stats/tag_defs.h +++ b/src/ray/stats/tag_defs.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_STATS_TAG_DEFS_H -#define RAY_STATS_TAG_DEFS_H +#pragma once /// The definitions of tag keys that you can use every where. /// You can follow these examples to define and register your tag keys. @@ -38,5 +37,3 @@ static const TagKeyType DriverPidKey = TagKeyType::Register("DriverPid"); static const TagKeyType ResourceNameKey = TagKeyType::Register("ResourceName"); static const TagKeyType ValueTypeKey = TagKeyType::Register("ValueType"); - -#endif // RAY_STATS_TAG_DEFS_H diff --git a/src/ray/util/asio_util.h b/src/ray/util/asio_util.h index 7e7091605..8ef2a7296 100644 --- a/src/ray/util/asio_util.h +++ b/src/ray/util/asio_util.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_ASIO_UTIL_H -#define RAY_ASIO_UTIL_H +#pragma once #include @@ -27,5 +26,3 @@ inline void execute_after(boost::asio::io_context &io_context, } }); } - -#endif // RAY_ASIO_UTIL_H diff --git a/src/ray/util/filesystem.h b/src/ray/util/filesystem.h index 58c465897..4de558f29 100644 --- a/src/ray/util/filesystem.h +++ b/src/ray/util/filesystem.h @@ -1,5 +1,4 @@ -#ifndef RAY_UTIL_FILESYSTEM_H -#define RAY_UTIL_FILESYSTEM_H +#pragma once #include #include @@ -74,5 +73,3 @@ std::string JoinPaths(std::string base, Paths... components) { return base; } } // namespace ray - -#endif // RAY_UTIL_UTIL_H diff --git a/src/ray/util/io_service_pool.h b/src/ray/util/io_service_pool.h index a923e7859..e9c1abc87 100644 --- a/src/ray/util/io_service_pool.h +++ b/src/ray/util/io_service_pool.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_UTIL_IO_SERVICE_POOL_H -#define RAY_UTIL_IO_SERVICE_POOL_H +#pragma once #include #include @@ -79,5 +78,3 @@ inline std::vector IOServicePool::GetAll() { } } // namespace ray - -#endif // RAY_UTIL_IO_SERVICE_POOL_H diff --git a/src/ray/util/logging.h b/src/ray/util/logging.h index d4a40ad63..6b1f8b65c 100644 --- a/src/ray/util/logging.h +++ b/src/ray/util/logging.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_UTIL_LOGGING_H -#define RAY_UTIL_LOGGING_H +#pragma once #include #include @@ -171,5 +170,3 @@ class Voidify { }; } // namespace ray - -#endif // RAY_UTIL_LOGGING_H diff --git a/src/ray/util/macros.h b/src/ray/util/macros.h index 065c26e11..80b6cf758 100644 --- a/src/ray/util/macros.h +++ b/src/ray/util/macros.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_UTIL_MACROS_H -#define RAY_UTIL_MACROS_H +#pragma once // From Google gutil #ifndef RAY_DISALLOW_COPY_AND_ASSIGN @@ -54,5 +53,3 @@ #else #define RAY_MUST_USE_RESULT #endif - -#endif // RAY_UTIL_MACROS_H diff --git a/src/ray/util/memory.h b/src/ray/util/memory.h index 5fc4bb9bb..d1322800b 100644 --- a/src/ray/util/memory.h +++ b/src/ray/util/memory.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_UTIL_MEMORY_H -#define RAY_UTIL_MEMORY_H +#pragma once #include @@ -25,5 +24,3 @@ void parallel_memcopy(uint8_t *dst, const uint8_t *src, int64_t nbytes, uintptr_t block_size, int num_threads); } // namespace ray - -#endif // RAY_UTIL_MEMORY_H diff --git a/src/ray/util/ordered_set.h b/src/ray/util/ordered_set.h index 12b4bf642..2b0f7d5cf 100644 --- a/src/ray/util/ordered_set.h +++ b/src/ray/util/ordered_set.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_UTIL_ORDERED_SET_H -#define RAY_UTIL_ORDERED_SET_H +#pragma once #include #include @@ -81,5 +80,3 @@ class ordered_set { elements_type elements_; positions_type positions_; }; - -#endif // RAY_UTIL_ORDERED_SET_H diff --git a/src/ray/util/process.h b/src/ray/util/process.h index b9eab73bc..d75da3b55 100644 --- a/src/ray/util/process.h +++ b/src/ray/util/process.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_UTIL_PROCESS_H -#define RAY_UTIL_PROCESS_H +#pragma once #ifdef __linux__ #include @@ -102,5 +101,3 @@ struct hash { }; } // namespace std - -#endif diff --git a/src/ray/util/sample.h b/src/ray/util/sample.h index c62fdba8e..6c6861ff0 100644 --- a/src/ray/util/sample.h +++ b/src/ray/util/sample.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_UTIL_SAMPLE_H -#define RAY_UTIL_SAMPLE_H +#pragma once #include @@ -44,5 +43,3 @@ void random_sample(Iterator begin, Iterator end, size_t num_elements, } return; } - -#endif // RAY_UTIL_SAMPLE_H diff --git a/src/ray/util/sequencer.h b/src/ray/util/sequencer.h index 03107b260..3631ce728 100644 --- a/src/ray/util/sequencer.h +++ b/src/ray/util/sequencer.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_UTIL_SEQUENCER_H_ -#define RAY_UTIL_SEQUENCER_H_ +#pragma once #include #include @@ -77,5 +76,3 @@ class Sequencer { }; } // namespace ray - -#endif // RAY_UTIL_SEQUENCER_H_ diff --git a/src/ray/util/util.h b/src/ray/util/util.h index 782f211b9..56327b0cd 100644 --- a/src/ray/util/util.h +++ b/src/ray/util/util.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_UTIL_UTIL_H -#define RAY_UTIL_UTIL_H +#pragma once #include #include @@ -166,5 +165,3 @@ void FillRandom(T *data) { (*data)[i] = static_cast(dist(generator)); } } - -#endif // RAY_UTIL_UTIL_H diff --git a/src/ray/util/visibility.h b/src/ray/util/visibility.h index c7746537b..cf04015bf 100644 --- a/src/ray/util/visibility.h +++ b/src/ray/util/visibility.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RAY_UTIL_VISIBILITY_H -#define RAY_UTIL_VISIBILITY_H +#pragma once #if defined(_WIN32) || defined(__CYGWIN__) #if defined(_MSC_VER) @@ -56,5 +55,3 @@ #else #define RAY_TEMPLATE_EXPORT #endif - -#endif // RAY_UTIL_VISIBILITY_H diff --git a/streaming/src/channel.h b/streaming/src/channel.h index e5b2454bd..2588687a4 100644 --- a/streaming/src/channel.h +++ b/streaming/src/channel.h @@ -1,5 +1,4 @@ -#ifndef RAY_CHANNEL_H -#define RAY_CHANNEL_H +#pragma once #include "config/streaming_config.h" #include "queue/queue_handler.h" @@ -198,5 +197,3 @@ class MockConsumer : public ConsumerChannel { } // namespace streaming } // namespace ray - -#endif // RAY_CHANNEL_H diff --git a/streaming/src/config/streaming_config.h b/streaming/src/config/streaming_config.h index ba4a77228..8f0cf2d5b 100644 --- a/streaming/src/config/streaming_config.h +++ b/streaming/src/config/streaming_config.h @@ -1,5 +1,4 @@ -#ifndef RAY_STREAMING_CONFIG_H -#define RAY_STREAMING_CONFIG_H +#pragma once #include #include @@ -67,4 +66,3 @@ class StreamingConfig { }; } // namespace streaming } // namespace ray -#endif // RAY_STREAMING_CONFIG_H diff --git a/streaming/src/data_reader.h b/streaming/src/data_reader.h index e371472c8..ac0d1c469 100644 --- a/streaming/src/data_reader.h +++ b/streaming/src/data_reader.h @@ -1,5 +1,4 @@ -#ifndef RAY_DATA_READER_H -#define RAY_DATA_READER_H +#pragma once #include #include @@ -128,4 +127,3 @@ class DataReader { }; } // namespace streaming } // namespace ray -#endif // RAY_DATA_READER_H diff --git a/streaming/src/data_writer.h b/streaming/src/data_writer.h index 673720a77..43e3f7189 100644 --- a/streaming/src/data_writer.h +++ b/streaming/src/data_writer.h @@ -1,5 +1,4 @@ -#ifndef RAY_DATA_WRITER_H -#define RAY_DATA_WRITER_H +#pragma once #include #include @@ -135,4 +134,3 @@ class DataWriter { }; } // namespace streaming } // namespace ray -#endif // RAY_DATA_WRITER_H diff --git a/streaming/src/event_service.h b/streaming/src/event_service.h index c5f2b117e..03a08385a 100644 --- a/streaming/src/event_service.h +++ b/streaming/src/event_service.h @@ -1,5 +1,5 @@ -#ifndef RAY_STREAMING_EVENT_SERVER_H -#define RAY_STREAMING_EVENT_SERVER_H +#pragma once + #include #include #include @@ -139,4 +139,3 @@ class EventService { }; } // namespace streaming } // namespace ray -#endif // RAY_STREAMING_EVENT_SERVER_H diff --git a/streaming/src/flow_control.h b/streaming/src/flow_control.h index 54c194492..0fdcb3291 100644 --- a/streaming/src/flow_control.h +++ b/streaming/src/flow_control.h @@ -1,5 +1,5 @@ -#ifndef RAY_STREAMING_FLOW_CONTROL_H -#define RAY_STREAMING_FLOW_CONTROL_H +#pragma once + #include "channel.h" namespace ray { @@ -42,4 +42,3 @@ class UnconsumedSeqFlowControl : public FlowControl { }; } // namespace streaming } // namespace ray -#endif // RAY_STREAMING_FLOW_CONTROL_H diff --git a/streaming/src/lib/java/streaming_jni_common.h b/streaming/src/lib/java/streaming_jni_common.h index acf6c13e8..b66088309 100644 --- a/streaming/src/lib/java/streaming_jni_common.h +++ b/streaming/src/lib/java/streaming_jni_common.h @@ -1,5 +1,4 @@ -#ifndef RAY_STREAMING_JNI_COMMON_H -#define RAY_STREAMING_JNI_COMMON_H +#pragma once #include #include @@ -104,4 +103,3 @@ std::shared_ptr FunctionDescriptorToRayFunction( void ParseChannelInitParameters( JNIEnv *env, jobject param_obj, std::vector ¶meter_vec); -#endif // RAY_STREAMING_JNI_COMMON_H diff --git a/streaming/src/message/message.h b/streaming/src/message/message.h index 086faeb25..66a78e9f4 100644 --- a/streaming/src/message/message.h +++ b/streaming/src/message/message.h @@ -1,5 +1,4 @@ -#ifndef RAY_MESSAGE_H -#define RAY_MESSAGE_H +#pragma once #include @@ -89,5 +88,3 @@ class StreamingMessage { } // namespace streaming } // namespace ray - -#endif // RAY_MESSAGE_H diff --git a/streaming/src/message/message_bundle.h b/streaming/src/message/message_bundle.h index 38e986cab..6052a56a4 100644 --- a/streaming/src/message/message_bundle.h +++ b/streaming/src/message/message_bundle.h @@ -1,5 +1,4 @@ -#ifndef RAY_MESSAGE_BUNDLE_H -#define RAY_MESSAGE_BUNDLE_H +#pragma once #include #include @@ -178,5 +177,3 @@ class StreamingMessageBundle : public StreamingMessageBundleMeta { }; } // namespace streaming } // namespace ray - -#endif // RAY_MESSAGE_BUNDLE_H diff --git a/streaming/src/message/priority_queue.h b/streaming/src/message/priority_queue.h index f49fad7c3..994dc2c88 100644 --- a/streaming/src/message/priority_queue.h +++ b/streaming/src/message/priority_queue.h @@ -1,5 +1,4 @@ -#ifndef RAY_PRIORITY_QUEUE_H -#define RAY_PRIORITY_QUEUE_H +#pragma once #include #include @@ -49,5 +48,3 @@ class PriorityQueue { }; } // namespace streaming } // namespace ray - -#endif // RAY_PRIORITY_QUEUE_H diff --git a/streaming/src/queue/message.h b/streaming/src/queue/message.h index 795d2393e..9f9205ae7 100644 --- a/streaming/src/queue/message.h +++ b/streaming/src/queue/message.h @@ -1,5 +1,4 @@ -#ifndef _STREAMING_QUEUE_MESSAGE_H_ -#define _STREAMING_QUEUE_MESSAGE_H_ +#pragma once #include "protobuf/streaming_queue.pb.h" #include "ray/common/buffer.h" @@ -232,4 +231,3 @@ class TestCheckStatusRspMsg : public Message { } // namespace streaming } // namespace ray -#endif diff --git a/streaming/src/queue/queue.h b/streaming/src/queue/queue.h index e6b097711..f27472a53 100644 --- a/streaming/src/queue/queue.h +++ b/streaming/src/queue/queue.h @@ -1,5 +1,5 @@ -#ifndef _STREAMING_QUEUE_H_ -#define _STREAMING_QUEUE_H_ +#pragma once + #include #include #include @@ -210,4 +210,3 @@ class ReaderQueue : public Queue { } // namespace streaming } // namespace ray -#endif diff --git a/streaming/src/queue/queue_client.h b/streaming/src/queue/queue_client.h index ea48093de..48eab09ad 100644 --- a/streaming/src/queue/queue_client.h +++ b/streaming/src/queue/queue_client.h @@ -1,5 +1,5 @@ -#ifndef _STREAMING_QUEUE_CLIENT_H_ -#define _STREAMING_QUEUE_CLIENT_H_ +#pragma once + #include "queue_handler.h" #include "transport.h" @@ -50,4 +50,3 @@ class WriterClient { }; } // namespace streaming } // namespace ray -#endif \ No newline at end of file diff --git a/streaming/src/queue/queue_handler.h b/streaming/src/queue/queue_handler.h index d3c497f3b..d778415c5 100644 --- a/streaming/src/queue/queue_handler.h +++ b/streaming/src/queue/queue_handler.h @@ -1,5 +1,4 @@ -#ifndef _QUEUE_SERVICE_H_ -#define _QUEUE_SERVICE_H_ +#pragma once #include #include @@ -177,4 +176,3 @@ class DownstreamQueueMessageHandler : public QueueMessageHandler { } // namespace streaming } // namespace ray -#endif diff --git a/streaming/src/queue/queue_item.h b/streaming/src/queue/queue_item.h index cfff3c7e5..e27066c0f 100644 --- a/streaming/src/queue/queue_item.h +++ b/streaming/src/queue/queue_item.h @@ -1,5 +1,5 @@ -#ifndef _STREAMING_QUEUE_ITEM_H_ -#define _STREAMING_QUEUE_ITEM_H_ +#pragma once + #include #include #include @@ -106,4 +106,3 @@ typedef std::shared_ptr QueueItemPtr; } // namespace streaming } // namespace ray -#endif diff --git a/streaming/src/queue/transport.h b/streaming/src/queue/transport.h index 2a3969064..111e1bb96 100644 --- a/streaming/src/queue/transport.h +++ b/streaming/src/queue/transport.h @@ -1,5 +1,4 @@ -#ifndef _STREAMING_QUEUE_TRANSPORT_H_ -#define _STREAMING_QUEUE_TRANSPORT_H_ +#pragma once #include "ray/common/id.h" #include "ray/core_worker/core_worker.h" @@ -66,4 +65,3 @@ class Transport { }; } // namespace streaming } // namespace ray -#endif diff --git a/streaming/src/queue/utils.h b/streaming/src/queue/utils.h index 38021faef..a532e0744 100644 --- a/streaming/src/queue/utils.h +++ b/streaming/src/queue/utils.h @@ -1,5 +1,5 @@ -#ifndef _STREAMING_QUEUE_UTILS_H_ -#define _STREAMING_QUEUE_UTILS_H_ +#pragma once + #include #include #include @@ -47,4 +47,3 @@ class PromiseWrapper { } // namespace streaming } // namespace ray -#endif diff --git a/streaming/src/ring_buffer.h b/streaming/src/ring_buffer.h index 920001b5b..3ae1ff515 100644 --- a/streaming/src/ring_buffer.h +++ b/streaming/src/ring_buffer.h @@ -1,5 +1,4 @@ -#ifndef RAY_RING_BUFFER_H -#define RAY_RING_BUFFER_H +#pragma once #include #include @@ -216,5 +215,3 @@ class StreamingRingBuffer { typedef std::shared_ptr StreamingRingBufferPtr; } // namespace streaming } // namespace ray - -#endif // RAY_RING_BUFFER_H diff --git a/streaming/src/runtime_context.h b/streaming/src/runtime_context.h index fa6075ba7..4b6f49ab8 100644 --- a/streaming/src/runtime_context.h +++ b/streaming/src/runtime_context.h @@ -1,5 +1,5 @@ -#ifndef RAY_STREAMING_H -#define RAY_STREAMING_H +#pragma once + #include #include "config/streaming_config.h" @@ -38,5 +38,3 @@ class RuntimeContext { } // namespace streaming } // namespace ray - -#endif // RAY_STREAMING_H diff --git a/streaming/src/status.h b/streaming/src/status.h index 10095d643..dde6f386a 100644 --- a/streaming/src/status.h +++ b/streaming/src/status.h @@ -1,5 +1,5 @@ -#ifndef RAY_STREAMING_STATUS_H -#define RAY_STREAMING_STATUS_H +#pragma once + #include #include #include @@ -43,5 +43,3 @@ static inline std::ostream &operator<<(std::ostream &os, const StreamingStatus & } // namespace streaming } // namespace ray - -#endif // RAY_STREAMING_STATUS_H diff --git a/streaming/src/test/queue_tests_base.h b/streaming/src/test/queue_tests_base.h index 613132484..b78fb3fbc 100644 --- a/streaming/src/test/queue_tests_base.h +++ b/streaming/src/test/queue_tests_base.h @@ -1,3 +1,5 @@ +#pragma once + #include "ray/common/test_util.h" #include "ray/util/filesystem.h" diff --git a/streaming/src/util/streaming_logging.h b/streaming/src/util/streaming_logging.h index ba6b0b45d..11525d373 100644 --- a/streaming/src/util/streaming_logging.h +++ b/streaming/src/util/streaming_logging.h @@ -1,5 +1,5 @@ -#ifndef RAY_STREAMING_LOGGING_H -#define RAY_STREAMING_LOGGING_H +#pragma once + #include "ray/util/logging.h" #define STREAMING_LOG RAY_LOG @@ -7,5 +7,3 @@ namespace ray { namespace streaming {} // namespace streaming } // namespace ray - -#endif // RAY_STREAMING_LOGGING_H diff --git a/streaming/src/util/streaming_util.h b/streaming/src/util/streaming_util.h index a6665f4fe..8f28dc3ec 100644 --- a/streaming/src/util/streaming_util.h +++ b/streaming/src/util/streaming_util.h @@ -1,5 +1,5 @@ -#ifndef RAY_STREAMING_UTIL_H -#define RAY_STREAMING_UTIL_H +#pragma once + #include #include #include @@ -95,5 +95,3 @@ class Util { }; } // namespace streaming } // namespace ray - -#endif // RAY_STREAMING_UTIL_H