Skip to content

the operations between tensors and scalars, * etc. make a copy and then modify it - fusing the operations would double the speed #55

Description

@terrylyons

Code like the following makes two copy operations instead of one. This allows better logical separation with the structure of the vector model, but it caries a cost. Maybe a constructor that accepts a scalar multiplier as a optional argument could allow future improvements. Maybe vectors could carry a scalar in their structure, to be multiplied in when appropriate. This would be quite complex and would affect every access though.

libalgebra/tensor.h:

inline shuffle_tensor operator*(const SCA& rhs) const { shuffle_tensor result(*this); result *= rhs; return result; }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions