Lines Matching full:cols
36 int cols; member
56 static elem_t* new_matrix(const int rows, const int cols) in new_matrix() argument
59 assert(cols > 0); in new_matrix()
60 return malloc(rows * cols * sizeof(elem_t)); in new_matrix()
70 static void init_matrix(elem_t* const a, const int rows, const int cols) in init_matrix() argument
77 a[i * cols + j] = 1.0 / (1 + abs(i-j)); in init_matrix()
84 const elem_t* const a, const int rows, const int cols) in print_matrix() argument
90 for (j = 0; j < cols; j++) in print_matrix()
92 printf("%g ", a[i * cols + j]); in print_matrix()
175 const int cols = p->cols; in gj_threadfunc() local
186 if (a[k * cols + i] > a[j * cols + i]) in gj_threadfunc()
193 for (k = 0; k < cols; k++) in gj_threadfunc()
195 const elem_t t = a[i * cols + k]; in gj_threadfunc()
196 a[i * cols + k] = a[j * cols + k]; in gj_threadfunc()
197 a[j * cols + k] = t; in gj_threadfunc()
201 aii = a[i * cols + i]; in gj_threadfunc()
203 for (k = i; k < cols; k++) in gj_threadfunc()
204 a[i * cols + k] /= aii; in gj_threadfunc()
212 const elem_t factor = a[j * cols + i]; in gj_threadfunc()
213 for (k = 0; k < cols; k++) in gj_threadfunc()
215 a[j * cols + k] -= a[i * cols + k] * factor; in gj_threadfunc()
223 static void gj(elem_t* const a, const int rows, const int cols) in gj() argument
231 assert(rows <= cols); in gj()
246 t[i].cols = cols; in gj()