forked from OSchip/llvm-project
[NFC] Fix typos in getMacroKernelParams.
llvm-svn: 289808
This commit is contained in:
parent
67c90c7d95
commit
15db81ef71
|
@ -610,17 +610,15 @@ getMacroKernelParams(const MicroKernelParamsTy &MicroKernelParams) {
|
||||||
CacheLevelSizes[0] > 0 && CacheLevelSizes[1] > 0 &&
|
CacheLevelSizes[0] > 0 && CacheLevelSizes[1] > 0 &&
|
||||||
CacheLevelAssociativity[0] > 2 && CacheLevelAssociativity[1] > 2))
|
CacheLevelAssociativity[0] > 2 && CacheLevelAssociativity[1] > 2))
|
||||||
return {1, 1, 1};
|
return {1, 1, 1};
|
||||||
int Cbr = floor(
|
int Car = floor(
|
||||||
(CacheLevelAssociativity[0] - 1) /
|
(CacheLevelAssociativity[0] - 1) /
|
||||||
(1 + static_cast<double>(MicroKernelParams.Nr) / MicroKernelParams.Mr));
|
(1 + static_cast<double>(MicroKernelParams.Nr) / MicroKernelParams.Mr));
|
||||||
int Kc = (Cbr * CacheLevelSizes[0]) /
|
int Kc = (Car * CacheLevelSizes[0]) /
|
||||||
(MicroKernelParams.Mr * CacheLevelAssociativity[0] * 8);
|
(MicroKernelParams.Mr * CacheLevelAssociativity[0] * 8);
|
||||||
double Cac = static_cast<double>(Kc * 8 * CacheLevelAssociativity[1]) /
|
double Cac = static_cast<double>(Kc * 8 * CacheLevelAssociativity[1]) /
|
||||||
CacheLevelSizes[1];
|
CacheLevelSizes[1];
|
||||||
double Cbc = static_cast<double>(Kc * 8 * CacheLevelAssociativity[1]) /
|
|
||||||
CacheLevelSizes[1];
|
|
||||||
int Mc = floor((CacheLevelAssociativity[1] - 2) / Cac);
|
int Mc = floor((CacheLevelAssociativity[1] - 2) / Cac);
|
||||||
int Nc = floor(1 / Cbc);
|
int Nc = floor(1 / Cac);
|
||||||
return {Mc, Nc, Kc};
|
return {Mc, Nc, Kc};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue