From d45907c12798d6367c759ded916447898c57826c Mon Sep 17 00:00:00 2001 From: Anna Wellmann <a.wellmann@tu-braunschweig.de> Date: Thu, 27 Apr 2023 17:01:24 +0200 Subject: [PATCH] Add even more overrides --- .../Communication/MpiCommunicator.h | 2 +- .../Parameter/ParameterTest.cpp | 34 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/gpu/VirtualFluids_GPU/Communication/MpiCommunicator.h b/src/gpu/VirtualFluids_GPU/Communication/MpiCommunicator.h index fdaedad72..f5fbd35ad 100644 --- a/src/gpu/VirtualFluids_GPU/Communication/MpiCommunicator.h +++ b/src/gpu/VirtualFluids_GPU/Communication/MpiCommunicator.h @@ -27,7 +27,7 @@ public: static MpiCommunicator &getInstance(); MpiCommunicator(const MpiCommunicator &) = delete; MpiCommunicator &operator=(const MpiCommunicator &) = delete; - ~MpiCommunicator() override;\ + ~MpiCommunicator() override; void exchngBottomToTop(float *sbuf, float *rbuf, int count); void exchngTopToBottom(float *sbuf, float *rbuf, int count); diff --git a/src/gpu/VirtualFluids_GPU/Parameter/ParameterTest.cpp b/src/gpu/VirtualFluids_GPU/Parameter/ParameterTest.cpp index ebbd7b589..2bfbf90dd 100644 --- a/src/gpu/VirtualFluids_GPU/Parameter/ParameterTest.cpp +++ b/src/gpu/VirtualFluids_GPU/Parameter/ParameterTest.cpp @@ -253,45 +253,45 @@ TEST(ParameterTest, whenCreatingParameterClassWithGridRefinement_afterCallingIni class MockCommunicator : public vf::gpu::Communicator { public: - void waitAll(){}; + void waitAll() override {}; int getPID() const override { return 0; }; - int getNumberOfProcess() const + int getNumberOfProcess() const override { return 1; }; - void exchngData(float *sbuf_t, float *rbuf_t, float *sbuf_b, float *rbuf_b, int count){}; + void exchngData(float *sbuf_t, float *rbuf_t, float *sbuf_b, float *rbuf_b, int count) override {}; ////////////////////////////////////////////////////////////////////////// - void exchngDataGPU(real *sbuf, int count_s, real *rbuf, int count_r, int nb_rank){}; - void nbRecvDataGPU(real *rbuf, int count_r, int nb_rank){}; - void nbSendDataGPU(real *sbuf, int count_s, int nb_rank){}; - void waitallGPU(){}; - void sendDataGPU(real *sbuf, int count_s, int nb_rank){}; - void waitGPU(int id){}; - void resetRequest(){}; + void exchngDataGPU(real *sbuf, int count_s, real *rbuf, int count_r, int nb_rank) override {}; + void nbRecvDataGPU(real *rbuf, int count_r, int nb_rank) override {}; + void nbSendDataGPU(real *sbuf, int count_s, int nb_rank) override {}; + void waitallGPU() override {}; + void sendDataGPU(real *sbuf, int count_s, int nb_rank) override {}; + void waitGPU(int id) override {}; + void resetRequest() override {}; ////////////////////////////////////////////////////////////////////////// - void startTimer(){}; - void stopTimer(){}; - double getTime() + void startTimer() override {}; + void stopTimer() override {}; + double getTime() override { return 0.0; }; - int mapCudaDevice(const int &rank, const int &size, const std::vector<unsigned int> &devices, const int &maxdev) + int mapCudaDevice(const int &rank, const int &size, const std::vector<unsigned int> &devices, const int &maxdev) override { return 0; }; - std::vector<double> gatherNUPS(double processNups) + std::vector<double> gatherNUPS(double processNups) override { return {}; }; - double sumNups(double processNups) + double sumNups(double processNups) override { return 0; }; ////////////////////////////////////////////////////////////////////////// - void receive_send(uint *buffer_receive, int size_buffer_recv, int neighbor_rank_recv, uint *buffer_send, int size_buffer_send, int neighbor_rank_send) const override{}; + void receive_send(uint *buffer_receive, int size_buffer_recv, int neighbor_rank_recv, uint *buffer_send, int size_buffer_send, int neighbor_rank_send) const override {}; }; -- GitLab