From: Daniel Arndt Date: Wed, 10 Jul 2019 16:00:16 +0000 (-0400) Subject: Address comments X-Git-Tag: v9.2.0-rc1~1390^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F8363%2Fhead;p=dealii.git Address comments --- diff --git a/tests/cuda/matrix_free_no_index_initialize.cu b/tests/cuda/matrix_free_no_index_initialize.cu index f8987d83be..85b2a780ac 100644 --- a/tests/cuda/matrix_free_no_index_initialize.cu +++ b/tests/cuda/matrix_free_no_index_initialize.cu @@ -24,11 +24,6 @@ #include "../tests.h" -// forward declare this function -template -void -test(); - template 1 ? threadIdx.y : 0) * n_q_points_1d + (dim > 2 ? threadIdx.z : 0) * n_q_points_1d * n_q_points_1d; - bool const evaluate_values = true; - bool const evaluate_gradients = true; - // set to unit vector fe_eval.submit_dof_value(1., tid); __syncthreads(); - fe_eval.evaluate(evaluate_values, evaluate_gradients); + fe_eval.evaluate(/*evaluate_values =*/true, /*evaluate_gradients=*/true); +#ifndef __APPLE__ // values should evaluate to one, derivatives to zero - assert(fe_eval.get_dof_value(tid) == 1.); assert(fe_eval.get_value(tid) == 1.); for (unsigned int e = 0; e < dim; ++e) assert(fe_eval.get_gradient(tid)[e] == 0.); + + fe_eval.integrate(/*integrate_values = */ true, + /*integrate_gradients=*/true); + assert(fe_eval.get_dof_value(tid) == 1.); +#endif } @@ -88,6 +85,7 @@ public: AssertCuda(cudaGetLastError()); // Check that there was no problem during the execution of the kernel AssertCuda(cudaDeviceSynchronize()); + deallog << "OK" << std::endl; }; @@ -117,16 +115,6 @@ do_test(const DoFHandler & dof, } -int -main() -{ - initlog(); - deal_II_exceptions::disable_abort_on_exception(); - - test<2, 1>(); -} - - template void test() @@ -156,3 +144,15 @@ test() do_test(dof, constraints); } + + + +int +main() +{ + initlog(); + + init_cuda(); + + test<2, 1>(); +}