33 for (i = 0; i < m; i++)
34 for (j = 0; j < n; j++) {
35 A[i][j] = (((
DATA_TYPE) ((i*j) % m) / m )*100) + 10;
38 for (i = 0; i < n; i++)
39 for (j = 0; j < n; j++)
56 for (i = 0; i < n; i++)
57 for (j = 0; j < n; j++) {
64 for (i = 0; i < m; i++)
65 for (j = 0; j < n; j++) {
79 void kernel_gramschmidt(
int m,
int n,
89 for (k = 0; k <
_PB_N; k++)
92 for (i = 0; i <
_PB_M; i++)
93 nrm +=
A[i][k] *
A[i][k];
95 for (i = 0; i <
_PB_M; i++)
96 Q[i][k] =
A[i][k] /
R[k][k];
97 for (j = k + 1; j <
_PB_N; j++)
100 for (i = 0; i <
_PB_M; i++)
101 R[k][j] += Q[i][k] *
A[i][j];
102 for (i = 0; i <
_PB_M; i++)
103 A[i][j] =
A[i][j] - Q[i][k] *
R[k][j];
111 int main(
int argc,
char** argv)
132 kernel_gramschmidt (m, n,
#define POLYBENCH_ARRAY(x)
#define POLYBENCH_DUMP_BEGIN(s)
#define POLYBENCH_FREE_ARRAY(x)
#define POLYBENCH_2D(var, dim1, dim2, ddim1, ddim2)
static const uint32_t k[]
static void init_array(int m, int n, DATA_TYPE POLYBENCH_2D(A, M, N, m, n), DATA_TYPE POLYBENCH_2D(R, N, N, n, n), DATA_TYPE POLYBENCH_2D(Q, M, N, m, n))
This version is stamped on May 10, 2016.
#define POLYBENCH_DUMP_START
#define POLYBENCH_2D_ARRAY_DECL(var, type, dim1, dim2, ddim1, ddim2)
#define DATA_PRINTF_MODIFIER
__attribute__((noinline))
Convert the given fixedpt number to a decimal string.
#define polybench_prevent_dce(func)
#define POLYBENCH_DUMP_TARGET
#define POLYBENCH_DUMP_END(s)
int main(int argc, char **argv)
static void print_array(int m, int n, DATA_TYPE POLYBENCH_2D(A, M, N, m, n), DATA_TYPE POLYBENCH_2D(R, N, N, n, n), DATA_TYPE POLYBENCH_2D(Q, M, N, m, n))
#define POLYBENCH_DUMP_FINISH
#define polybench_stop_instruments
#define polybench_print_instruments
#define polybench_start_instruments