Skip to content

Commit

Permalink
IWYU fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mdemoret-nv committed Oct 19, 2023
1 parent a04e0b3 commit a10efed
Show file tree
Hide file tree
Showing 60 changed files with 29 additions and 111 deletions.
6 changes: 2 additions & 4 deletions cpp/mrc/include/mrc/coroutines/scheduler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,17 @@

#pragma once

#include "mrc/core/bitmap.hpp"
#include "mrc/coroutines/task.hpp"
#include "mrc/coroutines/task_container.hpp"

#include <coroutine>
#include <functional>
#include <cstddef>
#include <memory>
#include <mutex>
#include <string>

namespace mrc::coroutines {

class TaskContainer;

/**
* @brief Scheduler base class
*
Expand Down
3 changes: 1 addition & 2 deletions cpp/mrc/include/mrc/coroutines/task_container.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,11 @@

#pragma once

#include "mrc/coroutines/concepts/executor.hpp"
#include "mrc/coroutines/task.hpp"

#include <atomic>
#include <coroutine>
#include <cstddef>
#include <iostream>
#include <list>
#include <memory>
#include <mutex>
Expand Down
1 change: 0 additions & 1 deletion cpp/mrc/src/internal/codable/decodable_storage_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include <cstring>
#include <optional>
#include <ostream>
#include <string>

namespace mrc::codable {

Expand Down
1 change: 0 additions & 1 deletion cpp/mrc/src/internal/codable/storage_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

#include <glog/logging.h>

#include <cstdint>
#include <optional>

namespace mrc::codable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include <glog/logging.h>

#include <algorithm>
#include <cstdint>
#include <iterator>
#include <ostream>
#include <set>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include "mrc/core/error.hpp"
#include "mrc/edge/edge_builder.hpp"
#include "mrc/edge/edge_writable.hpp"
#include "mrc/node/rx_sink.hpp"
#include "mrc/protos/architect.pb.h"
#include "mrc/runnable/launch_control.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <glog/logging.h>
#include <google/protobuf/any.pb.h>

#include <cstdint>
#include <sstream>
#include <utility>

Expand Down
4 changes: 0 additions & 4 deletions cpp/mrc/src/internal/memory/device_resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,12 @@
#include "mrc/types.hpp"
#include "mrc/utils/bytes_to_string.hpp"

#include <boost/fiber/future/future.hpp>
#include <glog/logging.h>

#include <map>
#include <set>
#include <sstream>
#include <string>
#include <thread>
#include <utility>
#include <vector>

namespace mrc::memory {

Expand Down
3 changes: 0 additions & 3 deletions cpp/mrc/src/internal/memory/host_resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,10 @@
#include "mrc/types.hpp"
#include "mrc/utils/bytes_to_string.hpp"

#include <boost/fiber/future/future.hpp>
#include <glog/logging.h>

#include <map>
#include <memory>
#include <ostream>
#include <set>
#include <string>
#include <thread>
#include <utility>
Expand Down
1 change: 0 additions & 1 deletion cpp/mrc/src/internal/network/network_resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "mrc/core/task_queue.hpp"
#include "mrc/types.hpp"

#include <boost/fiber/future/future.hpp>
#include <glog/logging.h>

#include <utility>
Expand Down
2 changes: 0 additions & 2 deletions cpp/mrc/src/internal/pipeline/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@
#include <algorithm>
#include <exception>
#include <iterator>
#include <map>
#include <memory>
#include <ostream>
#include <set>
#include <utility>
#include <vector>

namespace mrc::pipeline {

Expand Down
2 changes: 0 additions & 2 deletions cpp/mrc/src/internal/pubsub/publisher_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@
#include <glog/logging.h>
#include <rxcpp/rx.hpp>

#include <map>
#include <optional>
#include <utility>
#include <vector>

namespace mrc::pubsub {

Expand Down
2 changes: 1 addition & 1 deletion cpp/mrc/src/internal/pubsub/subscriber_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "internal/runtime/partition.hpp"

#include "mrc/edge/edge_builder.hpp"
#include "mrc/edge/edge_writable.hpp"
#include "mrc/node/operators/router.hpp"
#include "mrc/node/rx_sink.hpp"
#include "mrc/protos/codable.pb.h"
Expand All @@ -41,7 +42,6 @@
#include <optional>
#include <ostream>
#include <utility>
#include <vector>

namespace mrc::pubsub {

Expand Down
2 changes: 0 additions & 2 deletions cpp/mrc/src/internal/runnable/fiber_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
#include "mrc/runnable/types.hpp"
#include "mrc/types.hpp"

#include <boost/fiber/future/future.hpp>

#include <utility>

namespace mrc::runnable {
Expand Down
1 change: 0 additions & 1 deletion cpp/mrc/src/internal/runnable/fiber_engines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

#include <memory>
#include <ostream>
#include <string>
#include <utility>

namespace mrc::runnable {
Expand Down
1 change: 0 additions & 1 deletion cpp/mrc/src/internal/runnable/runnable_resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "mrc/runnable/types.hpp"
#include "mrc/types.hpp"

#include <boost/fiber/future/future.hpp>
#include <glog/logging.h>

#include <map>
Expand Down
1 change: 0 additions & 1 deletion cpp/mrc/src/internal/runnable/thread_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "mrc/runnable/types.hpp"
#include "mrc/types.hpp"

#include <boost/fiber/future/future.hpp>
#include <boost/fiber/future/packaged_task.hpp>

#include <optional>
Expand Down
1 change: 0 additions & 1 deletion cpp/mrc/src/internal/runnable/thread_engines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <cstdint>
#include <memory>
#include <ostream>
#include <string>
#include <utility>

namespace mrc::runnable {
Expand Down
2 changes: 1 addition & 1 deletion cpp/mrc/src/internal/segment/builder_definition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
#include "mrc/modules/properties/persistent.hpp" // IWYU pragma: keep
#include "mrc/modules/segment_modules.hpp"
#include "mrc/node/port_registry.hpp"
#include "mrc/runnable/launchable.hpp"
#include "mrc/segment/egress_port.hpp" // IWYU pragma: keep
#include "mrc/segment/ingress_port.hpp" // IWYU pragma: keep
#include "mrc/segment/initializers.hpp"
#include "mrc/segment/object.hpp"
#include "mrc/types.hpp"

Expand Down
2 changes: 1 addition & 1 deletion cpp/mrc/src/internal/system/host_partition_provider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include "internal/system/host_partition_provider.hpp"

#include "internal/system/host_partition.hpp"
#include "internal/system/partitions.hpp"
#include "internal/system/system.hpp"

Expand All @@ -25,7 +26,6 @@
#include <vector>

namespace mrc::system {
class HostPartition;

HostPartitionProvider::HostPartitionProvider(const SystemProvider& _system, std::size_t _host_partition_id) :
SystemProvider(_system),
Expand Down
1 change: 1 addition & 0 deletions cpp/mrc/src/internal/system/partition_provider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include "internal/system/partition_provider.hpp"

#include "internal/system/partition.hpp"
#include "internal/system/partitions.hpp"
#include "internal/system/system.hpp"

Expand Down
3 changes: 2 additions & 1 deletion cpp/mrc/src/internal/system/threading_resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@

#include "internal/system/fiber_manager.hpp"

#include "mrc/types.hpp"

#include <boost/fiber/future/future.hpp>

#include <map>
#include <vector>

namespace mrc::system {
Expand Down
1 change: 0 additions & 1 deletion cpp/mrc/src/internal/ucx/receive_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "mrc/types.hpp"

#include <boost/fiber/future/async.hpp>
#include <boost/fiber/future/future.hpp>
#include <boost/fiber/operations.hpp>
#include <boost/fiber/policy.hpp> // for launch, launch::post
#include <ucp/api/ucp.h> // for ucp_tag_probe_nb, ucp_tag_recv_info
Expand Down
1 change: 0 additions & 1 deletion cpp/mrc/src/internal/ucx/ucx_resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include "mrc/cuda/common.hpp"
#include "mrc/types.hpp"

#include <boost/fiber/future/future.hpp>
#include <cuda_runtime.h>
#include <glog/logging.h>

Expand Down
1 change: 0 additions & 1 deletion cpp/mrc/src/public/core/thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "mrc/coroutines/thread_pool.hpp"

#include <concepts>
#include <cstddef>
#include <iomanip>
#include <sstream>
#include <thread>
Expand Down
2 changes: 2 additions & 0 deletions cpp/mrc/src/public/coroutines/scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@

#include <glog/logging.h>

#include <ostream>
#include <thread>
#include <utility>

namespace mrc::coroutines {

Expand Down
4 changes: 3 additions & 1 deletion cpp/mrc/src/public/coroutines/task_container.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@

#include <glog/logging.h>

#include <exception>
#include <iostream>
#include <mutex>
#include <thread>
#include <stdexcept>
#include <utility>

namespace mrc::coroutines {
Expand Down
1 change: 0 additions & 1 deletion cpp/mrc/src/public/coroutines/thread_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#include "mrc/coroutines/thread_pool.hpp"

#include <cstddef>
#include <future>
#include <iostream>
#include <stdexcept>

Expand Down
2 changes: 0 additions & 2 deletions cpp/mrc/src/public/modules/sample_modules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@

#include <glog/logging.h>

#include <map>
#include <memory>
#include <ostream>
#include <vector>

namespace mrc::modules {

Expand Down
2 changes: 0 additions & 2 deletions cpp/mrc/src/tests/nodes/common_nodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@
#include <rxcpp/rx.hpp>

#include <chrono>
#include <map>
#include <memory>
#include <ostream>
#include <stdexcept>
#include <string>
#include <utility>
#include <vector>

using namespace mrc;
using namespace mrc::memory::literals;
Expand Down
1 change: 0 additions & 1 deletion cpp/mrc/src/tests/nodes/common_nodes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include <array>
#include <cstddef>
#include <memory>
#include <utility>

namespace test::nodes {

Expand Down
5 changes: 2 additions & 3 deletions cpp/mrc/src/tests/pipelines/multi_segment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
#include "common_pipelines.hpp"

#include "mrc/node/rx_sink.hpp"
#include "mrc/node/rx_sink_base.hpp"
#include "mrc/node/rx_source.hpp"
#include "mrc/node/rx_source_base.hpp"
#include "mrc/pipeline/pipeline.hpp"
#include "mrc/segment/builder.hpp"
#include "mrc/segment/egress_ports.hpp"
Expand All @@ -29,11 +31,8 @@
#include <glog/logging.h>
#include <rxcpp/rx.hpp>

#include <map>
#include <memory>
#include <ostream>
#include <string>
#include <vector>

using namespace mrc;

Expand Down
1 change: 0 additions & 1 deletion cpp/mrc/src/tests/segments/common_segments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

#include <memory>
#include <string>
#include <vector>

using namespace mrc;

Expand Down
5 changes: 0 additions & 5 deletions cpp/mrc/src/tests/test_grpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,16 @@
#include "mrc/runnable/runner.hpp"
#include "mrc/types.hpp"

#include <boost/fiber/future/future.hpp>
#include <glog/logging.h>
#include <grpcpp/grpcpp.h>
#include <gtest/gtest.h>
#include <rxcpp/rx.hpp>

#include <chrono>
#include <cstddef>
#include <map>
#include <memory>
#include <ostream>
#include <string>
#include <thread>
#include <utility>
#include <vector>

// Avoid forward declaring template specialization base classes
// IWYU pragma: no_forward_declare grpc::ServerAsyncReaderWriter
Expand Down
2 changes: 0 additions & 2 deletions cpp/mrc/src/tests/test_memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,9 @@
#include <array>
#include <atomic>
#include <cstddef>
#include <map>
#include <memory>
#include <optional>
#include <ostream>
#include <set>
#include <string>
#include <thread>
#include <utility>
Expand Down
Loading

0 comments on commit a10efed

Please sign in to comment.