So, I read a blog about optimizing sorting int blocks, and the implementation was in c. I came to this line which I do not understand:
void nibble_sort_bucket(uint64_t buf[static 1024]) {
A buffer is basically data that needs to be sorted, and each int in it receives its own 4-bit blocks, so it is mainly intended for benchmarking. When I looked at using static code in c, I discovered two things.
- Keep function definitions private to the file.
- Saving the value of a variable between function calls.
None of them make sense here. Can someone explain why you ever put statics in front of a number and what it does?
c static
Siniyas
source share