Library/ManagedCuda/CudaContext.cs
/// <summary>
/// Returns the device's compute capability of the device bound to the actual context
/// </summary>
/// <returns>Device compute capability</returns>
Returns the device's compute capability of the device bound to the actual context
Returns the device ' s compute capability of the device bound to the actual context
public Version GetDeviceComputeCapability()
		{
			if (disposed) throw new ObjectDisposedException(this.ToString());
			int major = 0, minor = 0;
			CUResult res = DriverAPINativeMethods.DeviceManagement.cuDeviceGetAttribute(ref minor, CUDeviceAttribute.ComputeCapabilityMinor, _device);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuDeviceGetAttribute", res));
			if (res != CUResult.Success)
				throw new CudaException(res);
			res = DriverAPINativeMethods.DeviceManagement.cuDeviceGetAttribute(ref major, CUDeviceAttribute.ComputeCapabilityMajor, _device);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuDeviceGetAttribute", res));
			if (res != CUResult.Success)
				throw new CudaException(res);
			return new Version(major, minor);
		}
public Version GetDeviceComputeCapability ( ) { if ( disposed ) throw new ObjectDisposedException ( this . ToString ( ) ) ; int major = 0 , minor = 0 ; CUResult res = DriverAPINativeMethods . DeviceManagement . cuDeviceGetAttribute ( ref minor , CUDeviceAttribute . ComputeCapabilityMinor , _device ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != CUResult . Success ) throw new CudaException ( res ) ; res = DriverAPINativeMethods . DeviceManagement . cuDeviceGetAttribute ( ref major , CUDeviceAttribute . ComputeCapabilityMajor , _device ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != CUResult . Success ) throw new CudaException ( res ) ; return new Version ( major , minor ) ; }
Returns the device's compute capability of the device bound to the actual context
Returns the device ' s compute capability of the device bound to the actual context
Device compute capability
Device compute capability