Library/ManagedCuda/CudaContext.cs
/// <summary>
/// Load a FatBinary module from image as byte[]
/// </summary>
/// <param name="moduleImage"></param>
/// <returns></returns>
Load a FatBinary module from image as byte[]
Load a FatBinary module from image as byte []
public CUmodule LoadModuleFatBin(byte[] moduleImage)
		{
			if (disposed) throw new ObjectDisposedException(this.ToString());
			CUResult res;
			CUmodule hcuModule = new CUmodule();
			moduleImage = AddZeroToArray(moduleImage);
			res = DriverAPINativeMethods.ModuleManagement.cuModuleLoadFatBinary(ref hcuModule, moduleImage);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuModuleLoadDataEx", res));
			if (res != CUResult.Success)
				throw new CudaException(res);
			return hcuModule;
		}
public CUmodule LoadModuleFatBin ( byte [ ] moduleImage ) { if ( disposed ) throw new ObjectDisposedException ( this . ToString ( ) ) ; CUResult res ; CUmodule hcuModule = new CUmodule ( ) ; moduleImage = AddZeroToArray ( moduleImage ) ; res = DriverAPINativeMethods . ModuleManagement . cuModuleLoadFatBinary ( ref hcuModule , moduleImage ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != CUResult . Success ) throw new CudaException ( res ) ; return hcuModule ; }
Load a FatBinary module from image as byte[]
Load a FatBinary module from image as byte []
//Append zero to make image always zero terminated:
None
moduleImage
byte[]
None