コード例 #1
0
        private NativeDeque(ref NativeDeque <T> deque)
        {
            Debug.Assert(deque.IsValid);

            Allocator allocator = deque.GetAllocator() !;
            T *       buffer    = allocator.Allocate <T>(deque._capacity);

            Unsafe.CopyBlockUnaligned(buffer, deque._buffer, (uint)(sizeof(T) * deque._capacity));

            _buffer      = buffer;
            _count       = deque._count;
            _capacity    = deque._capacity;
            _allocatorID = deque._allocatorID;
            _head        = deque._head;
            _tail        = deque._tail;
        }
コード例 #2
0
 public NativeDequeDebugView(NativeDeque <T> queue)
 {
     _deque = queue;
 }