From: Wolfgang Bangerth Date: Thu, 18 Jan 2018 04:06:59 +0000 (-0700) Subject: Fix CUDAVector::add_and_dot() for complex-valued vectors. X-Git-Tag: v9.0.0-rc1~553^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5bdcfd66e0bc39d7b1b198aa54f4f2c59ee6242;p=dealii.git Fix CUDAVector::add_and_dot() for complex-valued vectors. --- diff --git a/source/lac/cuda_vector.cu b/source/lac/cuda_vector.cu index 355383bf27..41501d8968 100644 --- a/source/lac/cuda_vector.cu +++ b/source/lac/cuda_vector.cu @@ -451,7 +451,7 @@ namespace LinearAlgebra if (global_idx < N) { v1[global_idx] += a*v2[global_idx]; - res_buf[local_idx] = v1[global_idx]*v3[global_idx]; + res_buf[local_idx] = v1[global_idx] * Number(numbers::NumberTraits::conjugate(v3[global_idx])); } else res_buf[local_idx] = 0.;