summaryrefslogtreecommitdiffstats
path: root/src/CudaReconstructionAlgorithm2D.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <WillemJan.Palenstijn@uantwerpen.be>2014-04-02 14:21:59 +0000
committerwpalenst <WillemJan.Palenstijn@uantwerpen.be>2014-04-02 14:21:59 +0000
commit2895e27613dab0815e9f0f2f0ed7853d31f856b4 (patch)
tree851d7171e07aa6db322cbf9286107b3db20f6a4e /src/CudaReconstructionAlgorithm2D.cpp
parent1d1e084d501883784eab283c622cb28510f36d27 (diff)
downloadastra-2895e27613dab0815e9f0f2f0ed7853d31f856b4.tar.gz
astra-2895e27613dab0815e9f0f2f0ed7853d31f856b4.tar.bz2
astra-2895e27613dab0815e9f0f2f0ed7853d31f856b4.tar.xz
astra-2895e27613dab0815e9f0f2f0ed7853d31f856b4.zip
Add global astra_set_gpu_index function
Diffstat (limited to 'src/CudaReconstructionAlgorithm2D.cpp')
-rw-r--r--src/CudaReconstructionAlgorithm2D.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/CudaReconstructionAlgorithm2D.cpp b/src/CudaReconstructionAlgorithm2D.cpp
index d567158..385cef1 100644
--- a/src/CudaReconstructionAlgorithm2D.cpp
+++ b/src/CudaReconstructionAlgorithm2D.cpp
@@ -76,7 +76,7 @@ void CCudaReconstructionAlgorithm2D::_clear()
m_bAlgoInit = false;
CReconstructionAlgorithm2D::_clear();
- m_iGPUIndex = 0;
+ m_iGPUIndex = -1;
m_iDetectorSuperSampling = 1;
m_iPixelSuperSampling = 1;
}
@@ -153,7 +153,7 @@ bool CCudaReconstructionAlgorithm2D::initialize(const Config& _cfg)
}
// GPU number
- m_iGPUIndex = (int)_cfg.self->getOptionNumerical("GPUindex", 0);
+ m_iGPUIndex = (int)_cfg.self->getOptionNumerical("GPUindex", -1);
m_iGPUIndex = (int)_cfg.self->getOptionNumerical("GPUIndex", m_iGPUIndex);
CC.markOptionParsed("GPUindex");
if (!_cfg.self->hasOption("GPUindex"))
@@ -240,7 +240,7 @@ bool CCudaReconstructionAlgorithm2D::_check()
ASTRA_CONFIG_CHECK(m_iDetectorSuperSampling >= 1, "SIRT_CUDA", "DetectorSuperSampling must be a positive integer.");
ASTRA_CONFIG_CHECK(m_iPixelSuperSampling >= 1, "SIRT_CUDA", "PixelSuperSampling must be a positive integer.");
- ASTRA_CONFIG_CHECK(m_iGPUIndex >= 0, "SIRT_CUDA", "GPUIndex must be a non-negative integer.");
+ ASTRA_CONFIG_CHECK(m_iGPUIndex >= -1, "SIRT_CUDA", "GPUIndex must be a non-negative integer.");
// check compatibility between projector and data classes
// ASTRA_CONFIG_CHECK(m_pSinogram->getGeometry()->isEqual(m_pProjector->getProjectionGeometry()), "SIRT_CUDA", "Projection Data not compatible with the specified Projector.");