From f929f9c1e4332690b8e3b8cd5f85ac01a0f95818 Mon Sep 17 00:00:00 2001 From: Peter Thoman Date: Thu, 12 Oct 2023 15:51:56 +0200 Subject: [PATCH] Unify newline at end, and set insert_final_newline --- .editorconfig | 1 + include/affinity.h | 2 +- include/backend/backend.h | 2 +- include/backend/operations.h | 2 +- include/backend/traits.h | 2 +- include/cgf_diagnostics.h | 2 +- include/closure_hydrator.h | 2 +- include/debug.h | 2 +- include/distributed_graph_generator.h | 2 +- include/item.h | 2 +- include/lifetime_extending_state.h | 2 +- include/log.h | 2 +- include/side_effect.h | 2 +- include/task_manager.h | 2 +- src/backend/cuda_backend.cc | 2 +- src/backend/generic_backend.cc | 2 +- src/distributed_graph_generator.cc | 2 +- src/grid.cc | 2 +- src/platform_specific/affinity.unix.cc | 2 +- src/platform_specific/affinity.win.cc | 2 +- src/user_bench.cc | 2 +- test/backend_tests.cc | 2 +- test/buffer_manager_test_utils.h | 2 +- test/debug_naming_tests.cc | 2 +- test/distributed_graph_generator_test_utils.h | 2 +- test/graph_compaction_tests.cc | 2 +- test/graph_gen_granularity_tests.cc | 2 +- test/graph_gen_transfer_tests.cc | 2 +- test/integration/backend.cc | 2 +- test/range_tests.cc | 2 +- test/system/distr_tests.cc | 2 +- test/task_graph_tests.cc | 2 +- test/task_ring_buffer_tests.cc | 2 +- test/test_utils.h | 2 +- test/test_utils_tests.cc | 2 +- 35 files changed, 35 insertions(+), 34 deletions(-) diff --git a/.editorconfig b/.editorconfig index e7b9d250b..ea41dffa6 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,6 +3,7 @@ root = true [*] end_of_line = lf +insert_final_newline = true [{CMakeLists.txt, *.cmake}] indent_style = space diff --git a/include/affinity.h b/include/affinity.h index 537a969fc..2bafd6ca5 100644 --- a/include/affinity.h +++ b/include/affinity.h @@ -12,4 +12,4 @@ namespace detail { constexpr static uint64_t min_cores_needed = 5; } // namespace detail -} // namespace celerity \ No newline at end of file +} // namespace celerity diff --git a/include/backend/backend.h b/include/backend/backend.h index 80c1df09e..3a278432d 100644 --- a/include/backend/backend.h +++ b/include/backend/backend.h @@ -54,4 +54,4 @@ void memcpy_strided_device(sycl::queue& queue, const void* source_base_ptr, void }); } -} // namespace celerity::detail::backend \ No newline at end of file +} // namespace celerity::detail::backend diff --git a/include/backend/operations.h b/include/backend/operations.h index aa1e25552..91b22090b 100644 --- a/include/backend/operations.h +++ b/include/backend/operations.h @@ -14,4 +14,4 @@ struct backend_operations { } }; -} // namespace celerity::detail::backend_detail \ No newline at end of file +} // namespace celerity::detail::backend_detail diff --git a/include/backend/traits.h b/include/backend/traits.h index 29d0fc588..5428ccbee 100644 --- a/include/backend/traits.h +++ b/include/backend/traits.h @@ -38,4 +38,4 @@ struct name { static constexpr const char* value = "CUDA"; }; -} // namespace celerity::detail::backend_detail \ No newline at end of file +} // namespace celerity::detail::backend_detail diff --git a/include/cgf_diagnostics.h b/include/cgf_diagnostics.h index a0431217c..df8f2e5a6 100644 --- a/include/cgf_diagnostics.h +++ b/include/cgf_diagnostics.h @@ -110,4 +110,4 @@ class cgf_diagnostics { } }; -} // namespace celerity::detail \ No newline at end of file +} // namespace celerity::detail diff --git a/include/closure_hydrator.h b/include/closure_hydrator.h index 90ca5b1cf..ebe4bf017 100644 --- a/include/closure_hydrator.h +++ b/include/closure_hydrator.h @@ -158,4 +158,4 @@ class closure_hydrator { } }; -}; // namespace celerity::detail \ No newline at end of file +}; // namespace celerity::detail diff --git a/include/debug.h b/include/debug.h index 929bf6a81..ac31c547f 100644 --- a/include/debug.h +++ b/include/debug.h @@ -17,4 +17,4 @@ namespace debug { inline void set_task_name(celerity::handler& cgh, const std::string& debug_name) { detail::set_task_name(cgh, debug_name); } } // namespace debug -} // namespace celerity \ No newline at end of file +} // namespace celerity diff --git a/include/distributed_graph_generator.h b/include/distributed_graph_generator.h index bbe74641f..f64180d7f 100644 --- a/include/distributed_graph_generator.h +++ b/include/distributed_graph_generator.h @@ -155,4 +155,4 @@ template <> struct hash { size_t operator()(const celerity::detail::write_command_state& wcs) const { return std::hash{}(static_cast(wcs)); } }; -} // namespace std \ No newline at end of file +} // namespace std diff --git a/include/item.h b/include/item.h index 855123483..b384b2b24 100644 --- a/include/item.h +++ b/include/item.h @@ -485,4 +485,4 @@ T inclusive_scan_over_group(const group& g, V x, BinaryOperation binary_op return cl::sycl::inclusive_scan_over_group(detail::get_sycl_item(g).get_group(), x, binary_op, init); } -} // namespace celerity \ No newline at end of file +} // namespace celerity diff --git a/include/lifetime_extending_state.h b/include/lifetime_extending_state.h index 59b0163ae..7c3d668f9 100644 --- a/include/lifetime_extending_state.h +++ b/include/lifetime_extending_state.h @@ -40,4 +40,4 @@ inline std::shared_ptr get_lifetime_extending_state(co return wrapper.get_lifetime_extending_state(); } -} // namespace celerity::detail \ No newline at end of file +} // namespace celerity::detail diff --git a/include/log.h b/include/log.h index 13b9454c8..3938a1d7f 100644 --- a/include/log.h +++ b/include/log.h @@ -90,4 +90,4 @@ struct fmt::formatter> { }); return out; } -}; \ No newline at end of file +}; diff --git a/include/side_effect.h b/include/side_effect.h index 27642dd60..0a9abeca5 100644 --- a/include/side_effect.h +++ b/include/side_effect.h @@ -66,4 +66,4 @@ class side_effect { template side_effect(const host_object&, handler&) -> side_effect; -} // namespace celerity::experimental \ No newline at end of file +} // namespace celerity::experimental diff --git a/include/task_manager.h b/include/task_manager.h index 229d94afe..6fed0240e 100644 --- a/include/task_manager.h +++ b/include/task_manager.h @@ -109,7 +109,7 @@ namespace detail { /** * @brief Adds a new buffer for dependency tracking - * @arg host_initialized Whether this buffer has been initialized using a host pointer (i.e., it contains useful data before any write-task) + * @param host_initialized Whether this buffer has been initialized using a host pointer (i.e., it contains useful data before any write-task) */ void add_buffer(buffer_id bid, const int dims, const range<3>& range, bool host_initialized); diff --git a/src/backend/cuda_backend.cc b/src/backend/cuda_backend.cc index 701a6ada4..61d4f64d9 100644 --- a/src/backend/cuda_backend.cc +++ b/src/backend/cuda_backend.cc @@ -61,4 +61,4 @@ void memcpy_strided_device_cuda(sycl::queue& queue, const void* source_base_ptr, CELERITY_CUDA_CHECK(cudaStreamSynchronize, 0); } -} // namespace celerity::detail::backend_detail \ No newline at end of file +} // namespace celerity::detail::backend_detail diff --git a/src/backend/generic_backend.cc b/src/backend/generic_backend.cc index 93214fcdd..aac07f906 100644 --- a/src/backend/generic_backend.cc +++ b/src/backend/generic_backend.cc @@ -51,4 +51,4 @@ void memcpy_strided_device_generic(sycl::queue& queue, const void* source_base_p } } -} // namespace celerity::detail::backend_detail \ No newline at end of file +} // namespace celerity::detail::backend_detail diff --git a/src/distributed_graph_generator.cc b/src/distributed_graph_generator.cc index 72eb6e93b..788ed6964 100644 --- a/src/distributed_graph_generator.cc +++ b/src/distributed_graph_generator.cc @@ -644,4 +644,4 @@ void distributed_graph_generator::prune_commands_before(const command_id epoch) } } -} // namespace celerity::detail \ No newline at end of file +} // namespace celerity::detail diff --git a/src/grid.cc b/src/grid.cc index cc0098bef..c14b1d20a 100644 --- a/src/grid.cc +++ b/src/grid.cc @@ -436,4 +436,4 @@ template region<1> region_difference(const region<1>& lhs, const region<1>& rhs) template region<2> region_difference(const region<2>& lhs, const region<2>& rhs); template region<3> region_difference(const region<3>& lhs, const region<3>& rhs); -} // namespace celerity::detail \ No newline at end of file +} // namespace celerity::detail diff --git a/src/platform_specific/affinity.unix.cc b/src/platform_specific/affinity.unix.cc index 230ccd118..46fd4f420 100644 --- a/src/platform_specific/affinity.unix.cc +++ b/src/platform_specific/affinity.unix.cc @@ -17,4 +17,4 @@ namespace detail { } } // namespace detail -} // namespace celerity \ No newline at end of file +} // namespace celerity diff --git a/src/platform_specific/affinity.win.cc b/src/platform_specific/affinity.win.cc index 66f10b69a..1b3192ed4 100644 --- a/src/platform_specific/affinity.win.cc +++ b/src/platform_specific/affinity.win.cc @@ -19,4 +19,4 @@ namespace detail { } } // namespace detail -} // namespace celerity \ No newline at end of file +} // namespace celerity diff --git a/src/user_bench.cc b/src/user_bench.cc index 34f4808ed..b2e56922e 100644 --- a/src/user_bench.cc +++ b/src/user_bench.cc @@ -46,4 +46,4 @@ namespace experimental { } // namespace detail } // namespace bench } // namespace experimental -} // namespace celerity \ No newline at end of file +} // namespace celerity diff --git a/test/backend_tests.cc b/test/backend_tests.cc index 86cb184c1..6c9b8f680 100644 --- a/test/backend_tests.cc +++ b/test/backend_tests.cc @@ -165,4 +165,4 @@ TEMPLATE_TEST_CASE_SIG("memcpy_strided_device allows to copy between the same de const auto host_buf = copy_to_host(get_a_queue(tgt, src), tgt.ptr, cp.target_range); verify_copied_linear_ids(host_buf.data(), cp.source_range, cp.source_offset, cp.target_range, cp.target_offset, cp.copy_range); -} \ No newline at end of file +} diff --git a/test/buffer_manager_test_utils.h b/test/buffer_manager_test_utils.h index e590c5cc4..247b5e495 100644 --- a/test/buffer_manager_test_utils.h +++ b/test/buffer_manager_test_utils.h @@ -195,4 +195,4 @@ namespace test_utils { }; } // namespace test_utils -} // namespace celerity \ No newline at end of file +} // namespace celerity diff --git a/test/debug_naming_tests.cc b/test/debug_naming_tests.cc index 96de9891f..7cde4b37f 100644 --- a/test/debug_naming_tests.cc +++ b/test/debug_naming_tests.cc @@ -70,4 +70,4 @@ TEST_CASE("device_compute tasks derive debug name from kernel name", "[task]") { CHECK(utils::simplify_task_name(t1->get_debug_name()) == "MyFirstKernel"); CHECK(utils::simplify_task_name(t2->get_debug_name()) == "MySecondKernel"); CHECK(utils::simplify_task_name(t3->get_debug_name()) == "MyThirdKernel<...>"); -} \ No newline at end of file +} diff --git a/test/distributed_graph_generator_test_utils.h b/test/distributed_graph_generator_test_utils.h index 36aac31d7..1cae35569 100644 --- a/test/distributed_graph_generator_test_utils.h +++ b/test/distributed_graph_generator_test_utils.h @@ -635,4 +635,4 @@ inline task_builder::step task_builder::step::reduce(BufferT& buf, const bool in [this, &buf, include_current_buffer_value](handler& cgh) { add_reduction(cgh, m_dctx.create_reduction(buf.get_id(), include_current_buffer_value)); }); } -} // namespace celerity::test_utils \ No newline at end of file +} // namespace celerity::test_utils diff --git a/test/graph_compaction_tests.cc b/test/graph_compaction_tests.cc index b0be626a8..83fab6b60 100644 --- a/test/graph_compaction_tests.cc +++ b/test/graph_compaction_tests.cc @@ -294,4 +294,4 @@ TEST_CASE("reaching an epoch will prune all nodes of the preceding task graph", {reader_writer_tid, dependency_kind::true_dep, dependency_origin::dataflow}, {late_writer_tid, dependency_kind::true_dep, dependency_origin::dataflow}, }); -} \ No newline at end of file +} diff --git a/test/graph_gen_granularity_tests.cc b/test/graph_gen_granularity_tests.cc index 1eaf04ad5..5d24135be 100644 --- a/test/graph_gen_granularity_tests.cc +++ b/test/graph_gen_granularity_tests.cc @@ -134,4 +134,4 @@ TEST_CASE("buffer accesses with empty ranges do not generate pushes or data-flow CHECK(dctx.query(command_type::await_push).count() == 1); CHECK(dctx.query(command_type::await_push, node_id(1)).count() == 1); -} \ No newline at end of file +} diff --git a/test/graph_gen_transfer_tests.cc b/test/graph_gen_transfer_tests.cc index d204e1a27..73ff785b6 100644 --- a/test/graph_gen_transfer_tests.cc +++ b/test/graph_gen_transfer_tests.cc @@ -239,4 +239,4 @@ TEST_CASE("distributed_graph_generator generates anti-dependencies with subrange CHECK(dctx.query(node_id(0), tid_a).have_successors(await_push, dependency_kind::anti_dep)); CHECK_FALSE(dctx.query(node_id(0), tid_b).have_successors(await_push, dependency_kind::anti_dep)); } -} \ No newline at end of file +} diff --git a/test/integration/backend.cc b/test/integration/backend.cc index 557cced7a..199c33684 100644 --- a/test/integration/backend.cc +++ b/test/integration/backend.cc @@ -118,4 +118,4 @@ int main(int argc, char* argv[]) { test_copy<3>(q); return EXIT_SUCCESS; -} \ No newline at end of file +} diff --git a/test/range_tests.cc b/test/range_tests.cc index dc1f91ee4..5a3b47720 100644 --- a/test/range_tests.cc +++ b/test/range_tests.cc @@ -220,4 +220,4 @@ TEST_CASE("for_each_item behaves as expected", "[host_utils]") { } } -} // namespace celerity::detail \ No newline at end of file +} // namespace celerity::detail diff --git a/test/system/distr_tests.cc b/test/system/distr_tests.cc index 788ee42d8..4f9aac429 100644 --- a/test/system/distr_tests.cc +++ b/test/system/distr_tests.cc @@ -437,4 +437,4 @@ namespace detail { } } // namespace detail -} // namespace celerity \ No newline at end of file +} // namespace celerity diff --git a/test/task_graph_tests.cc b/test/task_graph_tests.cc index a7862251f..0168c0052 100644 --- a/test/task_graph_tests.cc +++ b/test/task_graph_tests.cc @@ -714,4 +714,4 @@ namespace detail { } } // namespace detail -} // namespace celerity \ No newline at end of file +} // namespace celerity diff --git a/test/task_ring_buffer_tests.cc b/test/task_ring_buffer_tests.cc index a88a008fa..2a258d0c6 100644 --- a/test/task_ring_buffer_tests.cc +++ b/test/task_ring_buffer_tests.cc @@ -56,4 +56,4 @@ TEST_CASE_METHOD(test_utils::runtime_fixture, "deadlock in task ring buffer due task_manager_testspy::create_task_slot(runtime::get_instance().get_task_manager()); } -} // namespace celerity::detail \ No newline at end of file +} // namespace celerity::detail diff --git a/test/test_utils.h b/test/test_utils.h index c2a321061..b0c5d69ef 100644 --- a/test/test_utils.h +++ b/test/test_utils.h @@ -454,4 +454,4 @@ struct StringMaker { } }; -} // namespace Catch \ No newline at end of file +} // namespace Catch diff --git a/test/test_utils_tests.cc b/test/test_utils_tests.cc index ffc38bd0c..89bf5935b 100644 --- a/test/test_utils_tests.cc +++ b/test/test_utils_tests.cc @@ -207,4 +207,4 @@ TEST_CASE("most operations fail when called on an empty query", "[command_query] CHECK_THROWS_WITH(query.for_each_node([](const auto&) {}), "Operation 'for_each_node' not allowed on empty query"); CHECK_THROWS_WITH(query.have_successors(command_query_testspy::create_for({})), "Operation 'have_successors' not allowed on empty query"); CHECK_THROWS_WITH(query.have_type(command_type::epoch), "Operation 'have_type' not allowed on empty query"); -} \ No newline at end of file +}