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(); + } + } }