/usr/share/doc/gprbuild-doc/examples/matrix/src/initmat.c is in gprbuild-doc 2014dfsg-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | /* Initialize a matrix with random values */
#include <stdlib.h>
#include <stdlib.h>
void
initmat (float *mat, int nb_line, int nb_column)
{
int column, line;
for (line=0; line<nb_line; line++)
for (column=0; column<nb_column; column++)
*(mat + column + line*nb_column) = (float) rand() / RAND_MAX;
}
|