So i was reading a blog about optimizing sorting of blocks of an int and the implementation was in c. I came over this line that i do not understand:
void nibble_sort_bucket(uint64_t buf[static 1024]) {
The buffer is basically data to be sorted and each int in it gets its blocks of 4 bit sorted, so it is basically for benchmarking. When i looked up the usage of static in c i found two things.
- Keeping function definitions private to a file.
- Keeping a variable value between calls of a function.
Neither of these makes sense here. Can someone explain why you would ever write static in front of a number and what that does?