/** List the OpenCL implementations that contain at least one GPU device. */ public static CLPlatform[] listGPUPoweredPlatforms() { CLPlatform[] platforms = listPlatforms(); List<CLPlatform> out = new ArrayList<CLPlatform>(platforms.length); for (CLPlatform platform : platforms) { if (platform.listGPUDevices(true).length > 0) out.add(platform); } return out.toArray(new CLPlatform[out.size()]); }