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()]);
}

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 ( ) ] ) ; }
list the opencl implementations that contain at least one gpu device .
