7 #define UNUSED __attribute__((unused))
23 int r = rand_r(&
seedp);
25 if (count == 6) count = 20;
37 void** output,
int* output_length)
40 int length = count *
sizeof(double);
41 *output = calloc(count,
sizeof(
double));
42 *output_length = length;
47 double** intensity,
int* intensity_count,
48 double** weight,
int* weight_count)
50 double* p = (
double*) fragment;
53 *intensity_count = 512;
59 int* i,
int* j,
int* k);
68 for (
int c = 0; c < count; c++)
72 &entry->
i, &entry->
j, &entry->
k);
81 *output_count = count;
86 int* i,
int* j,
int* k)
99 void* buffer = malloc(5 *
sizeof(
int) +
102 if (!buffer)
return false;
108 for (
int i = 0; i < output_count; i++)
110 free(outputs[i]->intensity);
111 free(outputs[i]->weight);
static void initialize(void)
bool forward_transform(int max_i, int max_j, int max_k, UNUSED int i, UNUSED int j, UNUSED int k, UNUSED double *intensity, int UNUSED intensity_count, UNUSED double *weight, UNUSED int weight_count, output_entry **output, int *output_count)
static unsigned int seedp
bool serialize_output_entries(output_entry *output)
output_entry ** allocate_output_entries(int count)
static int random_output_count(void)
bool read_hdf_fragment(UNUSED const char *filename, void **output, int *output_length)
bool unpack_fragment(void *fragment, UNUSED void *fragment_length, double **intensity, int *intensity_count, double **weight, int *weight_count)
void free_output_entries(output_entry **outputs, int output_count)
static void random_indices(int max_i, int max_j, int max_k, int *i, int *j, int *k)