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
Expression templates are used in uBLAS for avoiding temporary objects to be generated and copied in expressions, finally to reduce the runtime of such expressions.
However, with C++11 and C++14 standards copy elision is possible where the copy and move constructors can be omited by the compiler, resulting in zero-copy pass-by-value semantics. The C++17 standard even guarantees copy elision.
Moreover, the current implementation of matrix-vector and matrix-matrix products in expressions are implemented in a row-by-column style where the spatial and temporal data locality are not preserved for the sake of avoiding temporary objects.
Does this really help to reduce the runtime costs?
The text was updated successfully, but these errors were encountered:
I'm not entirely sure I understand the question, or at least, the scope of the question.
Are you asking whether expression templates are useful for Boost.UBlas ? Or are you asking about a specific implementation of matrix/vector and matrix/matrix products ?
(As to your point about expression templates, I don't think that the availability of return-value optimizations renders them useless, as their use goes far beyond the elision of temporaries.)
Expression templates are used in uBLAS for avoiding temporary objects to be generated and copied in expressions, finally to reduce the runtime of such expressions.
However, with C++11 and C++14 standards copy elision is possible where the copy and move constructors can be omited by the compiler, resulting in zero-copy pass-by-value semantics. The C++17 standard even guarantees copy elision.
Moreover, the current implementation of matrix-vector and matrix-matrix products in expressions are implemented in a row-by-column style where the spatial and temporal data locality are not preserved for the sake of avoiding temporary objects.
Does this really help to reduce the runtime costs?
The text was updated successfully, but these errors were encountered: