diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2015-10-09 16:40:39 +0200 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2015-10-09 16:40:39 +0200 |
commit | 4298c2f212aac1e76f1f123ab199749a9a668415 (patch) | |
tree | f92a4b7b6a04df3e3818ad2bf335140c8e91a811 /src/CudaReconstructionAlgorithm2D.cpp | |
parent | c7128284fdbbfa0d4a5cbc951b9cdeaf8f9b41e0 (diff) | |
download | astra-4298c2f212aac1e76f1f123ab199749a9a668415.tar.gz astra-4298c2f212aac1e76f1f123ab199749a9a668415.tar.bz2 astra-4298c2f212aac1e76f1f123ab199749a9a668415.tar.xz astra-4298c2f212aac1e76f1f123ab199749a9a668415.zip |
Give a warning on ignored Min/MaxContraint in some CUDA algorithms.
Previously it would fail an assertion.
Diffstat (limited to 'src/CudaReconstructionAlgorithm2D.cpp')
-rw-r--r-- | src/CudaReconstructionAlgorithm2D.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/CudaReconstructionAlgorithm2D.cpp b/src/CudaReconstructionAlgorithm2D.cpp index 71b6637..18627fc 100644 --- a/src/CudaReconstructionAlgorithm2D.cpp +++ b/src/CudaReconstructionAlgorithm2D.cpp @@ -462,10 +462,18 @@ void CCudaReconstructionAlgorithm2D::run(int _iNrIterations) ASTRA_ASSERT(ok); - if (m_bUseMinConstraint) - ok &= m_pAlgo->setMinConstraint(m_fMinValue); - if (m_bUseMaxConstraint) - ok &= m_pAlgo->setMaxConstraint(m_fMaxValue); + if (m_bUseMinConstraint) { + bool ret = m_pAlgo->setMinConstraint(m_fMinValue); + if (!ret) { + ASTRA_WARN("This algorithm ignores MinConstraint"); + } + } + if (m_bUseMaxConstraint) { + bool ret= m_pAlgo->setMaxConstraint(m_fMaxValue); + if (!ret) { + ASTRA_WARN("This algorithm ignores MaxConstraint"); + } + } ok &= m_pAlgo->iterate(_iNrIterations); ASTRA_ASSERT(ok); |