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 /include/astra/cuda | |
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 'include/astra/cuda')
-rw-r--r-- | include/astra/cuda/2d/algo.h | 4 | ||||
-rw-r--r-- | include/astra/cuda/3d/algo3d.h | 5 | ||||
-rw-r--r-- | include/astra/cuda/3d/astra3d.h | 8 |
3 files changed, 0 insertions, 17 deletions
diff --git a/include/astra/cuda/2d/algo.h b/include/astra/cuda/2d/algo.h index 2ce929c..3fccdef 100644 --- a/include/astra/cuda/2d/algo.h +++ b/include/astra/cuda/2d/algo.h @@ -56,8 +56,6 @@ public: bool setSuperSampling(int raysPerDet, int raysPerPixelDim); - void signalAbort() { shouldAbort = true; } - virtual bool enableVolumeMask(); virtual bool enableSinogramMask(); @@ -137,8 +135,6 @@ protected: SFanProjection* fanProjs; float fOutputScale; - volatile bool shouldAbort; - bool freeGPUMemory; // Input/output diff --git a/include/astra/cuda/3d/algo3d.h b/include/astra/cuda/3d/algo3d.h index f5fd207..b6b1db7 100644 --- a/include/astra/cuda/3d/algo3d.h +++ b/include/astra/cuda/3d/algo3d.h @@ -41,8 +41,6 @@ public: bool setConeGeometry(const SDimensions3D& dims, const SConeProjection* projs, const SProjectorParams3D& params); bool setPar3DGeometry(const SDimensions3D& dims, const SPar3DProjection* projs, const SProjectorParams3D& params); - void signalAbort() { shouldAbort = true; } - protected: void reset(); @@ -59,9 +57,6 @@ protected: SPar3DProjection* par3DProjs; float fOutputScale; - - volatile bool shouldAbort; - }; diff --git a/include/astra/cuda/3d/astra3d.h b/include/astra/cuda/3d/astra3d.h index 28a8f01..a97efd6 100644 --- a/include/astra/cuda/3d/astra3d.h +++ b/include/astra/cuda/3d/astra3d.h @@ -157,10 +157,6 @@ public: // It can be called after iterate(). float computeDiffNorm(); - // Signal the algorithm that it should abort after the current iteration. - // This is intended to be called from another thread. - void signalAbort(); - protected: AstraSIRT3d_internal *pData; }; @@ -274,10 +270,6 @@ public: // It can be called after iterate(). float computeDiffNorm(); - // Signal the algorithm that it should abort after the current iteration. - // This is intended to be called from another thread. - void signalAbort(); - protected: AstraCGLS3d_internal *pData; }; |