void
qt_allpairs (const qarray *array1, const qarray *array2, const dist_f
distfunc);
void
qt_allpairs_output (const qarray *array1, const qarray *array2, const
dist_out_f distfunc, void *restrict *restrict output, const size_t outsize);
The distfunc function must match the following prototype:
int distfunc (void *a, void *b);
There are two forms of the All-Pairs abstraction: one (qt_allpairs)thatleavestheoutputtotheuser,andone (qt_allpairs_output) that handles collecting the output. In the latter case, the output must be a pointer to a two-dimensional array and outsize specifies the size of the elements within that array.