Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Extra functionality of Tensor class #631
This is for small objects with a handful of elements. The compiler will optimize all of this out -- let's not worry about these micro-optimizations unless we have evidence that they are necessary.
So I would vote to just leave the existing code of the form
in place. There is a cost to adding member functions (as this discussion shows) and it doesn't seem worth it at this point.