sinshu / numflat

A numerical computation library for C#
MIT License
22 stars 3 forks source link

System.Numerics.Tensors #16

Open sinshu opened 5 months ago

sinshu commented 5 months ago

Investigate whether using Tensor<T> in backend operations can improve speed.

Relevant materials: https://github.com/dotnet/core/blob/main/release-notes/9.0/preview/preview4/libraries.md#new-tensort-type https://learn.microsoft.com/en-us/dotnet/api/system.numerics.tensors?view=net-8.0 https://github.com/dotnet/runtime/issues/100924 https://github.com/dotnet/runtime/issues/103611 https://github.com/dotnet/runtime/issues/104117

Operations that System.Numerics.Tensors might be useful for so far:

In any case, first check whether TensorSpan<T> is compatible with the memory format of BLAS and LAPACK.

sinshu commented 4 months ago

Setting aside the backend calculations, it seems necessary to prepare methods like AsTensorSpan<T> for integration with the standard library.