diff options
author | Willem Jan Palenstijn <wjp@usecode.org> | 2015-10-15 17:08:41 +0200 |
---|---|---|
committer | Willem Jan Palenstijn <wjp@usecode.org> | 2015-10-15 17:08:41 +0200 |
commit | d4d7ae8c560e5511b6453ef8eca220677b504169 (patch) | |
tree | 591e768235f83a0dc2174881c500efad50b04f00 /src | |
parent | 9e93324bbfe13fed362d613a9cf16af87dc5b14f (diff) | |
parent | 4298c2f212aac1e76f1f123ab199749a9a668415 (diff) | |
download | astra-d4d7ae8c560e5511b6453ef8eca220677b504169.tar.gz astra-d4d7ae8c560e5511b6453ef8eca220677b504169.tar.bz2 astra-d4d7ae8c560e5511b6453ef8eca220677b504169.tar.xz astra-d4d7ae8c560e5511b6453ef8eca220677b504169.zip |
Merge pull request #96 from wjp/cuda_constraint_warning
Give a warning on ignored Min/MaxContraint in some CUDA algorithms.
Diffstat (limited to 'src')
-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); |