44 const T * __restrict__ tau_y_d,
45 const T * __restrict__ tau_z_d,
46 T * __restrict__ tau_field_d,
47 const int * __restrict__ msk_d,
49 const int idx = blockIdx.x * blockDim.x + threadIdx.x;
50 const int str = blockDim.x * gridDim.x;
52 for (
int i = idx;
i < m;
i += str) {
54 T magtau = sqrt(tau_x_d[
i] * tau_x_d[
i] +
55 tau_y_d[
i] * tau_y_d[
i] +
56 tau_z_d[
i] * tau_z_d[
i]);
59 tau_field_d[msk_d[
i + 1] - 1] = magtau;
__global__ void wall_model_compute_mag_field(const T *__restrict__ tau_x_d, const T *__restrict__ tau_y_d, const T *__restrict__ tau_z_d, T *__restrict__ tau_field_d, const int *__restrict__ msk_d, const int m)