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.");
|
||||
}
|
||||
IL4Predict predict = CurrentPredict;
|
||||
int predictIndex = CurrentPredictIndex;
|
||||
Span<CacheLinePrediction> span = new(_prediction, PredictionCount);
|
||||
PredictResult result = predict.Predict(span, out int actualCount);
|
||||
if ((result & PredictResult.Exhausted) != 0) {
|
||||
@@ -89,7 +90,7 @@ namespace StgSharp.HighPerformance.Memory
|
||||
IL4Predict belong = predictorSpan[predictId];
|
||||
if (predict.IsSamePolicy(head->_profile, belong))
|
||||
{
|
||||
head->_predictor = predictId; // wrong line
|
||||
head->_predictor =predictIndex;
|
||||
} else
|
||||
{
|
||||
belong.WriteBack(head->_origin, head->_profile, new ReadOnlySpan<byte>((byte*)head->_address, Unsafe.SizeOf<CacheLineData>()));
|
||||
|
||||
Reference in New Issue
Block a user