40 const int * __restrict__ mixed_msk,
44 const int * __restrict__ constraint_n,
45 const int * __restrict__ constraint_t1,
46 const int * __restrict__ constraint_t2,
47 const T * __restrict__ n,
48 const T * __restrict__ t1,
49 const T * __restrict__ t2,
52 const int idx = blockIdx.x * blockDim.x + threadIdx.x;
53 const int str = blockDim.x * gridDim.x;
55 for (
int i = idx;
i < m;
i += str) {
56 const int k = mixed_msk[
i];
57 const int off = 3 *
i;
63 T uloc_n = u1 * n[off] + u2 * n[off + 1] + u3 * n[off + 2];
64 T uloc_t1 = u1 * t1[off] + u2 * t1[off + 1] + u3 * t1[off + 2];
65 T uloc_t2 = u1 * t2[off] + u2 * t2[off + 1] + u3 * t2[off + 2];
67 if (constraint_n[
i] != 0)
69 if (constraint_t1[
i] != 0)
71 if (constraint_t2[
i] != 0)
74 x[k] = uloc_n * n[off] + uloc_t1 * t1[off] + uloc_t2 * t2[off];
75 y[k] = uloc_n * n[off + 1] + uloc_t1 * t1[off + 1] +
76 uloc_t2 * t2[off + 1];
77 z[k] = uloc_n * n[off + 2] + uloc_t1 * t1[off + 2] +
78 uloc_t2 * t2[off + 2];
__global__ void coupled_vector_bc_projector_apply_kernel(const int *__restrict__ mixed_msk, T *__restrict__ x, T *__restrict__ y, T *__restrict__ z, const int *__restrict__ constraint_n, const int *__restrict__ constraint_t1, const int *__restrict__ constraint_t2, const T *__restrict__ n, const T *__restrict__ t1, const T *__restrict__ t2, const int m)