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>
/// <param name="dynamicSMemSize">If per-block dynamic shared memory allocation is needed, then if
/// the dynamic shared memory size is constant regardless of block
/// size, the size should be passed through dynamicSMemSize</param>
/// <param name="flags">Flags</param>
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(SizeT dynamicSMemSize, CUoccupancy_flags flags)
		{
			CUResult res;
			Occupancy occupancy = new Occupancy();
			res = DriverAPINativeMethods.Occupancy.cuOccupancyMaxPotentialBlockSizeWithFlags(ref occupancy.minGridSize, ref occupancy.blockSize, _function, null, dynamicSMemSize, 0, flags);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuOccupancyMaxPotentialBlockSizeWithFlags", res));
			if (res != CUResult.Success)
				throw new CudaException(res);
			return occupancy;
		}
public Occupancy GetOccupancyMaxPotentialBlockSize ( SizeT dynamicSMemSize , CUoccupancy_flags flags ) { CUResult res ; Occupancy occupancy = new Occupancy ( ) ; res = DriverAPINativeMethods . Occupancy . cuOccupancyMaxPotentialBlockSizeWithFlags ( ref occupancy . minGridSize , ref occupancy . blockSize , _function , null , dynamicSMemSize , 0 , flags ) ; 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 .
dynamicSMemSize
SizeT
If per-block dynamic shared memory allocation is needed, then if
the dynamic shared memory size is constant regardless of block
size, the size should be passed through dynamicSMemSize
If per - block dynamic shared memory allocation is needed then if the dynamic shared memory size is constant regardless of block size the size should be passed through dynamicSMemSize
flags
CUoccupancy_flags
None