mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-09 01:52:32 +02:00
Make Display size float rounding equal in all properties and formats
This commit is contained in:
@@ -13,10 +13,11 @@ namespace UVtools.Core.Extensions;
|
||||
|
||||
public static class SpanExtensions
|
||||
{
|
||||
public static unsafe void Fill<T>(this Span<T> span, Func<T> provider) where T : struct
|
||||
public static unsafe void Fill<T>(this Span<T> span, Func<T> provider, int cores = -1) where T : struct
|
||||
{
|
||||
if (cores <= 0) cores = Environment.ProcessorCount;
|
||||
|
||||
int
|
||||
cores = Environment.ProcessorCount,
|
||||
batch = span.Length / cores,
|
||||
mod = span.Length % cores,
|
||||
size = Unsafe.SizeOf<T>();
|
||||
|
||||
Reference in New Issue
Block a user