Skip to content
Snippets Groups Projects
Commit 15423a7c authored by Cyril Moineau's avatar Cyril Moineau
Browse files

Fix TensorImpl scalarSize method by adding noexcept keyword.

parent 3e47b059
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment