Example #1
0
        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;
        }
Example #2
0
 public CLMemBuffer(int bytes, CLBufferType type)
 {
     handle = CreateBuf(bytes, (int)type, IntPtr.Zero);
     _Size  = bytes;
 }