redesign matrix design
This commit is contained in:
@@ -44,6 +44,8 @@ namespace StgSharp.HighPerformance
|
||||
public unsafe struct MatrixKernel<T> where T : unmanaged, INumber<T>
|
||||
{
|
||||
|
||||
public static readonly int Size = 16 * sizeof(T);
|
||||
|
||||
private T c0r0;
|
||||
|
||||
public MatrixKernel()
|
||||
@@ -58,10 +60,10 @@ namespace StgSharp.HighPerformance
|
||||
}
|
||||
}
|
||||
|
||||
public ref T this[int column, int row]
|
||||
public ref T this[int row, int column]
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get => ref Unsafe.Add(ref c0r0, (column * 4) + row);
|
||||
get => ref Unsafe.Add(ref c0r0, (row * 4) + column);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user