42 } |
42 } |
43 } |
43 } |
44 |
44 |
45 template<class E, MEMFLAGS F, unsigned int N> |
45 template<class E, MEMFLAGS F, unsigned int N> |
46 inline void GenericTaskQueue<E, F, N>::initialize() { |
46 inline void GenericTaskQueue<E, F, N>::initialize() { |
47 _elems = ArrayAllocator<E, F>::allocate(N); |
47 _elems = ArrayAllocator<E>::allocate(N, F); |
48 } |
48 } |
49 |
49 |
50 template<class E, MEMFLAGS F, unsigned int N> |
50 template<class E, MEMFLAGS F, unsigned int N> |
51 inline GenericTaskQueue<E, F, N>::~GenericTaskQueue() { |
51 inline GenericTaskQueue<E, F, N>::~GenericTaskQueue() { |
52 assert(false, "This code is currently never called"); |
52 assert(false, "This code is currently never called"); |
53 ArrayAllocator<E, F>::free(const_cast<E*>(_elems), N); |
53 ArrayAllocator<E>::free(const_cast<E*>(_elems), N); |
54 } |
54 } |
55 |
55 |
56 template<class E, MEMFLAGS F, unsigned int N> |
56 template<class E, MEMFLAGS F, unsigned int N> |
57 bool GenericTaskQueue<E, F, N>::push_slow(E t, uint dirty_n_elems) { |
57 bool GenericTaskQueue<E, F, N>::push_slow(E t, uint dirty_n_elems) { |
58 if (dirty_n_elems == N - 1) { |
58 if (dirty_n_elems == N - 1) { |