64 const dim3 nthrds(1024, 1, 1);
65 const dim3 nblcks(((*n)+1024 - 1)/ 1024, 1, 1);
66 const int nb = ((*n) + 1024 - 1)/ 1024;
74 <<<nblcks, nthrds, 0, stream>>>((
real *)
w, (
real **)
v,
76 (
real *) gmres_bfd1, *
j, *n);
85 cudaMemcpyDeviceToHost, stream));
86 cudaStreamSynchronize(stream);
88 if (
sizeof(
real) ==
sizeof(
float)) {
89 nvshmemx_float_sum_reduce_on_stream(NVSHMEM_TEAM_WORLD,
91 (
float *) gmres_bfd1, 1, stream);
93 else if (
sizeof(
real) ==
sizeof(
double)) {
94 nvshmemx_double_sum_reduce_on_stream(NVSHMEM_TEAM_WORLD,
95 (
double *) gmres_bfd1,
96 (
double *) gmres_bfd1, 1, stream);
99 cudaMemcpyDeviceToHost, stream));
100 cudaStreamSynchronize(stream);
102 cudaStreamSynchronize(stream);
107 cudaMemcpyDeviceToHost, stream));
108 cudaStreamSynchronize(stream);
__global__ void gmres_part2_kernel(T *__restrict__ w, T *const *__restrict__ v, const T *__restrict__ mult, const T *__restrict__ h, T *__restrict__ buf_h1, const int j, const int n)