dsharlet/array
View on GitHub ↗ ★ 201 C++
C++ multidimensional arrays in the spirit of the STL
5 mentions on Hacker News by 1 person: 0 stories, 5 comments · first 2022-04-10 · latest 2024-04-28
20082026
-
…want, as well as some other requests in this thread (generalized to more than just multiply-add): https://github.com/dsharlet/array?tab=readme-ov-file#einstei... . A matrix multiply written with this looks like this: enum { i = 2, j = 0, k…
comment by dsharlet · 2024-04-28 · in Einsum for Tensor Manipulation -
…The only difference between the one I linked and this is prefetching and outer loop ordering: https://github.com/dsharlet/array/blob/master/examples/linea...
comment by dsharlet · 2024-01-04 · in Benchmarking 20 programming languages on N-queens and matrix multiplication -
This gets to 90% of BLAS: https://github.com/dsharlet/array/blob/38f8ce332fc4e26af0832... The less involved versions still get ~70%. But this is also quite general. I’m claiming you can beat BLAS if you have some unique knowledge of the…
comment by dsharlet · 2024-01-03 · in Benchmarking 20 programming languages on N-queens and matrix multiplication -
If you are looking for something like this in C++, here's my attempt at implementing it: https://github.com/dsharlet/array#einstein-reductions It doesn't do any automatic optimization of the loops like some of the projects linked in this…
comment by dsharlet · 2022-04-10 · in A basic introduction to NumPy's einsum -
…close to ideal code until you start getting into processor architecture specific optimizations: https://github.com/dsharlet/array#einstein-reductions
comment by dsharlet · 2022-04-10 · in A basic introduction to NumPy's einsum