Library/ManagedCuda/CudaDirectXInteropResource.cs
/// <summary>
/// Returns a CudaArray2D through which the subresource of the mapped graphics resource resource which
/// corresponds to array index <c>arrayIndex</c> and mipmap level <c>mipLevel</c> may be accessed. The pointer value in <c>CudaArray2D</c>
/// may change every time that <c>resource</c> is mapped.<para/>
/// If the resource is not a texture then it cannot be accessed via an array and <see cref="CUResult.ErrorNotMappedAsArray"/>
/// exception is thrwon. If <c>arrayIndex</c> is not a valid array index for the resource then <see cref="CUResult.ErrorInvalidValue"/>
/// exception is thrwon. If <c>mipLevel</c> is not a valid mipmap level for the resource then <see cref="CUResult.ErrorInvalidValue"/>
/// exception is thrwon. If the resource is not mapped then <see cref="CUResult.ErrorNotMapped"/> exception is thrwon.
/// </summary>
/// <param name="arrayIndex"></param>
/// <param name="mipLevel"></param>
/// <returns></returns>
Returns a CudaArray2D through which the subresource of the mapped graphics resource resource which
corresponds to array index arrayIndexmipLevelCudaArray2Dresource
If the resource is not a texture then it cannot be accessed via an array and
exception is thrwon. If arrayIndex
exception is thrwon. If mipLevel
exception is thrwon. If the resource is not mapped then  exception is thrwon.
Returns a CudaArray2D through which the subresource of the mapped graphics resource resource which corresponds to array index arrayIndexmipLevelCudaArray2Dresource If the resource is not a texture then it cannot be accessed via an array and exception is thrwon . If arrayIndex exception is thrwon . If mipLevel exception is thrwon . If the resource is not mapped then exception is thrwon .
public CudaArray2D GetMappedArray2D(uint arrayIndex, uint mipLevel)
		{
			if (disposed) throw new ObjectDisposedException(this.ToString());
			CUarray array = new CUarray();
			SizeT size = 0;
			res = DriverAPINativeMethods.GraphicsInterop.cuGraphicsSubResourceGetMappedArray(ref array, _cudaResource, arrayIndex, mipLevel);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuGraphicsSubResourceGetMappedArray", res));
			if (res != CUResult.Success)
				throw new CudaException(res);
			CudaArray2D retVar = new CudaArray2D(array, false);
			return retVar;
		}
public CudaArray2D GetMappedArray2D ( uint arrayIndex , uint mipLevel ) { if ( disposed ) throw new ObjectDisposedException ( this . ToString ( ) ) ; CUarray array = new CUarray ( ) ; SizeT size = 0 ; res = DriverAPINativeMethods . GraphicsInterop . cuGraphicsSubResourceGetMappedArray ( ref array , _cudaResource , arrayIndex , mipLevel ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != CUResult . Success ) throw new CudaException ( res ) ; CudaArray2D retVar = new CudaArray2D ( array , false ) ; return retVar ; }
Returns a CudaArray2D through which the subresource of the mapped graphics resource resource which
corresponds to array index arrayIndexmipLevelCudaArray2Dresource
If the resource is not a texture then it cannot be accessed via an array and
exception is thrwon.
Returns a CudaArray2D through which the subresource of the mapped graphics resource resource which corresponds to array index arrayIndexmipLevelCudaArray2Dresource If the resource is not a texture then it cannot be accessed via an array and exception is thrwon .
None
arrayIndex
uint
None
mipLevel
uint
None