luisquintanilla commented on PR #379:
URL: https://github.com/apache/arrow-dotnet/pull/379#issuecomment-4775374183

   Pushed an update that gets this PR closer to mergeable (keeping it as a 
draft for now):
   
   - **Multi-targets** `netstandard2.0;net8.0;net462` to match `Apache.Arrow`. 
On net8.0+ the kernels stay generic over `INumber<T>` and dispatch to 
`System.Numerics.Tensors` (`TensorPrimitives`) on the null-free fast path; on 
netstandard2.0/net462 (where generic math and `TensorPrimitives` aren't 
available) they fall back to per-type scalar kernels for 
`Int32Array`/`Int64Array`/`FloatArray`/`DoubleArray`.
   - **Null handling** follows LINQ semantics (nulls skipped; `Sum` of 
empty/all-null is zero; `Min`/`Max`/`Mean` throw `InvalidOperationException` 
when there are no non-null elements), with a validity-aware loop when nulls are 
present.
   - **Benchmarks** added (`Apache.Arrow.Compute.Benchmarks`, BenchmarkDotNet). 
On a quick run the SIMD `Sum` is roughly 6-7x a naive managed loop over the 
same buffer at 1M elements, with zero allocation.
   - 11 unit tests, green on all target frameworks.
   
   This is the first slice of #375; a roadmap for the follow-on slices 
(elementwise kernels, `Tensor<T>` interop, and an extended aggregation surface) 
is on that issue.
   
   **On the project home / naming.** These are compute kernels in the sense of 
C++ `arrow::compute` and `pyarrow.compute`, so this PR puts them in a dedicated 
`Apache.Arrow.Compute` project. I noticed the `Apache.Arrow.Operations` name 
suggested on #254 is now used by the Arrow Variant binary-format codecs, so a 
separate `Apache.Arrow.Compute` keeps the numeric/array kernels cleanly apart 
from those codecs. Happy to align with whatever you'd prefer here, 
@CurtHagenlocher (including a different home for the kernels in #257).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to