dsharlet / array

C++ multidimensional arrays in the spirit of the STL
Apache License 2.0
198 stars 15 forks source link

Add einsum function in the linear_algebra examples #33

Closed dsharlet closed 4 years ago

dsharlet commented 4 years ago

There's still a lot that could be done here, but this turned out to be fairly complete as a zero cost compile-time abstraction for Einstein summation.

This lacks any kind of clever optimization, but when this is used inside a manual tiling loop, it is still very expressive and should produce good performance with no overhead (see multiply_einsum_tiles for example, although it doesn't actually produce good performance today, hopefully due only to https://bugs.llvm.org/show_bug.cgi?id=45863).