Library/ManagedCuda/CudaKernel.cs
/// <summary>
/// Returns in blockSize a reasonable block size that can achieve
/// the maximum occupancy (or, the maximum number of active warps with
/// the fewest blocks per multiprocessor), and in minGridSize the
/// minimum grid size to achieve the maximum occupancy.
/// Ignoring dynamic shared memory.
/// </summary>
Returns in blockSize a reasonable block size that can achieve
the maximum occupancy (or, the maximum number of active warps with
the fewest blocks per multiprocessor), and in minGridSize the
minimum grid size to achieve the maximum occupancy.
Ignoring dynamic shared memory.
Returns in blockSize a reasonable block size that can achieve the maximum occupancy ( or the maximum number of active warps with the fewest blocks per multiprocessor ) and in minGridSize the minimum grid size to achieve the maximum occupancy . Ignoring dynamic shared memory .
public Occupancy GetOccupancyMaxPotentialBlockSize()
		{
			CUResult res;
			Occupancy occupancy = new Occupancy();
			res = DriverAPINativeMethods.Occupancy.cuOccupancyMaxPotentialBlockSize(ref occupancy.minGridSize, ref occupancy.blockSize, _function, null, 0, 0);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuOccupancyMaxPotentialBlockSize", res));
			if (res != CUResult.Success)
				throw new CudaException(res);
			return occupancy;
		}
public Occupancy GetOccupancyMaxPotentialBlockSize ( ) { CUResult res ; Occupancy occupancy = new Occupancy ( ) ; res = DriverAPINativeMethods . Occupancy . cuOccupancyMaxPotentialBlockSize ( ref occupancy . minGridSize , ref occupancy . blockSize , _function , null , 0 , 0 ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != CUResult . Success ) throw new CudaException ( res ) ; return occupancy ; }
Returns in blockSize a reasonable block size that can achieve
the maximum occupancy (or, the maximum number of active warps with
the fewest blocks per multiprocessor), and in minGridSize the
minimum grid size to achieve the maximum occupancy.
Returns in blockSize a reasonable block size that can achieve the maximum occupancy ( or the maximum number of active warps with the fewest blocks per multiprocessor ) and in minGridSize the minimum grid size to achieve the maximum occupancy .