Better L4 and array storage design

This commit is contained in:
Youmu Liu
2026-03-04 18:12:58 +08:00
parent 7e970352ab
commit dfa6f4ba92
103 changed files with 853 additions and 6837 deletions
@@ -2,8 +2,8 @@
// -----------------------------------------------------------------------
// file="MatrixTaskFactory"
// Project: StgSharp
// AuthorGroup: Nitload Space
// Copyright (c) Nitload Space. All rights reserved.
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -26,6 +26,7 @@
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using StgSharp.Mathematics;
using StgSharp.Mathematics.Internal;
using StgSharp.Mathematics.Memory;
using System;
using System.Collections.Generic;
@@ -74,7 +75,9 @@ namespace StgSharp.Mathematics.Numeric
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static unsafe MatrixParallelTask* FromExistPackage(MatrixParallelTask* exist)
public static unsafe MatrixParallelTask* FromExistPackage(
MatrixParallelTask* exist
)
{
MatrixParallelTask* ptr = (MatrixParallelTask*)_wrapAllocator.Allocate();
MatrixParallelTask.Copy(exist, ptr);
@@ -83,13 +86,17 @@ namespace StgSharp.Mathematics.Numeric
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void Release(ScalarPacket* source)
public static void Release(
ScalarPacket* source
)
{
_scalarAllocator.Free((nuint)source);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void Release(MatrixParallelTask* source)
public static void Release(
MatrixParallelTask* source
)
{
if (source->Scalar != null) {
_scalarAllocator.Free((nuint)source->Scalar);