51 int *p_cur,
int *p_space,
int *n) {
53 const dim3 nthrds(1024, 1, 1);
54 const dim3 nblcks(((*n) + 1024 - 1) / 1024, 1, 1);
59 (
real *) beta, *p_cur, *p_space, *n);
64 void *u2,
void *
w,
void *z,
65 void *ni,
void *mi,
real *alpha,
66 real *beta,
void *mult,
67 real *reduction,
int *n) {
69 const dim3 nthrds(1024, 1, 1);
70 const dim3 nblcks(((*n) + 1024 - 1)/ 1024, 1, 1);
71 const int nb = ((*n) + 1024 - 1)/ 1024;
77 real *buf_d2 = buf_d1 + nb;
78 real *buf_d3 = buf_d1 + 2*nb;
81 nblcks, nthrds, 0, stream,
84 (
real *) ni, (
real *) mi, *alpha, *beta,
85 (
real *) mult, buf_d1, buf_d2, buf_d3, *n);
89 1, 1024, 0 , stream, buf_d1, nb);
92 1, 1024, 0 , stream, buf_d2, nb);
95 1, 1024, 0 , stream, buf_d3, nb);
99 hipMemcpyDeviceToHost, stream));
102 hipMemcpyDeviceToHost, stream));
105 hipMemcpyDeviceToHost, stream));
110 reduction[0] = buf[0];
111 reduction[1] = buf[1];
112 reduction[2] = buf[2];
__global__ void pipecg_vecops_kernel(T *__restrict__ p, T *__restrict__ q, T *__restrict__ r, T *__restrict__ s, T *__restrict__ u1, T *__restrict__ u2, T *__restrict__ w, T *__restrict__ z, T *__restrict__ ni, T *__restrict__ mi, const T alpha, const T beta, const T *mult, T *buf_h1, T *buf_h2, T *buf_h3, const int n)
__global__ void cg_update_xp_kernel(T *__restrict__ x, T *__restrict__ p, T **__restrict__ u, const T *alpha, const T *beta, const int p_cur, const int p_space, const int n)
void hip_cg_update_xp(void *x, void *p, void *u, void *alpha, void *beta, int *p_cur, int *p_space, int *n)
void hip_pipecg_vecops(void *p, void *q, void *r, void *s, void *u1, void *u2, void *w, void *z, void *ni, void *mi, real *alpha, real *beta, void *mult, real *reduction, int *n)