From d5bdcfd66e0bc39d7b1b198aa54f4f2c59ee6242 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 17 Jan 2018 21:06:59 -0700 Subject: [PATCH] Fix CUDAVector::add_and_dot() for complex-valued vectors. --- source/lac/cuda_vector.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.; -- 2.39.5