Answers for "Class names, 'TestDeClass names, 'TestDemo2', are only accepted if annotation processing is explicitly requestedmo2', are only accepted if annotation processing is explicitly requested"

0

Class names, 'TestDeClass names, 'TestDemo2', are only accepted if annotation processing is explicitly requestedmo2', are only accepted if annotation processing is explicitly requested

import jcuda.CUDA;    
import jcuda.driver.CUdevprop;    
import jcuda.driver.types.CUdevice;

public class EnumDevices {

  public static void main(String args[]) {
     CUDA cuda = new CUDA(true);    
        int count = cuda.getDeviceCount();

        System.out.println("Total number of devices: " + count);

        for (int i = 0; i < count; i++) {

          CUdevice dev = cuda.getDevice(i);
          String name = cuda.getDeviceName(dev);
          System.out.println("Name: " + name);
          int version[] = cuda.getDeviceComputeCapability(dev);

          System.out.println("Version: " + 
              String.format("%d.%d", version[0], version[1]));
          CUdevprop prop = cuda.getDeviceProperties(dev);
          System.out.println("Clock rate: " + prop.clockRate + " MHz");
          System.out.println("Threads per block: " + prop.maxThreadsPerBlock);
        }
    }
}
Posted by: Guest on May-07-2022

Code answers related to "Class names, 'TestDeClass names, 'TestDemo2', are only accepted if annotation processing is explicitly requestedmo2', are only accepted if annotation processing is explicitly requested"

Browse Popular Code Answers by Language