summaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/CLContext.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2009-11-02 02:18:21 +0100
committerMichael Bien <[email protected]>2009-11-02 02:18:21 +0100
commitb2dfcb34a4cdc9c45d5ce20a2b1559b4bf3ebb8c (patch)
tree1245bfc07fdf03618a7d867c46e49e0762ccb967 /src/com/mbien/opencl/CLContext.java
parent1690ead6c21b61bd337706b836c04164940eed69 (diff)
refactoring and more utility methods.
Diffstat (limited to 'src/com/mbien/opencl/CLContext.java')
-rw-r--r--src/com/mbien/opencl/CLContext.java21
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());
}
/**