summaryrefslogtreecommitdiffstats
path: root/cuda/2d/astra.cu
diff options
context:
space:
mode:
Diffstat (limited to 'cuda/2d/astra.cu')
-rw-r--r--cuda/2d/astra.cu11
1 files changed, 11 insertions, 0 deletions
diff --git a/cuda/2d/astra.cu b/cuda/2d/astra.cu
index 81459de..69a4e86 100644
--- a/cuda/2d/astra.cu
+++ b/cuda/2d/astra.cu
@@ -529,5 +529,16 @@ _AstraExport bool setGPUIndex(int iGPUIndex)
return true;
}
+_AstraExport size_t availableGPUMemory()
+{
+ size_t free, total;
+ cudaError_t err = cudaMemGetInfo(&free, &total);
+ if (err != cudaSuccess)
+ return 0;
+ return free;
+}
+
+
+
}