Library/ManagedCuda/CudaContext.cs
/// <summary>
/// Load a ptx module from image as stream
/// </summary>
/// <param name="moduleImage"></param>
/// <param name="options"></param>
/// <param name="values"></param>
/// <returns></returns>
Load a ptx module from image as stream
Load a ptx module from image as stream
public CUmodule LoadModulePTX(System.IO.Stream moduleImage, CUJITOption[] options, object[] values)
		{
			if (moduleImage == null) throw new ArgumentNullException("moduleImage");
			byte[] kernel = new byte[moduleImage.Length];
			int bytesToRead = (int)moduleImage.Length;
			moduleImage.Position = 0;
			while (bytesToRead > 0)
			{
				bytesToRead -= moduleImage.Read(kernel, (int)moduleImage.Position, bytesToRead);
			}
			moduleImage.Position = 0;
			return LoadModulePTX(kernel, options, values);
		}
public CUmodule LoadModulePTX ( System . IO . Stream moduleImage , CUJITOption [ ] options , object [ ] values ) { if ( moduleImage == null ) throw new ArgumentNullException ( " " ) ; byte [ ] kernel = new byte [ moduleImage . Length ] ; int bytesToRead = ( int ) moduleImage . Length ; moduleImage . Position = 0 ; while ( bytesToRead > 0 ) { bytesToRead -= moduleImage . Read ( kernel , ( int ) moduleImage . Position , bytesToRead ) ; } moduleImage . Position = 0 ; return LoadModulePTX ( kernel , options , values ) ; }
Load a ptx module from image as stream
Load a ptx module from image as stream
None
moduleImage
System.IO.Stream
None
options
CUJITOption[]
None
values
object[]
None