circular_queue.hh (13797:1969bb477391) circular_queue.hh (14036:64006596f613)
1/*
2 * Copyright (c) 2017-2018 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 26 unchanged lines hidden (view full) ---

35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 *
37 * Authors: Rekai Gonzalez-Alberquilla
38 */
39
40#ifndef __BASE_CIRCULAR_QUEUE_HH__
41#define __BASE_CIRCULAR_QUEUE_HH__
42
1/*
2 * Copyright (c) 2017-2018 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 26 unchanged lines hidden (view full) ---

35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 *
37 * Authors: Rekai Gonzalez-Alberquilla
38 */
39
40#ifndef __BASE_CIRCULAR_QUEUE_HH__
41#define __BASE_CIRCULAR_QUEUE_HH__
42
43#include <cassert>
44#include <cstddef>
45#include <cstdint>
46#include <iterator>
47#include <type_traits>
43#include <vector>
44
45/** Circular queue.
46 * Circular queue implemented on top of a standard vector. Instead of using
47 * a sentinel entry, we use a boolean to distinguish the case in which the
48 * queue is full or empty.
49 * Thus, a circular queue is represented by the 5-tuple
50 * (Capacity, IsEmpty?, Head, Tail, Round)

--- 602 unchanged lines hidden ---
48#include <vector>
49
50/** Circular queue.
51 * Circular queue implemented on top of a standard vector. Instead of using
52 * a sentinel entry, we use a boolean to distinguish the case in which the
53 * queue is full or empty.
54 * Thus, a circular queue is represented by the 5-tuple
55 * (Capacity, IsEmpty?, Head, Tail, Round)

--- 602 unchanged lines hidden ---