public static List<OpenCLDevice> listDevices(TYPE type) {
      final OpenCLPlatform platform = new OpenCLPlatform(0, null, null, null);
      final ArrayList<OpenCLDevice> results = new ArrayList<>();

      for (final OpenCLPlatform p : platform.getOpenCLPlatforms()) {
         for (final OpenCLDevice device : p.getOpenCLDevices()) {
            if (type == null || device.getType() == type) {
               results.add(device);
            }
         }
      }

      return results;
   }
public static List < OpenCLDevice > listDevices ( TYPE type ) { final OpenCLPlatform platform = new OpenCLPlatform ( 0 , null , null , null ) ; final ArrayList < OpenCLDevice > results = new ArrayList < > ( ) ; for ( final OpenCLPlatform p : platform . getOpenCLPlatforms ( ) ) { for ( final OpenCLDevice device : p . getOpenCLDevices ( ) ) { if ( type == null || device . getType ( ) == type ) { results . add ( device ) ; } } } return results ; }
List OpenCLDevices of a given TYPE, or all OpenCLDevices if type == null.