You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
549 B

#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <stdint.h>
#include <stdbool.h>
#include <float.h>
/*
* Generate test data
*/
// generate some data such that we can reduce it later
void prepare_data(int size){
float * data = malloc(size * sizeof(float));
for(int i=0; i < size; i++){
data[i] = (float) i;
}
FILE * file = fopen("data.bin", "wb");
fwrite(data, size*sizeof(float), 1, file);
fclose(file);
free(data);
}
int main(){
int size = 100;
prepare_data(size);
return 0;
}