code: public static int convertMPtoCores(int ccMajor, int ccMinor, int numberOfProcessors) {
          // Defines for GPU Architecture types (using the SM version to determine the # of cores per SM
  
          if (ccMajor == 1)
              return 8;
          if (ccMajor == 2 && ccMinor == 1)
              return 48;
          if (ccMajor == 2)
              return 32;
          if (ccMajor == 3)
              return 192;
          if (ccMajor == 5)
              return 128;
  
          // return negative number if device is unknown
          return -1;
      }
docs: Returns number of SMs, based on device compute capability and number of processors.
  
  @param ccMajor
  @param ccMinor
  @return