Faster DP_fiber with GPU processing... Run test\gpu_cpu_comparison.m to see difference on your setup

This commit is contained in:
silas (home)
2026-02-01 13:53:20 +01:00
parent 67689bb70f
commit fba7cbdba2
15 changed files with 1281 additions and 217 deletions

View File

@@ -0,0 +1,20 @@
function canUse = canUseGPU()
%CANUSEGPU Check if a compatible GPU is available for parallel computing
% Returns true if MATLAB Parallel Computing Toolbox is available and
% a CUDA-capable GPU is detected.
canUse = false;
% Check if Parallel Computing Toolbox is installed
if ~license('test', 'Distrib_Computing_Toolbox')
return;
end
% Check for GPU device
try
gpu = gpuDevice();
canUse = gpu.DeviceSupported;
catch
canUse = false;
end
end