55 void *xbar,
int *
j,
int *n){
62 const int nt = 1024/pow2;
63 const dim3 glsc3_nthrds(pow2, nt, 1);
64 const dim3 glsc3_nblcks(((*n)+nt - 1)/nt, 1, 1);
65 const int glsc3_nb = ((*n) + nt - 1)/nt;
71 <<<glsc3_nblcks, glsc3_nthrds, 0, stream>>>((
const real *) b,
74 proj_bufred_d, *
j, *n);
77 <<<(*j), 1024, 0, stream>>>(proj_bufred_d, glsc3_nb, *
j);
80 cudaMemcpyDeviceToDevice, stream));
83 cudaStreamSynchronize(stream);
86 const dim3 vec_nthrds(1024, 1, 1);
87 const dim3 vec_nblcks(((*n)+1024 - 1)/ 1024, 1, 1);
91 <<<vec_nblcks, vec_nthrds, 0, stream>>>((
real *) xbar,
99 <<<glsc3_nblcks, glsc3_nthrds, 0, stream>>>((
const real *) b,
102 proj_bufred_d, *
j, *n);
105 <<<(*j), 1024, 0, stream>>>(proj_bufred_d, glsc3_nb, *
j);
108 cudaMemcpyDeviceToDevice, stream));
110 cudaStreamSynchronize(stream);
115 <<<vec_nblcks, vec_nthrds, 0, stream>>>((
real *) xbar,
119 (
const real *) alpha,
124 void *
w,
void *xm,
int *
j,
int *n,
real *nrm){
132 const int nt = 1024/pow2;
133 const dim3 glsc3_nthrds(pow2, nt, 1);
134 const dim3 glsc3_nblcks(((*n)+nt - 1)/nt, 1, 1);
135 const int glsc3_nb = ((*n) + nt - 1)/nt;
141 <<<glsc3_nblcks, glsc3_nthrds, 0, stream>>>((
const real *) b,
144 proj_bufred_d, *
j, *n);
147 <<<(*j), 1024, 0, stream>>>(proj_bufred_d, glsc3_nb, *
j);
150 cudaMemcpyDeviceToDevice, stream));
152 cudaStreamSynchronize(stream);
156 sizeof(
real), cudaMemcpyDeviceToHost, stream));
160 const dim3 vec_nthrds(1024, 1, 1);
161 const dim3 vec_nblcks(((*n)+1024 - 1)/ 1024, 1, 1);
165 <<<vec_nblcks, vec_nthrds, 0, stream>>>((
real *) xm, (
const real **) xx,
167 (
const real *) alpha, *
j, *n);
171 <<<glsc3_nblcks, glsc3_nthrds, 0, stream>>>((
const real *) b,
174 proj_bufred_d, *
j, *n);
177 <<<(*j), 1024, 0, stream>>> (proj_bufred_d, glsc3_nb, *
j);
180 cudaMemcpyDeviceToDevice, stream));
182 cudaStreamSynchronize(stream);
187 <<<vec_nblcks, vec_nthrds, 0, stream>>>((
real *) xm, (
const real **) xx,
189 (
const real *) alpha, *
j, *n);
__global__ void glsc3_many_kernel(const T *a, const T **b, const T *c, T_acc *buf_h, const int j, const int n)
__global__ void project_ortho_vec_kernel(T *__restrict__ x, const T **xx, T *__restrict__ y, const T **yy, const T *__restrict__ alpha, const int p_cur, const int n)
__global__ void project_on_vec_kernel(T *__restrict__ x, const T **xx, T *__restrict__ y, const T **yy, const T *__restrict__ alpha, const int p_cur, const int n)
void cuda_project_ortho(void *alpha, void *b, void *xx, void *bb, void *w, void *xm, int *j, int *n, real *nrm)
void cuda_project_on(void *alpha, void *b, void *xx, void *bb, void *mult, void *xbar, int *j, int *n)