diff options
Diffstat (limited to 'src/Globals.cpp')
-rw-r--r-- | src/Globals.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/Globals.cpp b/src/Globals.cpp index 0edb397..a04cc62 100644 --- a/src/Globals.cpp +++ b/src/Globals.cpp @@ -1,9 +1,9 @@ /* ----------------------------------------------------------------------- -Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp - 2014-2016, CWI, Amsterdam +Copyright: 2010-2018, imec Vision Lab, University of Antwerp + 2014-2018, CWI, Amsterdam -Contact: astra@uantwerpen.be +Contact: astra@astra-toolbox.com Website: http://www.astra-toolbox.com/ This file is part of the ASTRA Toolbox. @@ -26,9 +26,19 @@ along with the ASTRA Toolbox. If not, see <http://www.gnu.org/licenses/>. */ #include "astra/Globals.h" +#include "../../cuda/2d/astra.h" + +namespace astra { + +bool running_in_matlab=false; + +_AstraExport bool cudaAvailable() { +#ifdef ASTRA_CUDA + return astraCUDA::availableGPUMemory() > 0; +#else + return false; +#endif +} -namespace astra{ - bool running_in_matlab=false; } -// nothing to see here :) |