From 1fc687f7d0759d286ae65236e30df29dd6d0032d Mon Sep 17 00:00:00 2001 From: Nitload Date: Mon, 25 Aug 2025 09:52:20 +0800 Subject: [PATCH] back to correct log --- StgSharp.Common/Mathematics/Linear/Matrix.cs | 27 ++++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/StgSharp.Common/Mathematics/Linear/Matrix.cs b/StgSharp.Common/Mathematics/Linear/Matrix.cs index 7884fd1a..b4c6b8d4 100644 --- a/StgSharp.Common/Mathematics/Linear/Matrix.cs +++ b/StgSharp.Common/Mathematics/Linear/Matrix.cs @@ -29,17 +29,21 @@ // ----------------------------------------------------------------------- // ----------------------------------------------------------------------- using StgSharp.HighPerformance; +using StgSharp.HighPerformance.Memory; using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; +using System.Numerics; using System.Text; using System.Threading.Tasks; +using hlsfHandle = StgSharp.HighPerformance.Memory.HybridLayerSegregatedFitAllocationHandle; + namespace StgSharp.Mathematics { - public abstract unsafe partial class Matrix + public abstract unsafe partial class Matrix where T: unmanaged, INumber { public abstract ref float this[int column, int row] @@ -49,10 +53,23 @@ namespace StgSharp.Mathematics public abstract MatrixKernel* GetMatrixKernel(int column, int row); - [Obsolete( - "This method does not contain boarder check, so be careful on size or use indexer instead.", - false)] - public abstract float* UnsafeIndex(int column, int row); + [Obsolete("This method does not contain boarder check, so be careful on size or use indexer instead.", false)] + public abstract T* UnsafeIndex(int column, int row); } + + private unsafe class HlsfMatrix : Matrix where T : unmanaged, INumber + { + public override ref float this[int column, int row] => throw new NotImplementedException(); + + public override unsafe MatrixKernel* GetMatrixKernel(int column, int row) + { + throw new NotImplementedException(); + } + + public override unsafe T* UnsafeIndex(int column, int row) + { + throw new NotImplementedException(); + } + } }