diff --git a/parallel/queue.hpp b/parallel/queue.hpp index 1ddd4f34..99321afd 100644 --- a/parallel/queue.hpp +++ b/parallel/queue.hpp @@ -14,8 +14,8 @@ * Copyright 2018 Danny Robson */ -#ifndef CRUFT_UTIL_PARALLEL_SPMC_HPP -#define CRUFT_UTIL_PARALLEL_SPMC_HPP +#ifndef CRUFT_UTIL_PARALLEL_QUEUE_HPP +#define CRUFT_UTIL_PARALLEL_QUEUE_HPP #include "../maths.hpp" @@ -30,7 +30,7 @@ namespace util::parallel { /// \tparam ValueT the type of values to store /// \tparam SizeV the number of elements in the underlying store template - class spmc { + class queue { public: // We optimise specifically for memcpyable types only static_assert ( @@ -46,7 +46,7 @@ namespace util::parallel { // pointers. 4 gives a little safety margin for future optimisations. static_assert (SizeV >= 4); - spmc (): + queue (): m_write (0), m_read { {0}, {0} } { ; } diff --git a/test/parallel/queue.cpp b/test/parallel/queue.cpp index 4dad89d2..de6bfb15 100644 --- a/test/parallel/queue.cpp +++ b/test/parallel/queue.cpp @@ -1,4 +1,4 @@ -#include "parallel/spmc.hpp" +#include "parallel/queue.hpp" #include "job/flag.hpp" #include "job/semaphore.hpp" #include "debug.hpp" @@ -15,7 +15,7 @@ static constexpr int chunk_size = 1<<12; util::job::flag start; -using queue_t = util::parallel::spmc; +using queue_t = util::parallel::queue; ///////////////////////////////////////////////////////////////////////////////