From 52fb554e38279eaa17c7b6213532c03967ba2c18 Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Wed, 4 Sep 2024 18:03:06 +0100 Subject: [PATCH] c++: add missing includes Otherwise project fails to build from source, with gcc 14.2, std=gnu20 with various errors such as std:: is not defined. --- common/CudaWorker/DcgmDgemm.cpp | 3 ++- common/DcgmError.h | 1 + common/DcgmStringHelpers.cpp | 1 + dcgmi/CommandOutputController.cpp | 1 + dcgmi/Diag.h | 1 + dcgmlib/src/DcgmGpuInstance.cpp | 2 ++ hostengine/src/HostEngineOutput.cpp | 3 ++- nvvs/src/NvvsCommon.cpp | 2 ++ nvvs/src/TestFramework.cpp | 1 + sdk/nvidia/nvml/nvml_loader/nvml_loader.cpp | 1 + 10 files changed, 14 insertions(+), 2 deletions(-) diff --git a/common/CudaWorker/DcgmDgemm.cpp b/common/CudaWorker/DcgmDgemm.cpp index 8d33a325..09d6779e 100644 --- a/common/CudaWorker/DcgmDgemm.cpp +++ b/common/CudaWorker/DcgmDgemm.cpp @@ -15,6 +15,7 @@ */ #include "DcgmDgemm.hpp" +#include #include #include @@ -122,4 +123,4 @@ cublasStatus_t DcgmDgemm(cublasLtHandle_t ltHandle, return CUBLAS_STATUS_SUCCESS; } -} // namespace DcgmNs \ No newline at end of file +} // namespace DcgmNs diff --git a/common/DcgmError.h b/common/DcgmError.h index 8638cdce..4f788703 100644 --- a/common/DcgmError.h +++ b/common/DcgmError.h @@ -15,6 +15,7 @@ */ #pragma once +#include #include #include diff --git a/common/DcgmStringHelpers.cpp b/common/DcgmStringHelpers.cpp index b41917e3..dc6aa9b7 100644 --- a/common/DcgmStringHelpers.cpp +++ b/common/DcgmStringHelpers.cpp @@ -15,6 +15,7 @@ */ #include "DcgmStringHelpers.h" +#include #include #include diff --git a/dcgmi/CommandOutputController.cpp b/dcgmi/CommandOutputController.cpp index 50572055..443008e0 100644 --- a/dcgmi/CommandOutputController.cpp +++ b/dcgmi/CommandOutputController.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include diff --git a/dcgmi/Diag.h b/dcgmi/Diag.h index e0aa2595..62cfa1db 100644 --- a/dcgmi/Diag.h +++ b/dcgmi/Diag.h @@ -24,6 +24,7 @@ #define DIAG_H_ #include +#include #include "Command.h" #include "CommandOutputController.h" diff --git a/dcgmlib/src/DcgmGpuInstance.cpp b/dcgmlib/src/DcgmGpuInstance.cpp index 8696249a..108c11c2 100755 --- a/dcgmlib/src/DcgmGpuInstance.cpp +++ b/dcgmlib/src/DcgmGpuInstance.cpp @@ -13,6 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#include + #include "DcgmGpuInstance.h" #include diff --git a/hostengine/src/HostEngineOutput.cpp b/hostengine/src/HostEngineOutput.cpp index 23c6ca9f..798b83b3 100644 --- a/hostengine/src/HostEngineOutput.cpp +++ b/hostengine/src/HostEngineOutput.cpp @@ -20,6 +20,7 @@ #include #include #include +#include namespace { @@ -365,4 +366,4 @@ void HostEngineOutput::PrintLongUsage(TCLAP::CmdLineInterface &cmdLine, std::ost } } os << std::endl; -} \ No newline at end of file +} diff --git a/nvvs/src/NvvsCommon.cpp b/nvvs/src/NvvsCommon.cpp index 8f788864..54dcc3e6 100644 --- a/nvvs/src/NvvsCommon.cpp +++ b/nvvs/src/NvvsCommon.cpp @@ -13,6 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +#include #include #include #include diff --git a/nvvs/src/TestFramework.cpp b/nvvs/src/TestFramework.cpp index 241277d2..183e0651 100644 --- a/nvvs/src/TestFramework.cpp +++ b/nvvs/src/TestFramework.cpp @@ -25,6 +25,7 @@ #include #include +#include #include #include #include diff --git a/sdk/nvidia/nvml/nvml_loader/nvml_loader.cpp b/sdk/nvidia/nvml/nvml_loader/nvml_loader.cpp index 9eebeaf1..ab064397 100644 --- a/sdk/nvidia/nvml/nvml_loader/nvml_loader.cpp +++ b/sdk/nvidia/nvml/nvml_loader/nvml_loader.cpp @@ -19,6 +19,7 @@ #include #include +#include #include static void *g_nvmlLib = 0;