From f4313f64e56663de7c184a5121cfcd4b75d2ddf9 Mon Sep 17 00:00:00 2001 From: Martin Bauernfeind Date: Thu, 23 Jun 2022 19:34:16 +0200 Subject: [PATCH] :recycle: further refactoring step fixing --- src/force.cu | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/force.cu b/src/force.cu index f7ef307..f9329f7 100644 --- a/src/force.cu +++ b/src/force.cu @@ -91,14 +91,14 @@ __global__ void calc_force( atom_fz(i) = fiz; } -__global__ void kernel_initial_integrate(MD_FLOAT dtforce, MD_FLOAT dt, int Nlocal, Atom a) { +__global__ void kernel_initial_integrate(MD_FLOAT dtforce, MD_FLOAT dt, int Nlocal, Atom *a) { const int i = blockIdx.x * blockDim.x + threadIdx.x; if( i >= Nlocal ) { return; } - Atom *atom = &a; + Atom *atom = a; atom_vx(i) += dtforce * atom_fx(i); atom_vy(i) += dtforce * atom_fy(i); @@ -108,14 +108,14 @@ __global__ void kernel_initial_integrate(MD_FLOAT dtforce, MD_FLOAT dt, int Nloc atom_z(i) = atom_z(i) + dt * atom_vz(i); } -__global__ void kernel_final_integrate(MD_FLOAT dtforce, int Nlocal, Atom a) { +__global__ void kernel_final_integrate(MD_FLOAT dtforce, int Nlocal, Atom *a) { const int i = blockIdx.x * blockDim.x + threadIdx.x; if( i >= Nlocal ) { return; } - Atom *atom = &a; + Atom *atom = a; atom_vx(i) += dtforce * atom_fx(i); atom_vy(i) += dtforce * atom_fy(i);