I've got a large pre-calculated 4D array written in C:
static float coeffs[257][4][8][2] =
{
{
{ { +0.999778485478688f, +0.021047089441095f }, { +1.000000000000000f, -0.000000000000000f }, { +0.999778485478688f, -0.021047089441095f }, { +0.999556987314086f, -0.029762881439599f }, { +0.999778485478688f, -0.021047089441095f }, { +1.000000000000000f, +0.000000000000000f }, { +0.999778485478688f, +0.021047089441095f }, { +0.999556987314086f, +0.029762881439599f }, },
{ { +0.999778485478688f, +0.021047089441095f }, { +0.999556987314086f, +0.029762881439599f }, { +0.999778485478688f, +0.021047089441095f }, { +1.000000000000000f, +0.000000000000000f }, { +0.999778485478688f, -0.021047089441095f }, { +0.999556987314086f, -0.029762881439599f }, { +0.999778485478688f, -0.021047089441095f }, { +1.000000000000000f, -0.000000000000000f }, },
{ { +0.999778485478688f, -0.021047089441095f }, { +1.000000000000000f, +0.000000000000000f }, { +0.999778485478688f, +0.021047089441095f }, { +0.999556987314086f, +0.029762881439599f }, { +0.999778485478688f, +0.021047089441095f }, { +1.000000000000000f, +0.000000000000000f }, { +0.999778485478688f, -0.021047089441095f }, { +0.999556987314086f, -0.029762881439599f }, },
{ { +0.999778485478688f, -0.021047089441095f }, { +0.999556987314086f, -0.029762881439599f }, { +0.999778485478688f, -0.021047089441095f }, { +1.000000000000000f, +0.000000000000000f }, { +0.999778485478688f, +0.021047089441095f }, { +0.999556987314086f, +0.029762881439599f }, { +0.999778485478688f, +0.021047089441095f }, { +1.000000000000000f, +0.000000000000000f }, },
},
.
.
.
},
}
It's about 1500 lines, so I would like to move it into a separate file.
The array should be static as it is used only in a single C file.
The question is, should such static arrays be moved into a header file and then included as #include "coeffs.h", or should they be a separate C file included as #include "coeffs.c"? Does it matter?