diff options
author | Willem Jan Palenstijn <WillemJan.Palenstijn@uantwerpen.be> | 2014-04-02 14:21:59 +0000 |
---|---|---|
committer | wpalenst <WillemJan.Palenstijn@uantwerpen.be> | 2014-04-02 14:21:59 +0000 |
commit | 2895e27613dab0815e9f0f2f0ed7853d31f856b4 (patch) | |
tree | 851d7171e07aa6db322cbf9286107b3db20f6a4e /src/CudaForwardProjectionAlgorithm3D.cpp | |
parent | 1d1e084d501883784eab283c622cb28510f36d27 (diff) | |
download | astra-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/CudaForwardProjectionAlgorithm3D.cpp')
-rw-r--r-- | src/CudaForwardProjectionAlgorithm3D.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/CudaForwardProjectionAlgorithm3D.cpp b/src/CudaForwardProjectionAlgorithm3D.cpp index e9289f1..f64620f 100644 --- a/src/CudaForwardProjectionAlgorithm3D.cpp +++ b/src/CudaForwardProjectionAlgorithm3D.cpp @@ -54,7 +54,7 @@ std::string CCudaForwardProjectionAlgorithm3D::type = "FP3D_CUDA"; CCudaForwardProjectionAlgorithm3D::CCudaForwardProjectionAlgorithm3D() { m_bIsInitialized = false; - m_iGPUIndex = 0; + m_iGPUIndex = -1; m_iDetectorSuperSampling = 1; m_pProjector = 0; m_pProjections = 0; @@ -107,7 +107,7 @@ bool CCudaForwardProjectionAlgorithm3D::initialize(const Config& _cfg) CC.markNodeParsed("ProjectorId"); // GPU number - m_iGPUIndex = (int)_cfg.self->getOptionNumerical("GPUindex", 0); + m_iGPUIndex = (int)_cfg.self->getOptionNumerical("GPUindex", -1); CC.markOptionParsed("GPUindex"); m_iDetectorSuperSampling = (int)_cfg.self->getOptionNumerical("DetectorSuperSampling", 1); CC.markOptionParsed("DetectorSuperSampling"); @@ -160,7 +160,7 @@ bool CCudaForwardProjectionAlgorithm3D::check() ASTRA_CONFIG_CHECK(m_pVolume->isInitialized(), "FP3D_CUDA", "Volume Data Object Not Initialized."); ASTRA_CONFIG_CHECK(m_iDetectorSuperSampling >= 1, "FP3D_CUDA", "DetectorSuperSampling must be a positive integer."); - ASTRA_CONFIG_CHECK(m_iGPUIndex >= 0, "FP3D_CUDA", "GPUIndex must be a non-negative integer."); + ASTRA_CONFIG_CHECK(m_iGPUIndex >= -1, "FP3D_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."); |