Fixed coverity issue for inference component (#9688)

* Fixed coverity issue for inference component

* Removed noexcept
This commit is contained in:
Ilya Churaev 2022-01-18 12:43:10 +03:00 committed by GitHub
parent 18eaaedb39
commit a8381f71f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View File

@ -155,7 +155,7 @@ public:
* @brief Returns the size of the current Blob in bytes. * @brief Returns the size of the current Blob in bytes.
* @return Blob's size in bytes * @return Blob's size in bytes
*/ */
virtual size_t byteSize() const noexcept { virtual size_t byteSize() const {
return size() * element_size(); return size() * element_size();
} }
@ -169,7 +169,7 @@ public:
* *
* @return Returns the number of bytes per element * @return Returns the number of bytes per element
*/ */
virtual size_t element_size() const noexcept = 0; virtual size_t element_size() const = 0;
/** /**
* @brief Allocates memory to store the data. * @brief Allocates memory to store the data.
@ -364,11 +364,11 @@ public:
* @brief Returns the size of the current Blob in bytes calculated as `size() * element_size()`. * @brief Returns the size of the current Blob in bytes calculated as `size() * element_size()`.
* @return Blob's size in bytes * @return Blob's size in bytes
*/ */
size_t byteSize() const noexcept override { size_t byteSize() const override {
return (size() * tensorDesc.getPrecision().bitsSize() + 7) >> 3; return (size() * tensorDesc.getPrecision().bitsSize() + 7) >> 3;
} }
size_t element_size() const noexcept override { size_t element_size() const override {
return tensorDesc.getPrecision().size(); return tensorDesc.getPrecision().size();
} }

View File

@ -52,13 +52,13 @@ public:
* @brief Always returns `0` * @brief Always returns `0`
* @return Returns `0` * @return Returns `0`
*/ */
size_t byteSize() const noexcept override; size_t byteSize() const override;
/** /**
* @brief Always returns `0` * @brief Always returns `0`
* @return Returns `0` * @return Returns `0`
*/ */
size_t element_size() const noexcept override; size_t element_size() const override;
/** /**
* @brief No operation is performed. Compound blob does not allocate/deallocate any data * @brief No operation is performed. Compound blob does not allocate/deallocate any data

View File

@ -311,11 +311,11 @@ CompoundBlob::CompoundBlob(std::vector<Blob::Ptr>&& blobs) : CompoundBlob(Tensor
this->_blobs = std::move(blobs); this->_blobs = std::move(blobs);
} }
size_t CompoundBlob::byteSize() const noexcept { size_t CompoundBlob::byteSize() const {
return 0; return 0;
} }
size_t CompoundBlob::element_size() const noexcept { size_t CompoundBlob::element_size() const {
return 0; return 0;
} }