seems tile_fma kernel has index error and indexer of matrix has error as well
This commit is contained in:
@@ -158,12 +158,12 @@ namespace StgSharp.Mathematics.Numeric
|
||||
)
|
||||
{
|
||||
// Caller guarantees: indices in range, layout is dense square.
|
||||
int k_c = y >> 2;
|
||||
int k_r = x >> 2;
|
||||
int c = y & 3;
|
||||
int r = x & 3;
|
||||
int k_c = y / 4;
|
||||
int k_r = x / 4;
|
||||
int c = y % 4;
|
||||
int r = x % 4;
|
||||
|
||||
ref MatrixKernel<T> kernel = ref _buffer[_boarder.GetIndexOffset(k_c, k_r, in _size)];
|
||||
ref MatrixKernel<T> kernel = ref _buffer[_boarder.GetIndexOffset(k_r, k_c, in _size)];
|
||||
return ref kernel[c, r];
|
||||
}
|
||||
|
||||
@@ -183,10 +183,10 @@ namespace StgSharp.Mathematics.Numeric
|
||||
)
|
||||
{
|
||||
// Caller guarantees: indices in range, layout is dense square.
|
||||
int k_c = y >> 2;
|
||||
int k_r = x >> 2;
|
||||
int c = y & 3;
|
||||
int r = x & 3;
|
||||
int k_c = y / 4;
|
||||
int k_r = x / 4;
|
||||
int c = y % 4;
|
||||
int r = x % 4;
|
||||
return ref _buffer[_boarder.GetIndexOffset(k_c, k_r, in _size)];
|
||||
}
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace StgSharp.Mathematics.Numeric
|
||||
long y = yKernel;
|
||||
long col = enumerator.KernelColumnLength;
|
||||
|
||||
Console.Write($"Attempt to get offset at ({x},{y}), offset is {x * col + y} ");
|
||||
// Console.Write($"Attempt to get offset at ({x},{y}), offset is {x * col + y} ");
|
||||
return x * col + y;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user