Library/ManagedCuda/CudaContext.cs
/// <summary>
/// Returns the device name of the device bound to the actual context
/// </summary>
/// <returns>Device Name</returns>
Returns the device name of the device bound to the actual context
Returns the device name of the device bound to the actual context
public string GetDeviceName()
		{
			if (disposed) throw new ObjectDisposedException(this.ToString());
			byte[] devName = new byte[256];
			CUResult res = DriverAPINativeMethods.DeviceManagement.cuDeviceGetName(devName, 256, _device);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuDeviceGetName", res));
			if (res != CUResult.Success) throw new CudaException(res);
			System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
			return enc.GetString(devName).Replace("\0", "");
		}
public string GetDeviceName ( ) { if ( disposed ) throw new ObjectDisposedException ( this . ToString ( ) ) ; byte [ ] devName = new byte [ 256 ] ; CUResult res = DriverAPINativeMethods . DeviceManagement . cuDeviceGetName ( devName , 256 , _device ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != CUResult . Success ) throw new CudaException ( res ) ; System . Text . ASCIIEncoding enc = new System . Text . ASCIIEncoding ( ) ; return enc . GetString ( devName ) . Replace ( " \0 " , " " ) ; }
Returns the device name of the device bound to the actual context
Returns the device name of the device bound to the actual context
None