From: Bruno Turcksin Date: Thu, 2 Sep 2021 17:52:22 +0000 (+0000) Subject: Fix size of data copied to constant memory and add missing include X-Git-Tag: v9.4.0-rc1~1006^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F12735%2Fhead;p=dealii.git Fix size of data copied to constant memory and add missing include --- diff --git a/include/deal.II/matrix_free/cuda_matrix_free.templates.h b/include/deal.II/matrix_free/cuda_matrix_free.templates.h index 0d2fc60ad2..1bd8d75285 100644 --- a/include/deal.II/matrix_free/cuda_matrix_free.templates.h +++ b/include/deal.II/matrix_free/cuda_matrix_free.templates.h @@ -274,7 +274,9 @@ namespace CUDAWrappers cudaError_t error_code = cudaMemcpyToSymbol( constraint_weights, shape_info.data.front().subface_interpolation_matrix.data(), - sizeof(double) * fe.n_dofs_per_face(0) * fe.n_dofs_per_face(0)); + sizeof(double) * + shape_info.data.front().subface_interpolation_matrix.size()); + AssertCuda(error_code); local_dof_indices.resize(data->dofs_per_cell); lexicographic_dof_indices.resize(dofs_per_cell); diff --git a/tests/cuda/cuda_vector_05.cu b/tests/cuda/cuda_vector_05.cu index d11c598774..8c2dd8963d 100644 --- a/tests/cuda/cuda_vector_05.cu +++ b/tests/cuda/cuda_vector_05.cu @@ -18,6 +18,7 @@ #include #include +#include #include #include