From aa80b7b0895cd7b2701b8c6d4136eeaf12d29929 Mon Sep 17 00:00:00 2001 From: dkazanc Date: Tue, 26 Feb 2019 15:29:56 +0000 Subject: tgv_upd2 --- Core/regularisers_GPU/TGV_GPU_core.cu | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/regularisers_GPU/TGV_GPU_core.cu b/Core/regularisers_GPU/TGV_GPU_core.cu index 3f3c67c..849219b 100644 --- a/Core/regularisers_GPU/TGV_GPU_core.cu +++ b/Core/regularisers_GPU/TGV_GPU_core.cu @@ -70,7 +70,7 @@ __global__ void DualP_2D_kernel(float *U, float *V1, float *V2, float *P1, float return; } -__global__ void ProjP_2D_kernel(float *P1, float *P2, long dimX, long dimY, long num_total, float alpha1) +__global__ void ProjP_2D_kernel(float *P1, float *P2, long dimX, long dimY, float alpha1) { float grad_magn; @@ -288,10 +288,10 @@ __global__ void DualP_3D_kernel(float *U, float *V1, float *V2, float *V3, float else if (i == dimX-1) P1[index] -= sigma*(V1[index]); else P1[index] = 0.0f; if ((j >= 0) && (j < dimY-1)) P2[index] += sigma*((U[(dimX*dimY)*k + i*dimX+(j+1)] - U[index]) - V2[index]); - else if P2[index] -= sigma*(V2[index]); + else if (j == dimY-1) P2[index] -= sigma*(V2[index]); else P2[index] = 0.0f; if ((k >= 0) && (k < dimZ-1)) P3[index] += sigma*((U[(dimX*dimY)*(k+1) + i*dimX+(j)] - U[index]) - V3[index]); - else if P3[index] -= sigma*(V3[index]); + else if (k == dimZ-1) P3[index] -= sigma*(V3[index]); else P3[index] = 0.0f; } return; -- cgit v1.2.3