code: 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;
     }
docs: List OpenCLDevices of a given TYPE, or all OpenCLDevices if type == null.