You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need a std::vector and std::array conforming storage template classes in order to be able to provide it as a template parameter (define a type requirements for storage containers)
Why do we need extra storage template classes like boost::numeric::ublas::unbounded_array and boost::numeric::ublas::bounded_array if std::vector and std::arrayexists?
The text was updated successfully, but these errors were encountered:
Yes. However, I am not sure of what optimal performance refers to and why unbounded array should not model a sequence container just because the resizing strategy might be different. Also there has been a discussion about this, see CppCoreGuidelines.
As far as I understand this is all about std::vector (and other sequences) initializing their elements, which we don't want / need as initialization is done by the tensor class itself.
std::vector and other containers have a default constructor constructing an empty container. boost::numeric::ublas::tensor has also a default constructor with the same behavior. So boost::numeric::ublas::tensor<float> A; does not allocate memory and does not initialize itself.
std::vector
andstd::array
conforming storage template classes in order to be able to provide it as a template parameter (define a type requirements for storage containers)boost::numeric::ublas::unbounded_array
andboost::numeric::ublas::bounded_array
ifstd::vector
andstd::array
exists?The text was updated successfully, but these errors were encountered: