Example #1
0
        public SharedCollection(Context context, int length, bool host = false)
        {
            var size = (uint)(Marshal.SizeOf <T>() * length);

            if (host)
            {
                Stream = SharedMemoryStream.AllocHost(context, size);
            }
            else
            {
                Stream = new SharedMemoryStream(context, size);
            }
        }