code: public static int cuOccupancyMaxActiveBlocksPerMultiprocessor(int numBlocks[], CUfunction func, int blockSize, long dynamicSMemSize)
      {
          return checkResult(cuOccupancyMaxActiveBlocksPerMultiprocessorNative(numBlocks, func, blockSize, dynamicSMemSize));
      }
docs: <code><pre>
  \brief Returns occupancy of a function
  
  Returns in \p *numBlocks the number of the maximum active blocks per
  streaming multiprocessor.
  
  \param numBlocks       - Returned occupancy
  \param func            - Kernel for which occupancy is calulated
  \param blockSize       - Block size the kernel is intended to be launched with
  \param dynamicSMemSize - Per-block dynamic shared memory usage intended, in bytes
  
  \return
  ::CUDA_SUCCESS,
  ::CUDA_ERROR_DEINITIALIZED,
  ::CUDA_ERROR_NOT_INITIALIZED,
  ::CUDA_ERROR_INVALID_CONTEXT,
  ::CUDA_ERROR_INVALID_VALUE,
  ::CUDA_ERROR_UNKNOWN
  \notefnerr
  </pre></code>