tiled fma is ok, mat mul is now available again
This commit is contained in:
@@ -54,23 +54,19 @@ namespace StgSharp.Mathematics.Numeric
|
||||
int ansHeight = p->AnsSecOffset;
|
||||
int commonK = p->LeftPrimOffset;
|
||||
|
||||
// int blocksPerRow = ansWidth / size;
|
||||
M128* enumeration = stackalloc M128[1];
|
||||
enumeration->Member<int>(2) = commonK;
|
||||
enumeration->Member<int>(3) = ansHeight;
|
||||
|
||||
// in this occasion size must be 1
|
||||
for (long c = offsetRef; c < offsetRef + lengthRef; c++)
|
||||
{
|
||||
int i = (int)(c / ansHeight);
|
||||
int j = (int)(c % ansHeight);
|
||||
for (int k = 0; k < commonK; k++) {
|
||||
NativeIntrinsic.Context
|
||||
.mat[f32].kernel_fma(
|
||||
GetKernelAddressUnsafe((MatrixKernel<float>*)leftBuffer,
|
||||
ansHeight, k, j),
|
||||
GetKernelAddressUnsafe((MatrixKernel<float>*)rightBuffer,
|
||||
commonK, j, k),
|
||||
GetKernelAddressUnsafe((MatrixKernel<float>*)ansBuffer,
|
||||
ansHeight, i, j));
|
||||
}
|
||||
enumeration->Member<int>(0) = i;
|
||||
enumeration->Member<int>(1) = j;
|
||||
NativeIntrinsic.Context.mat[f32].kernel_tile_fma(leftBuffer, rightBuffer, ansBuffer,
|
||||
enumeration);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,6 +87,8 @@ namespace StgSharp.Mathematics.Numeric
|
||||
int commonK = p->LeftPrimOffset;
|
||||
|
||||
M128* enumeration = stackalloc M128[1];
|
||||
enumeration->Member<int>(2) = commonK;
|
||||
enumeration->Member<int>(3) = ansHeight;
|
||||
|
||||
// in this occasion size must be 1
|
||||
for (long c = offsetRef; c < offsetRef + lengthRef; c++)
|
||||
@@ -99,8 +97,6 @@ namespace StgSharp.Mathematics.Numeric
|
||||
int j = (int)(c % ansHeight);
|
||||
enumeration->Member<int>(0) = i;
|
||||
enumeration->Member<int>(1) = j;
|
||||
enumeration->Member<int>(2) = commonK;
|
||||
enumeration->Member<int>(3) = ansHeight;
|
||||
NativeIntrinsic.Context.mat[f64].kernel_tile_fma(leftBuffer, rightBuffer, ansBuffer,
|
||||
enumeration);
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ namespace StgSharp.Mathematics.Numeric
|
||||
""";
|
||||
/**/
|
||||
current = MatrixParallelFactory.FromExistPackage(current);
|
||||
offset += length;
|
||||
offset = length;
|
||||
}
|
||||
|
||||
// Console.WriteLine(msg);
|
||||
|
||||
Reference in New Issue
Block a user