Skip to content
Snippets Groups Projects
Commit c67c47ef authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Merge branch 'dev' into fusetometaops

parents 35287d0e a4762c5f
No related branches found
No related tags found
No related merge requests found
......@@ -201,9 +201,7 @@ public:
/**
* @brief Set every element of the implementation to zero.
*/
virtual void zeros() {
AIDGE_THROW_OR_ABORT(std::runtime_error, "Function not implented");
}
virtual void zeros() = 0;
const std::string backend() const { return mBackend; }
......
......@@ -38,12 +38,7 @@ bool Aidge::TensorImpl_cpu<T>::operator==(const Aidge::TensorImpl &other) const
template <typename T>
void Aidge::TensorImpl_cpu<T>::zeros() {
if (mData.empty()) {
lazyInit();
}
for (std::size_t i = 0; i < mData.size(); ++i) {
*(mData.data() + i) = T(0);
}
std::memset(rawPtr(), T(0), mNbElts * sizeof(T));
}
template <typename T>
......
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