From 15423a7cbae2e6d88e6f73ee691d638f520d0ab8 Mon Sep 17 00:00:00 2001 From: cmoineau <cyril.moineau@cea.fr> Date: Tue, 6 Feb 2024 08:59:30 +0000 Subject: [PATCH] Fix TensorImpl scalarSize method by adding noexcept keyword. --- CMakeLists.txt | 8 ++++---- include/aidge/backend/cuda/data/TensorImpl.hpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 21f57bc..f933e00 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ file(READ "${CMAKE_SOURCE_DIR}/project_name.txt" project) message(STATUS "Project name: ${project}") message(STATUS "Project version: ${version}") -# Note : project name is {project} and python module name is also {project} +# Note : project name is {project} and python module name is also {project} set(module_name _${project}) # target name @@ -76,7 +76,7 @@ if (PYBIND) # Handles Python + pybind11 headers dependencies target_link_libraries(${module_name} - PUBLIC + PUBLIC pybind11::pybind11 PRIVATE Python::Python @@ -119,8 +119,8 @@ install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) install(EXPORT ${project}-targets FILE "${project}-targets.cmake" DESTINATION ${INSTALL_CONFIGDIR} -# COMPONENT ${module_name} -) +# COMPONENT ${module_name} +) #Create a ConfigVersion.cmake file include(CMakePackageConfigHelpers) diff --git a/include/aidge/backend/cuda/data/TensorImpl.hpp b/include/aidge/backend/cuda/data/TensorImpl.hpp index f7de7aa..8b62b2d 100644 --- a/include/aidge/backend/cuda/data/TensorImpl.hpp +++ b/include/aidge/backend/cuda/data/TensorImpl.hpp @@ -24,8 +24,8 @@ void thrust_copy(const half_float::half* srcData, half_float::half* dstData, siz /** * @brief Abstract class for the TensorImpl_cuda class template. - * @details Its purpose is to provide access to base methods that are specific - * to the implementation (which are therefore not present in the TensorImpl + * @details Its purpose is to provide access to base methods that are specific + * to the implementation (which are therefore not present in the TensorImpl * class), but whose data type does not need to be known. */ class TensorImpl_cuda_ { @@ -35,7 +35,7 @@ protected: public: /** * @brief Return the CuDNN tensor descriptor of the tensor. - * @details This method uses lazy initialization for the descriptor + * @details This method uses lazy initialization for the descriptor * (which is therefore mutable in the derived class). * @return cudnnTensorDescriptor_t CuDNN tensor descriptor. */ @@ -80,7 +80,7 @@ public: // native interface const future_std::span<T>& data() const { return mData; } - std::size_t scalarSize() const override { return sizeof(T); } + std::size_t scalarSize() const noexcept override { return sizeof(T); } void copy(const void *src, NbElts_t length, NbElts_t offset = 0) override { AIDGE_ASSERT(length <= mData.size() || length <= mNbElts, "copy length is above capacity"); -- GitLab