1 #ifndef __SCALAR_SCALAR_RESIDUAL_UPDATE_KERNEL_H__
2 #define __SCALAR_SCALAR_RESIDUAL_UPDATE_KERNEL_H__
37 template<
typename T >
39 const T * __restrict__ f_s,
42 const int idx = blockIdx.x * blockDim.x + threadIdx.x;
43 const int str = blockDim.x * gridDim.x;
45 for (
int i = idx;
i < n;
i += str) {
46 s_res[
i] = (-s_res[
i]) + f_s[
i];
__global__ void scalar_residual_update_kernel(T *__restrict__ s_res, const T *__restrict__ f_s, const int n)