From 85076f903062da445c6cc2bd1fa8617b91b32471 Mon Sep 17 00:00:00 2001 From: Yohai Meiron Date: Fri, 7 Feb 2020 20:49:17 +0100 Subject: [PATCH] Moved data member initializer into constructor --- src/scf.cu | 2 ++ src/scf.hpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/scf.cu b/src/scf.cu index 5cbed0a..494993f 100644 --- a/src/scf.cu +++ b/src/scf.cu @@ -63,6 +63,8 @@ etics::scf::scfclass::scfclass() { N=0; Nmax=0; k3gs=-1; k3bs=-1; k4gs=-1; k4bs=-1; + PartialSum = NULL; + PartialSum_h = NULL; } etics::scf::scfclass::~scfclass() { diff --git a/src/scf.hpp b/src/scf.hpp index 87e902d..84fd5a9 100644 --- a/src/scf.hpp +++ b/src/scf.hpp @@ -52,8 +52,8 @@ namespace etics { //WARNING we just hardcode 1024 as the maximum size of the coefficient structure. This is because having NMAX and LMAX here causes problems. Complex A_h[1024]; CacheStruct Cache_h; - Complex *PartialSum = NULL; - Complex *PartialSum_h = NULL; + Complex *PartialSum; + Complex *PartialSum_h; int k3gs, k3bs, k4gs, k4bs; void CalculateCoefficients(int n, int l); };