34 for (i = 0; i <
N; i++)
35 for (j = 0; j <
M; j++)
51 for (i = 0; i < m; i++)
52 for (j = 0; j < m; j++) {
64 void kernel_covariance(
int m,
int n,
73 for (j = 0; j <
_PB_M; j++)
76 for (i = 0; i <
_PB_N; i++)
77 mean[j] += data[i][j];
81 for (i = 0; i <
_PB_N; i++)
82 for (j = 0; j <
_PB_M; j++)
83 data[i][j] -= mean[j];
85 for (i = 0; i <
_PB_M; i++)
86 for (j = i; j <
_PB_M; j++)
89 for (k = 0; k <
_PB_N; k++)
90 cov[i][j] += data[k][i] * data[k][j];
92 cov[j][i] = cov[i][j];
99 int main(
int argc,
char** argv)
119 kernel_covariance (m, n, float_n,
#define POLYBENCH_ARRAY(x)
#define POLYBENCH_DUMP_BEGIN(s)
#define POLYBENCH_FREE_ARRAY(x)
#define POLYBENCH_2D(var, dim1, dim2, ddim1, ddim2)
static void init_array(int m, int n, DATA_TYPE *float_n, DATA_TYPE POLYBENCH_2D(data, N, M, n, m))
This version is stamped on May 10, 2016.
__attribute__((noinline))
Convert the given fixedpt number to a decimal string.
static const uint32_t k[]
int main(int argc, char **argv)
#define POLYBENCH_DUMP_START
#define POLYBENCH_2D_ARRAY_DECL(var, type, dim1, dim2, ddim1, ddim2)
#define DATA_PRINTF_MODIFIER
#define polybench_prevent_dce(func)
#define POLYBENCH_DUMP_TARGET
#define POLYBENCH_DUMP_END(s)
static void print_array(int m, DATA_TYPE POLYBENCH_2D(cov, M, M, m, m))
#define POLYBENCH_1D(var, dim1, ddim1)
#define POLYBENCH_DUMP_FINISH
#define POLYBENCH_1D_ARRAY_DECL(var, type, dim1, ddim1)
#define polybench_stop_instruments
#define polybench_print_instruments
#define polybench_start_instruments