L4 completely add support for multi predictor, working on ver 5 mat para
This commit is contained in:
@@ -43,6 +43,7 @@ namespace StgSharp.HighPerformance.Memory
|
|||||||
throw new OverflowException("Too many activated cache line in external reference.");
|
throw new OverflowException("Too many activated cache line in external reference.");
|
||||||
}
|
}
|
||||||
IL4Predict predict = CurrentPredict;
|
IL4Predict predict = CurrentPredict;
|
||||||
|
int predictIndex = CurrentPredictIndex;
|
||||||
Span<CacheLinePrediction> span = new(_prediction, PredictionCount);
|
Span<CacheLinePrediction> span = new(_prediction, PredictionCount);
|
||||||
PredictResult result = predict.Predict(span, out int actualCount);
|
PredictResult result = predict.Predict(span, out int actualCount);
|
||||||
if ((result & PredictResult.Exhausted) != 0) {
|
if ((result & PredictResult.Exhausted) != 0) {
|
||||||
@@ -89,7 +90,7 @@ namespace StgSharp.HighPerformance.Memory
|
|||||||
IL4Predict belong = predictorSpan[predictId];
|
IL4Predict belong = predictorSpan[predictId];
|
||||||
if (predict.IsSamePolicy(head->_profile, belong))
|
if (predict.IsSamePolicy(head->_profile, belong))
|
||||||
{
|
{
|
||||||
head->_predictor = predictId; // wrong line
|
head->_predictor =predictIndex;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
belong.WriteBack(head->_origin, head->_profile, new ReadOnlySpan<byte>((byte*)head->_address, Unsafe.SizeOf<CacheLineData>()));
|
belong.WriteBack(head->_origin, head->_profile, new ReadOnlySpan<byte>((byte*)head->_address, Unsafe.SizeOf<CacheLineData>()));
|
||||||
|
|||||||
@@ -5,6 +5,15 @@
|
|||||||
<None Remove="Numeric\MatrixParallelWrap.cs.old" />
|
<None Remove="Numeric\MatrixParallelWrap.cs.old" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Numeric\Runtime\MatrixParallel.Await.old" />
|
||||||
|
<Compile Include="Numeric\Runtime\MatrixParallel.AwaitingQueue.old" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Numeric\Runtime\MatrixParallel.Publish.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\StgSharp.Common\StgSharp.Common.csproj" />
|
<ProjectReference Include="..\StgSharp.Common\StgSharp.Common.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user