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
The above code crashed at xview.hpp at the function of compute_strides_impl(). When I printed out xview's m_e, I noticed that m_strides and m_backstrides are not properly initialized. It seems to be the case that the view does not have trivial_strides, so the initialization of m_strides are skipped in xview constructor.
The issue you're encountering here is new_container is captured by reference. It's life time is bound to the code of copy_view_to_new_container you then move new_container this means that new_view now has a dangling reference which when called results in a segmentation fault.
I'm not really sure what you're trying to accomplish to be honest.
I have a need to copy a view along with its underlying container. Could someone show me the right way to do it?
My current code doesn't propagate the strides info to the view expression. The code crashed when I printed the new view out.
The above code crashed at xview.hpp at the function of compute_strides_impl(). When I printed out xview's m_e, I noticed that m_strides and m_backstrides are not properly initialized. It seems to be the case that the view does not have trivial_strides, so the initialization of m_strides are skipped in xview constructor.
The text was updated successfully, but these errors were encountered: