From d9261bdb05cd0863a2c3747c812871dbb851646e Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Wed, 14 Aug 2019 11:45:34 +0200 Subject: Replace signal-based abort handling by query-based handling The abort handling is currently only used to process Ctrl-C from Matlab. Since Matlab R2019a, it appears that calling utIsInterruptPending() from a thread other than the main thread will crash. The previous approach of checking utIsInterruptPending() in a thread, and then signalling the running algorithm was therefore broken. --- cuda/2d/sirt.cu | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'cuda/2d/sirt.cu') diff --git a/cuda/2d/sirt.cu b/cuda/2d/sirt.cu index 7ec377c..2621490 100644 --- a/cuda/2d/sirt.cu +++ b/cuda/2d/sirt.cu @@ -238,13 +238,11 @@ bool SIRT::uploadMinMaxMasks(const float* pfMinMaskData, const float* pfMaxMaskD bool SIRT::iterate(unsigned int iterations) { - shouldAbort = false; - if (useVolumeMask || useSinogramMask) precomputeWeights(); // iteration - for (unsigned int iter = 0; iter < iterations && !shouldAbort; ++iter) { + for (unsigned int iter = 0; iter < iterations && !astra::shouldAbort(); ++iter) { // copy sinogram to projection data duplicateProjectionData(D_projData, D_sinoData, projPitch, dims); -- cgit v1.2.3