diff options
Diffstat (limited to 'src/com/mbien/opencl/CLContext.java')
-rw-r--r-- | src/com/mbien/opencl/CLContext.java | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/com/mbien/opencl/CLContext.java b/src/com/mbien/opencl/CLContext.java index 66716e41..c87f2310 100644 --- a/src/com/mbien/opencl/CLContext.java +++ b/src/com/mbien/opencl/CLContext.java @@ -299,26 +299,7 @@ public final class CLContext { * MAX_COMPUTE_UNITS and MAX_CLOCK_FREQUENCY. */ public CLDevice getMaxFlopsDevice() { - - CLDevice[] clDevices = getCLDevices(); - CLDevice maxFLOPSDevice = null; - - int maxflops = -1; - - for (int i = 0; i < clDevices.length; i++) { - - CLDevice device = clDevices[i]; - int maxComputeUnits = device.getMaxComputeUnits(); - int maxClockFrequency = device.getMaxClockFrequency(); - int flops = maxComputeUnits*maxClockFrequency; - - if(flops > maxflops) { - maxflops = flops; - maxFLOPSDevice = device; - } - } - - return maxFLOPSDevice; + return CLPlatform.findMaxFlopsDevice(getCLDevices()); } /** |