From 0ad6cb01b9176e99c3e4bb5643ac6a5dd477aad6 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Thu, 9 Nov 2017 20:57:31 +0100 Subject: Check for CUDA support at run-time in use_cuda() --- python/astra/astra_c.pyx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/astra/astra_c.pyx b/python/astra/astra_c.pyx index f25fc2a..8858244 100644 --- a/python/astra/astra_c.pyx +++ b/python/astra/astra_c.pyx @@ -38,6 +38,7 @@ from .PyIndexManager cimport CAstraObjectManagerBase cdef extern from "astra/Globals.h" namespace "astra": bool cudaEnabled() + bool cudaAvailable() IF HAVE_CUDA==True: cdef extern from "../cuda/2d/astra.h" namespace "astraCUDA": @@ -74,7 +75,7 @@ def credits(): def use_cuda(): - return cudaEnabled() + return cudaAvailable() IF HAVE_CUDA==True: def set_gpu_index(idx, memory=0): -- cgit v1.2.3