I'm working on a code in C++ but i'm not sure what a[set][i]++;
does. I was assuming that the value located in that array was incremented by 1, but i'm not sure.
Also, what's the function of assert(0);
in the code?
Thank for your help!
The code block is:
for (i=0; i<1S; i++)
{
if (a[637][i] < a[637][15])
{
a[637][i]++;
if (a[637][i] == 15)
assert(0);
}
}
a[637][15] = 0;
Edit:
Sorry i forgot to mention the background.
The definition of a
is uint32_t a[2048][16];
so 637 and i are values from a particular loop in order to compare them with another 2D array and then choose which line to evict. This is for a cache replacement policy but i just was curious for those cases. Thanks!