diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2019-08-14 11:45:34 +0200 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2019-08-14 11:45:34 +0200 |
commit | d9261bdb05cd0863a2c3747c812871dbb851646e (patch) | |
tree | d1a81110e3fe213747a58f236e021a085417f663 /cuda/3d/sirt3d.cu | |
parent | 9a58b7451179ed512f975bc4c90fb71f172250b9 (diff) | |
download | astra-d9261bdb05cd0863a2c3747c812871dbb851646e.tar.gz astra-d9261bdb05cd0863a2c3747c812871dbb851646e.tar.bz2 astra-d9261bdb05cd0863a2c3747c812871dbb851646e.tar.xz astra-d9261bdb05cd0863a2c3747c812871dbb851646e.zip |
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.
Diffstat (limited to 'cuda/3d/sirt3d.cu')
-rw-r--r-- | cuda/3d/sirt3d.cu | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/cuda/3d/sirt3d.cu b/cuda/3d/sirt3d.cu index 332589e..869b2fd 100644 --- a/cuda/3d/sirt3d.cu +++ b/cuda/3d/sirt3d.cu @@ -235,8 +235,6 @@ bool SIRT::setBuffers(cudaPitchedPtr& _D_volumeData, bool SIRT::iterate(unsigned int iterations) { - shouldAbort = false; - if (useVolumeMask || useSinogramMask) precomputeWeights(); @@ -267,7 +265,7 @@ bool SIRT::iterate(unsigned int iterations) // 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, dims); |