public Image CreateImage3D(MemFlags flags, ImageFormat imageFormat, IntPtr imageWidth, IntPtr imageHeight, IntPtr imageDepth, IntPtr imageRowPitch, IntPtr imageSlicePitch, IntPtr pHost) { IntPtr memID; ErrorCode result; memID = (IntPtr)OpenCL.CreateImage3D(ContextID, (ulong)flags, imageFormat, imageWidth, imageHeight, imageDepth, imageRowPitch, imageSlicePitch, pHost.ToPointer(), out result); if (result != ErrorCode.SUCCESS) { throw new OpenCLException("CreateImage3D failed with error code " + result, result); } return(new Image(this, memID)); }
public CLImage CreateImage3D(MemFlags flags, CLImageFormat imageFormat, IntPtr imageWidth, IntPtr imageHeight, IntPtr imageDepth, IntPtr imageRowPitch, IntPtr imageSlicePitch, IntPtr pHost) { CLImage mem; IntPtr memID; ErrorCode result; memID = (IntPtr)OpenCL.CreateImage3D(ContextID, (ulong)flags, imageFormat, imageWidth, imageHeight, imageDepth, imageRowPitch, imageSlicePitch, pHost.ToPointer(), out result); if (result != ErrorCode.SUCCESS) { throw new OpenCLException("CreateImage3D failed with error code " + result, result); } mem = new CLImage(this, memID); OpenCLObjectList[memID] = new WeakReference(mem); return(mem); }