public CLMemBuffer(CLBufferType type, byte[] ptr) { if (ptr != null) { unsafe { fixed(byte *p = ptr) { IntPtr pp = (IntPtr)p; handle = CreateBuf(ptr.Length, (int)type, pp); } } } _Size = ptr.Length; }
public CLMemBuffer(int bytes, CLBufferType type) { handle = CreateBuf(bytes, (int)type, IntPtr.Zero); _Size = bytes; }