gem5  [DEVELOP-FOR-23.0]
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
sc_vector.hh
Go to the documentation of this file.
1 /*****************************************************************************
2 
3  Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
4  more contributor license agreements. See the NOTICE file distributed
5  with this work for additional information regarding copyright ownership.
6  Accellera licenses this file to you under the Apache License, Version 2.0
7  (the "License"); you may not use this file except in compliance with the
8  License. You may obtain a copy of the License at
9 
10  http://www.apache.org/licenses/LICENSE-2.0
11 
12  Unless required by applicable law or agreed to in writing, software
13  distributed under the License is distributed on an "AS IS" BASIS,
14  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15  implied. See the License for the specific language governing
16  permissions and limitations under the License.
17 
18  *****************************************************************************/
19 
20 /*
21  * Copyright 2018 Google, Inc.
22  *
23  * Redistribution and use in source and binary forms, with or without
24  * modification, are permitted provided that the following conditions are
25  * met: redistributions of source code must retain the above copyright
26  * notice, this list of conditions and the following disclaimer;
27  * redistributions in binary form must reproduce the above copyright
28  * notice, this list of conditions and the following disclaimer in the
29  * documentation and/or other materials provided with the distribution;
30  * neither the name of the copyright holders nor the names of its
31  * contributors may be used to endorse or promote products derived from
32  * this software without specific prior written permission.
33  *
34  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
35  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
36  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
37  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
38  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
39  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
40  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
41  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
42  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
43  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
44  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
45  */
46 
47 #ifndef __SYSTEMC_EXT_UTIL_SC_VECTOR_HH__
48 #define __SYSTEMC_EXT_UTIL_SC_VECTOR_HH__
49 
50 #include <stdint.h>
51 
52 #include <cstddef>
53 #include <exception>
54 #include <iterator>
55 #include <vector>
56 
57 #include "../core/sc_module.hh"
58 #include "../core/sc_object.hh"
59 #include "messages.hh"
60 
61 namespace sc_gem5
62 {
63 
64 // Goop for supporting sc_vector_iter, simplified from the Accellera version.
65 
66 #if __cplusplus >= 201103L
67 
68 using std::enable_if;
69 using std::remove_const;
70 using std::is_same;
71 using std::is_const;
72 
73 #else
74 
75 template<bool Cond, typename T=void>
76 struct enable_if
77 {};
78 
79 template<typename T>
80 struct enable_if<true, T>
81 {
82  typedef T type;
83 };
84 
85 template <typename T>
86 struct remove_const
87 {
88  typedef T type;
89 };
90 template <typename T>
91 struct remove_const<const T>
92 {
93  typedef T type;
94 };
95 
96 template <typename T, typename U>
97 struct is_same
98 {
99  static const bool value = false;
100 };
101 template <typename T>
102 struct is_same<T, T>
103 {
104  static const bool value = true;
105 };
106 
107 template <typename T>
108 struct is_const
109 {
110  static const bool value = false;
111 };
112 template <typename T>
113 struct is_const<const T>
114 {
115  static const bool value = true;
116 };
117 
118 #endif
119 
120 template <typename CT, typename T>
122 {
123  static const bool value =
127 };
128 
129 struct special_result
130 {};
131 
132 template <typename T>
133 struct remove_special_fptr
134 {};
135 
136 template <typename T>
137 struct remove_special_fptr<special_result & (*)(T)>
138 {
139  typedef T type;
140 };
141 
142 #define SC_RPTYPE_(Type) \
143  ::sc_gem5::remove_special_fptr< \
144  ::sc_gem5::special_result & (*) Type>::type::value
145 
146 #define SC_ENABLE_IF_(Cond) \
147  typename ::sc_gem5::enable_if<SC_RPTYPE_(Cond)>::type * = NULL
148 
149 } // namespace sc_gem5
150 
151 namespace sc_core
152 {
153 
154 template <typename T, typename MT>
156 
157 template <typename T>
158 class sc_vector;
159 
160 template <typename T, typename MT>
161 sc_vector_assembly<T, MT> sc_assemble_vector(
162  sc_vector<T> &, MT(T::* member_ptr));
163 
164 class sc_vector_base : public sc_object
165 {
166  public:
167  typedef size_t size_type;
168 
169  sc_vector_base(const char *_name) : sc_object(_name) {}
170 
171  virtual const char *kind() const { return "sc_vector"; }
172  size_type size() const;
173  const std::vector<sc_object *> &get_elements() const;
174 
175  protected:
177 
178  // What's returned by get_elements, which really returns the elemenets
179  // which are also objects.
181 
182  sc_object *implicitCast(sc_object *p) const { return p; }
184  {
186  return nullptr;
187  }
188  virtual sc_object *objectCast(void *) const = 0;
189 
190  void checkIndex(size_type index) const;
191  void forceParent() const;
192  void unforceParent() const;
193 
194  void reportEmpty(const char *kind_, bool empty_dest) const;
195 };
196 
197 
198 /*
199  * Non-standard iterator access adapters. Without using these, the classes as
200  * defined in the standard won't compile because of redundant bind() overloads.
201  */
202 
203 template <typename Element>
205 {
206  public:
207  typedef Element ElementType;
208  typedef ElementType Type;
210 
214 
217 
218  template <typename U>
219  sc_direct_access(const U &,
220  SC_ENABLE_IF_((
222  ElementType, typename U::Policy::ElementType>
223  ))
224  )
225  {}
226 
227  ElementType *
228  get(ElementType *this_) const
229  {
230  return this_;
231  }
232 };
233 
234 template <typename Element, typename Access>
236 {
237  public:
238  template <typename, typename>
239  friend class sc_member_access;
240 
241  typedef Element ElementType;
244  typedef AccessType Type;
247 
251 
253  sc_member_access(const NonConstPolicy &other) : ptr_(other.ptr_) {}
254 
255  AccessType *get(ElementType *this_) const { return &(this_->*ptr_); }
256 
257  private:
259 };
260 
261 template <typename Element,
262  typename AccessPolicy=sc_direct_access<Element> >
263 class sc_vector_iter : private AccessPolicy
264 {
265  private:
266  typedef Element ElementType;
267  typedef typename AccessPolicy::Policy Policy;
268  typedef typename AccessPolicy::NonConstPolicy NonConstPolicy;
269  typedef typename AccessPolicy::ConstPolicy ConstPolicy;
270  typedef typename Policy::Type AccessType;
271 
273  typedef const PlainType ConstPlainType;
276 
277  friend class sc_vector<PlainType>;
278  template <typename, typename>
279  friend class sc_vector_assembly;
280  template <typename, typename>
281  friend class sc_vector_iter;
282 
286 
287  template <typename U>
288  struct SelectIter
289  {
291  };
292  template <typename U>
293  struct SelectIter<const U>
294  {
296  };
301 
303 
305  Policy(acc), it_(it)
306  {}
307 
308  Policy const &get_policy() const { return *this; }
309 
310  public:
311  // Conforms to Random Access Iterator category.
312  // See ISO/IEC 14882:2003(E), 24.1 [lib.iterator.requirements]
313 
314  using difference_type = std::ptrdiff_t;
315  using value_type = typename AccessPolicy::Type;
316  using reference = typename AccessPolicy::Type &;
317  using pointer = typename AccessPolicy::Type *;
318  using iterator_category = std::random_access_iterator_tag;
319 
321 
322  template <typename It>
323  sc_vector_iter(const It &it,
324  SC_ENABLE_IF_((
326  ElementType, typename It::Policy::ElementType>
327  ))
328  ) : Policy(it.get_policy()), it_(it.it_)
329  {}
330 
331  ThisType &
333  {
334  ++it_;
335  return *this;
336  }
337  ThisType &
339  {
340  --it_;
341  return *this;
342  }
343  ThisType
345  {
346  ThisType old(*this);
347  ++it_;
348  return old;
349  }
350  ThisType
352  {
353  ThisType old(*this);
354  --it_;
355  return old;
356  }
357 
358  ThisType
360  {
361  return ThisType(it_ + n, get_policy());
362  }
363  ThisType
365  {
366  return ThisType(it_ - n, get_policy());
367  }
368 
369  ThisType &
371  {
372  it_ += n;
373  return *this;
374  }
375 
376  ThisType &
378  {
379  it_ -= n;
380  return *this;
381  }
382 
383  bool
384  operator == (const ConstDirectIterator &other) const
385  {
386  return it_ == other.it_;
387  }
388  bool
389  operator != (const ConstDirectIterator &other) const
390  {
391  return it_ != other.it_;
392  }
393  bool
394  operator <= (const ConstDirectIterator &other) const
395  {
396  return it_ <= other.it_;
397  }
398  bool
399  operator >= (const ConstDirectIterator &other) const
400  {
401  return it_ >= other.it_;
402  }
403  bool
404  operator < (const ConstDirectIterator &other) const
405  {
406  return it_ < other.it_;
407  }
408  bool
409  operator > (const ConstDirectIterator &other) const
410  {
411  return it_ > other.it_;
412  }
413 
414  reference
415  operator * () const
416  {
417  return *Policy::get(static_cast<ElementType *>((void *)*it_));
418  }
419  pointer
420  operator -> () const
421  {
422  return Policy::get(static_cast<ElementType *>((void *)*it_));
423  }
424  reference
426  {
427  return *Policy::get(static_cast<ElementType *>((void *)it_[n]));
428  }
429 
431  operator - (ConstDirectIterator const &other) const
432  {
433  return it_ - other.it_;
434  }
435 };
436 
437 template <typename T>
438 class sc_vector : public sc_vector_base
439 {
440  public:
444 
446  explicit sc_vector(const char *_name) : sc_vector_base(_name) {}
447  sc_vector(const char *_name, size_type _size) : sc_vector_base(_name)
448  {
449  init(_size);
450  }
451  template <typename Creator>
452  sc_vector(const char *_name, size_type _size, Creator creator) :
453  sc_vector_base(_name)
454  {
455  init(_size, creator);
456  }
457  virtual ~sc_vector() { clear(); }
458 
459  void
461  {
463  }
464  static T *
465  create_element(const char *_name, size_type index)
466  {
467  return new T(_name);
468  }
469 
470  template <typename Creator>
471  void
472  init(size_type _size, Creator creator)
473  {
474  forceParent();
475  try {
476  for (size_type i = 0; i < _size; i++) {
477  // XXX The name and scope of these objects needs to be handled
478  // specially.
479  T *p = creator(sc_gen_unique_name(basename()), i);
480  objs.push_back(p);
481  }
482  } catch (...) {
483  unforceParent();
484  clear();
485  throw;
486  }
487  unforceParent();
488  }
489 
490  T &operator [] (size_type index) { return *static_cast<T *>(objs[index]); }
491  const T &
493  {
494  return *static_cast<const T *>(objs[index]);
495  }
496 
497  T &
499  {
500  this->checkIndex(index);
501  return *static_cast<T *>(objs[index]);
502  }
503  const T &
505  {
506  this->checkIndex(index);
507  return *static_cast<const T *>(objs[index]);
508  }
509 
510  iterator begin() { return objs.begin(); }
511  iterator end() { return objs.end(); }
512  const_iterator begin() const { return objs.begin(); }
513  const_iterator end() const { return objs.end(); }
514  const_iterator cbegin() const { return objs.begin(); }
515  const_iterator cend() const { return objs.end(); }
516 
517  template <typename ContainerType, typename ArgumentType>
518  iterator
520  {
521  return bind(c.begin(), c.end());
522  }
523 
524  template <typename BindableContainer>
525  iterator
526  bind(BindableContainer &c)
527  {
528  return bind(c.begin(), c.end());
529  }
530 
531  template <typename BindableIterator>
532  iterator
533  bind(BindableIterator first, BindableIterator last)
534  {
535  return bind(first, last, this->begin());
536  }
537 
538  template <typename BindableIterator>
539  iterator
540  bind(BindableIterator first, BindableIterator last, iterator from)
541  {
542  if (!size() || from == end() || first == last)
543  reportEmpty(kind(), from == end());
544 
545  while (from != end() && first != last)
546  (*from++).bind(*first++);
547  return from;
548  }
549 
550  template <typename ContainerType, typename ArgumentType>
551  iterator
553  {
554  return (*this)(c.begin(), c.end());
555  }
556 
557  template <typename ArgumentContainer>
558  iterator
559  operator () (ArgumentContainer &c)
560  {
561  return (*this)(c.begin(), c.end());
562  }
563 
564  template <typename ArgumentIterator>
565  iterator
566  operator () (ArgumentIterator first, ArgumentIterator last)
567  {
568  return (*this)(first, last, this->begin());
569  }
570 
571  template <typename ArgumentIterator>
572  iterator
573  operator () (ArgumentIterator first, ArgumentIterator last, iterator from)
574  {
575  if (!size() || from == end() || first == last)
576  reportEmpty(kind(), from == end());
577 
578  while (from != end() && first != last)
579  (*from++)(*first++);
580  return from;
581  }
582 
583  private:
584  // Disabled
585  sc_vector(const sc_vector &);
586  sc_vector &operator = (const sc_vector &);
587 
588  void
590  {
591  for (auto obj: objs)
592  delete static_cast<T *>(obj);
593  }
594 
595  template <typename, typename>
596  friend class sc_vector_assembly;
597 
598  sc_object *
599  objectCast(void *ptr) const
600  {
601  return implicitCast(static_cast<T *>(ptr));
602  }
603 };
604 
605 template <typename T, typename MT>
606 class sc_vector_assembly
607 {
608  public:
609  friend sc_vector_assembly<T, MT> sc_assemble_vector<>(
610  sc_vector<T> &, MT (T::*));
611 
612  typedef size_t size_type;
614  typedef sc_vector_iter<
616  typedef MT (T::*MemberType);
617 
619  vec_(other.vec_), ptr_(other.ptr_)
620  {}
621 
622  iterator begin() { return iterator(vec_->begin().it_, ptr_); }
623  iterator end() { return iterator(vec_->end().it_, ptr_); }
624 
626  cbegin() const
627  {
628  return const_iterator(vec_->begin().it_, ptr_);
629  }
631  cend() const
632  {
633  return const_iterator(vec_->end().it_, ptr_);
634  }
635 
637  begin() const
638  {
639  return const_iterator(vec_->begin().it_, ptr_);
640  }
642  end() const
643  {
644  return const_iterator(vec_->end().it_, ptr_);
645  }
646 
647  size_type size() const { return vec_->size(); }
648 
650  get_elements() const
651  {
653  for (const_iterator it = begin(); it != end(); it++) {
654  sc_object *obj_ptr = vec_->objectCast(const_cast<MT *>(&*it));
655 
656  if (obj_ptr)
657  ret.push_back(obj_ptr);
658  }
659  return ret;
660  }
661 
662  typename iterator::reference
664  {
665  return (*vec_)[i].*ptr_;
666  }
669  {
670  return (*vec_)[i].*ptr_;
671  }
672 
673  typename iterator::reference
675  {
676  return vec_->at(i).*ptr_;
677  }
679  at(size_type i) const
680  {
681  return vec_->at(i).*ptr_;
682  }
683 
684  template <typename ContainerType, typename ArgumentType>
685  iterator
687  {
688  return bind(c.begin(), c.end());
689  }
690 
691  template <typename BindableContainer>
692  iterator
693  bind(BindableContainer &c)
694  {
695  return bind(c.begin(), c.end());
696  }
697 
698  template <typename BindableIterator>
699  iterator
700  bind(BindableIterator first, BindableIterator last)
701  {
702  return bind(first, last, this->begin());
703  }
704 
705  template <typename BindableIterator>
706  iterator
707  bind(BindableIterator first, BindableIterator last, iterator from)
708  {
709  if (!size() || from == end() || first == last)
710  vec_->reportEmpty("sc_vector_assembly", from == end());
711 
712  while (from != end() && first != last)
713  (*from++).bind(*first++);
714  return from;
715  }
716 
717  template <typename BindableIterator>
718  iterator
719  bind(BindableIterator first, BindableIterator last,
720  typename sc_vector<T>::iterator from)
721  {
722  return bind(first, last, iterator(from.it_, ptr_));
723  }
724 
725  template <typename ContainerType, typename ArgumentType>
726  iterator
728  {
729  return (*this)(c.begin(), c.end());
730  }
731 
732  template <typename ArgumentContainer>
733  iterator
734  operator () (ArgumentContainer &c)
735  {
736  return (*this)(c.begin(), c.end());
737  }
738 
739  template <typename ArgumentIterator>
740  iterator
741  operator () (ArgumentIterator first, ArgumentIterator last)
742  {
743  return (*this)(first, last, this->begin());
744  }
745 
746  template <typename ArgumentIterator>
747  iterator
748  operator () (ArgumentIterator first, ArgumentIterator last, iterator from)
749  {
750  if (!size() || from == end() || first == last)
751  vec_->reportEmpty("sc_vector_assembly", from == end());
752 
753  while (from != end() && first != last)
754  (*from++)(*first++);
755  return from;
756  }
757 
758  template <typename ArgumentIterator>
759  iterator
760  operator () (ArgumentIterator first, ArgumentIterator last,
761  typename sc_vector<T>::iterator from)
762  {
763  return (*this)(first, last, iterator(from.it_, ptr_));
764  }
765 
766  private:
768  vec_(&v), ptr_(ptr)
769  {}
770 
773 };
774 
775 template <typename T, typename MT>
778 {
779  return sc_vector_assembly<T, MT>(v, ptr);
780 }
781 
782 } // namespace sc_core
783 
784 #endif //__SYSTEMC_EXT_UTIL_SC_VECTOR_HH__
sc_core::sc_vector_iter::ThisType
sc_vector_iter ThisType
Definition: sc_vector.hh:283
sc_core::sc_vector_iter::ConstDirectPolicy
sc_direct_access< PlainType >::ConstPolicy ConstDirectPolicy
Definition: sc_vector.hh:275
sc_core::sc_vector::~sc_vector
virtual ~sc_vector()
Definition: sc_vector.hh:457
sc_core::sc_assemble_vector
sc_vector_assembly< T, MT > sc_assemble_vector(sc_vector< T > &, MT(T::*member_ptr))
sc_gem5::is_more_const
Definition: sc_vector.hh:138
sc_core::sc_member_access
Definition: sc_vector.hh:235
sc_core::sc_vector_iter::sc_vector_iter
sc_vector_iter()
Definition: sc_vector.hh:320
sc_core::sc_vector_assembly::bind
iterator bind(BindableIterator first, BindableIterator last)
Definition: sc_vector.hh:700
sc_core::sc_vector::bind
iterator bind(BindableContainer &c)
Definition: sc_vector.hh:526
sc_core::sc_member_access::Type
AccessType Type
Definition: sc_vector.hh:244
sc_core::sc_vector_assembly::operator()
iterator operator()(sc_vector_assembly< ContainerType, ArgumentType > c)
Definition: sc_vector.hh:727
sc_core::SC_ID_VECTOR_NONOBJECT_ELEMENTS_
const char SC_ID_VECTOR_NONOBJECT_ELEMENTS_[]
Definition: messages.cc:54
sc_core::sc_vector::sc_vector
sc_vector(const char *_name)
Definition: sc_vector.hh:446
sc_core::sc_vector_assembly::bind
iterator bind(sc_vector_assembly< ContainerType, ArgumentType > c)
Definition: sc_vector.hh:686
messages.hh
sc_core::sc_vector_iter::value_type
typename AccessPolicy::Type value_type
Definition: sc_vector.hh:315
sc_core::sc_vector_base::checkIndex
void checkIndex(size_type index) const
Definition: sc_vector.cc:90
sc_core::sc_vector_base::size
size_type size() const
Definition: sc_vector.cc:75
sc_core::sc_vector_assembly::bind
iterator bind(BindableContainer &c)
Definition: sc_vector.hh:693
sc_core::sc_vector_iter::operator+=
ThisType & operator+=(difference_type n)
Definition: sc_vector.hh:370
sc_core::sc_vector_iter::AccessType
Policy::Type AccessType
Definition: sc_vector.hh:270
sc_core::sc_vector_assembly::at
const_iterator::reference at(size_type i) const
Definition: sc_vector.hh:679
sc_core::sc_vector_assembly::ptr_
MemberType ptr_
Definition: sc_vector.hh:772
sc_core::sc_vector_assembly::sc_vector_assembly
sc_vector_assembly(const sc_vector_assembly &other)
Definition: sc_vector.hh:618
sc_core::sc_vector_iter::operator-=
ThisType & operator-=(difference_type n)
Definition: sc_vector.hh:377
sc_core::sc_vector::cend
const_iterator cend() const
Definition: sc_vector.hh:515
gem5::MipsISA::index
Bitfield< 30, 0 > index
Definition: pra_constants.hh:47
sc_core::sc_vector_iter::reference
typename AccessPolicy::Type & reference
Definition: sc_vector.hh:316
sc_core::sc_vector< svp_gicv3_comms::gicv3_comms_target_socket<> >::size_type
size_t size_type
Definition: sc_vector.hh:167
sc_core::sc_vector_iter::operator!=
bool operator!=(const ConstDirectIterator &other) const
Definition: sc_vector.hh:389
sc_core::sc_vector::begin
const_iterator begin() const
Definition: sc_vector.hh:512
sc_core
Definition: messages.cc:31
sc_core::sc_vector::clear
void clear()
Definition: sc_vector.hh:589
sc_core::sc_member_access::get
AccessType * get(ElementType *this_) const
Definition: sc_vector.hh:255
sc_core::sc_vector_iter::StorageType
std::vector< void * > StorageType
Definition: sc_vector.hh:285
sc_core::sc_vector::at
const T & at(size_type index) const
Definition: sc_vector.hh:504
sc_core::sc_vector_iter::operator++
ThisType & operator++()
Definition: sc_vector.hh:332
sc_core::sc_vector_assembly::at
iterator::reference at(size_type i)
Definition: sc_vector.hh:674
sc_core::sc_vector_assembly::operator[]
iterator::reference operator[](size_type i)
Definition: sc_vector.hh:663
std::vector
STL vector class.
Definition: stl.hh:37
sc_core::sc_vector_assembly::begin
iterator begin()
Definition: sc_vector.hh:622
sc_core::sc_vector_iter::VectorType
sc_vector< PlainType > VectorType
Definition: sc_vector.hh:284
sc_core::sc_vector_assembly::get_elements
std::vector< sc_object * > get_elements() const
Definition: sc_vector.hh:650
sc_core::sc_direct_access::Policy
sc_direct_access< ElementType > Policy
Definition: sc_vector.hh:211
sc_core::sc_direct_access::get
ElementType * get(ElementType *this_) const
Definition: sc_vector.hh:228
sc_core::sc_vector_base::size_type
size_t size_type
Definition: sc_vector.hh:167
sc_core::sc_vector
Definition: sc_vector.hh:158
sc_core::sc_vector::init
void init(size_type _size)
Definition: sc_vector.hh:460
gem5::ArmISA::i
Bitfield< 7 > i
Definition: misc_types.hh:67
sc_core::sc_vector_iter::operator==
bool operator==(const ConstDirectIterator &other) const
Definition: sc_vector.hh:384
sc_core::sc_vector_iter::pointer
typename AccessPolicy::Type * pointer
Definition: sc_vector.hh:317
sc_core::sc_vector_base::unforceParent
void unforceParent() const
Definition: sc_vector.cc:107
gem5::auxv::Type
Type
Definition: aux_vector.hh:65
sc_core::sc_vector_iter::operator->
pointer operator->() const
Definition: sc_vector.hh:420
sc_core::sc_vector_base::elements
std::vector< sc_object * > elements
Definition: sc_vector.hh:180
Access
Definition: proxy_ptr.test.cc:36
sc_core::sc_member_access::Policy
sc_member_access< ElementType, AccessType > Policy
Definition: sc_vector.hh:248
sc_core::sc_direct_access
Definition: sc_vector.hh:204
sc_core::sc_vector_base::objectCast
virtual sc_object * objectCast(void *) const =0
sc_core::sc_vector_base::implicitCast
sc_object * implicitCast(sc_object *p) const
Definition: sc_vector.hh:182
sc_core::sc_vector_iter::it_
RawIterator it_
Definition: sc_vector.hh:302
sc_core::sc_member_access::sc_member_access
sc_member_access(const NonConstPolicy &other)
Definition: sc_vector.hh:253
sc_core::sc_vector_iter::NonConstPolicy
AccessPolicy::NonConstPolicy NonConstPolicy
Definition: sc_vector.hh:268
sc_core::sc_member_access::PlainType
sc_gem5::remove_const< AccessType >::type PlainType
Definition: sc_vector.hh:245
sc_core::sc_member_access::MemberType
AccessTypeElementType::* MemberType
Definition: sc_vector.hh:243
sc_core::sc_vector_iter::Policy
AccessPolicy::Policy Policy
Definition: sc_vector.hh:267
gem5::VegaISA::c
Bitfield< 2 > c
Definition: pagetable.hh:63
sc_core::sc_vector_base::implicitCast
sc_object * implicitCast(...) const
Definition: sc_vector.hh:183
sc_core::sc_vector_iter::operator--
ThisType & operator--()
Definition: sc_vector.hh:338
sc_core::sc_direct_access::sc_direct_access
sc_direct_access()
Definition: sc_vector.hh:215
sc_core::sc_vector_assembly::bind
iterator bind(BindableIterator first, BindableIterator last, iterator from)
Definition: sc_vector.hh:707
sc_core::sc_vector::end
const_iterator end() const
Definition: sc_vector.hh:513
sc_core::sc_vector_iter::ConstPolicy
AccessPolicy::ConstPolicy ConstPolicy
Definition: sc_vector.hh:269
SC_REPORT_ERROR
#define SC_REPORT_ERROR(msg_type, msg)
Definition: sc_report_handler.hh:127
sc_core::sc_vector::sc_vector
sc_vector()
Definition: sc_vector.hh:445
sc_gem5::remove_const::type
T type
Definition: sc_vector.hh:105
sc_core::sc_vector::bind
iterator bind(BindableIterator first, BindableIterator last, iterator from)
Definition: sc_vector.hh:540
gem5::VegaISA::p
Bitfield< 54 > p
Definition: pagetable.hh:70
sc_core::sc_vector::sc_vector
sc_vector(const char *_name, size_type _size)
Definition: sc_vector.hh:447
sc_core::sc_member_access::ElementType
Element ElementType
Definition: sc_vector.hh:241
sc_gem5::is_const::value
static const bool value
Definition: sc_vector.hh:127
sc_core::sc_vector::create_element
static T * create_element(const char *_name, size_type index)
Definition: sc_vector.hh:465
sc_core::sc_vector_iter::SelectIter< const U >::type
std::vector< void * >::const_iterator type
Definition: sc_vector.hh:295
sc_core::sc_vector_iter::sc_vector_iter
sc_vector_iter(RawIterator it, Policy acc=Policy())
Definition: sc_vector.hh:304
gem5::X86ISA::type
type
Definition: misc.hh:734
sc_core::sc_vector_assembly::const_iterator
sc_vector_iter< const T, sc_member_access< const T, const MT > > const_iterator
Definition: sc_vector.hh:615
sc_gem5::is_more_const::value
static const bool value
Definition: sc_vector.hh:140
sc_gem5::is_const
Definition: sc_vector.hh:125
sc_core::sc_vector_assembly::vec_
sc_vector< T > * vec_
Definition: sc_vector.hh:771
sc_core::sc_vector_iter::ElementType
Element ElementType
Definition: sc_vector.hh:266
sc_core::sc_vector_iter::operator<=
bool operator<=(const ConstDirectIterator &other) const
Definition: sc_vector.hh:394
sc_core::sc_member_access::ConstPolicy
sc_member_access< const PlainElemType, const PlainType > ConstPolicy
Definition: sc_vector.hh:250
sc_core::sc_vector_iter::operator+
ThisType operator+(difference_type n) const
Definition: sc_vector.hh:359
sc_core::sc_vector_base::get_elements
const std::vector< sc_object * > & get_elements() const
Definition: sc_vector.cc:78
sc_core::sc_direct_access::ConstPolicy
sc_direct_access< const PlainType > ConstPolicy
Definition: sc_vector.hh:213
SC_ENABLE_IF_
#define SC_ENABLE_IF_(Cond)
Definition: sc_vector.hh:163
sc_core::sc_vector_iter::PlainType
sc_gem5::remove_const< ElementType >::type PlainType
Definition: sc_vector.hh:272
sc_core::sc_vector_base::kind
virtual const char * kind() const
Definition: sc_vector.hh:171
sc_core::sc_direct_access::NonConstPolicy
sc_direct_access< PlainType > NonConstPolicy
Definition: sc_vector.hh:212
sc_core::sc_vector_base::reportEmpty
void reportEmpty(const char *kind_, bool empty_dest) const
Definition: sc_vector.cc:113
sc_core::sc_gen_unique_name
const char * sc_gen_unique_name(const char *seed)
Definition: sc_module.cc:820
sc_gem5::is_same::value
static const bool value
Definition: sc_vector.hh:116
sc_core::sc_vector_iter::operator>
bool operator>(const ConstDirectIterator &other) const
Definition: sc_vector.hh:409
sc_core::sc_vector_iter::operator<
bool operator<(const ConstDirectIterator &other) const
Definition: sc_vector.hh:404
sc_core::sc_direct_access::PlainType
sc_gem5::remove_const< ElementType >::type PlainType
Definition: sc_vector.hh:209
sc_core::sc_member_access::ptr_
MemberType ptr_
Definition: sc_vector.hh:258
sc_core::sc_object
Definition: sc_object.hh:50
sc_core::sc_member_access::PlainElemType
sc_gem5::remove_const< ElementType >::type PlainElemType
Definition: sc_vector.hh:246
sc_core::sc_vector_iter::get_policy
const Policy & get_policy() const
Definition: sc_vector.hh:308
sc_gem5::special_result
Definition: sc_vector.hh:146
sc_core::sc_member_access::sc_member_access
sc_member_access(MemberType ptr)
Definition: sc_vector.hh:252
sc_core::sc_vector::end
iterator end()
Definition: sc_vector.hh:511
sc_core::sc_vector_iter::operator*
reference operator*() const
Definition: sc_vector.hh:415
sc_core::sc_vector_assembly::bind
iterator bind(BindableIterator first, BindableIterator last, typename sc_vector< T >::iterator from)
Definition: sc_vector.hh:719
sc_core::sc_vector_iter::iterator_category
std::random_access_iterator_tag iterator_category
Definition: sc_vector.hh:318
sc_core::sc_vector_assembly
Definition: sc_vector.hh:155
sc_core::sc_vector::bind
iterator bind(BindableIterator first, BindableIterator last)
Definition: sc_vector.hh:533
gem5::VegaISA::v
Bitfield< 0 > v
Definition: pagetable.hh:65
sc_core::sc_vector::const_iterator
sc_vector_iter< const T > const_iterator
Definition: sc_vector.hh:443
sc_core::sc_direct_access::sc_direct_access
sc_direct_access(const NonConstPolicy &)
Definition: sc_vector.hh:216
sc_core::sc_vector_iter::ConstIterator
sc_vector_iter< ConstPlainType, ConstPolicy > ConstIterator
Definition: sc_vector.hh:298
gem5::ArmISA::n
Bitfield< 31 > n
Definition: misc_types.hh:513
sc_core::sc_vector_iter::SelectIter
Definition: sc_vector.hh:288
sc_core::sc_member_access::AccessType
Access AccessType
Definition: sc_vector.hh:242
sc_core::sc_direct_access::Type
ElementType Type
Definition: sc_vector.hh:208
sc_core::sc_vector_iter::sc_vector_iter
sc_vector_iter(const It &it, SC_ENABLE_IF_((sc_gem5::is_more_const< ElementType, typename It::Policy::ElementType >)))
Definition: sc_vector.hh:323
sc_core::sc_vector_assembly::sc_vector_assembly
sc_vector_assembly(sc_vector< T > &v, MemberType ptr)
Definition: sc_vector.hh:767
sc_core::sc_direct_access::sc_direct_access
sc_direct_access(const U &, SC_ENABLE_IF_((sc_gem5::is_more_const< ElementType, typename U::Policy::ElementType >)))
Definition: sc_vector.hh:219
sc_core::sc_vector_iter::difference_type
std::ptrdiff_t difference_type
Definition: sc_vector.hh:314
sc_core::sc_object::name
const char * name() const
Definition: sc_object.cc:44
sc_core::sc_vector_iter::ConstDirectIterator
sc_vector_iter< ConstPlainType, ConstDirectPolicy > ConstDirectIterator
Definition: sc_vector.hh:300
sc_core::sc_vector::iterator
sc_vector_iter< T > iterator
Definition: sc_vector.hh:442
sc_core::sc_vector_iter::ConstPlainType
const typedef PlainType ConstPlainType
Definition: sc_vector.hh:273
sc_core::sc_vector_iter::operator>=
bool operator>=(const ConstDirectIterator &other) const
Definition: sc_vector.hh:399
sc_core::sc_vector_assembly::cbegin
const_iterator cbegin() const
Definition: sc_vector.hh:626
sc_core::sc_vector_assembly::iterator
sc_vector_iter< T, sc_member_access< T, MT > > iterator
Definition: sc_vector.hh:613
sc_core::sc_vector::bind
iterator bind(sc_vector_assembly< ContainerType, ArgumentType > c)
Definition: sc_vector.hh:519
sc_core::sc_vector::init
void init(size_type _size, Creator creator)
Definition: sc_vector.hh:472
sc_core::sc_vector::sc_vector
sc_vector(const char *_name, size_type _size, Creator creator)
Definition: sc_vector.hh:452
sc_core::sc_vector::operator[]
T & operator[](size_type index)
Definition: sc_vector.hh:490
sc_core::sc_vector::at
T & at(size_type index)
Definition: sc_vector.hh:498
sc_core::sc_vector_iter::SelectIter::type
std::vector< void * >::iterator type
Definition: sc_vector.hh:290
sc_core::sc_vector_assembly::size
size_type size() const
Definition: sc_vector.hh:647
sc_gem5
Definition: sc_clock.cc:41
sc_core::sc_vector_iter::operator-
ThisType operator-(difference_type n) const
Definition: sc_vector.hh:364
sc_core::sc_vector::objectCast
sc_object * objectCast(void *ptr) const
Definition: sc_vector.hh:599
sc_core::sc_vector_base::forceParent
void forceParent() const
Definition: sc_vector.cc:101
sc_core::sc_vector_base::objs
std::vector< void * > objs
Definition: sc_vector.hh:176
sc_core::sc_vector::cbegin
const_iterator cbegin() const
Definition: sc_vector.hh:514
sc_core::sc_vector_assembly::size_type
size_t size_type
Definition: sc_vector.hh:612
sc_core::sc_vector_assembly::end
iterator end()
Definition: sc_vector.hh:623
sc_core::sc_direct_access::ElementType
Element ElementType
Definition: sc_vector.hh:207
sc_core::sc_vector::operator=
sc_vector & operator=(const sc_vector &)
sc_core::sc_vector::operator()
iterator operator()(sc_vector_assembly< ContainerType, ArgumentType > c)
Definition: sc_vector.hh:552
sc_core::sc_vector_assembly::begin
const_iterator begin() const
Definition: sc_vector.hh:637
sc_core::sc_vector_iter::operator[]
reference operator[](difference_type n) const
Definition: sc_vector.hh:425
sc_core::sc_vector_assembly::cend
const_iterator cend() const
Definition: sc_vector.hh:631
sc_core::sc_member_access::NonConstPolicy
sc_member_access< PlainElemType, PlainType > NonConstPolicy
Definition: sc_vector.hh:249
sc_gem5::remove_special_fptr
Definition: sc_vector.hh:150
sc_core::sc_vector_iter
Definition: sc_vector.hh:263
sc_core::sc_vector_base::sc_vector_base
sc_vector_base(const char *_name)
Definition: sc_vector.hh:169
sc_core::sc_vector_iter::RawIterator
SelectIter< ElementType >::type RawIterator
Definition: sc_vector.hh:297
sc_core::sc_vector_assembly::end
const_iterator end() const
Definition: sc_vector.hh:642
sc_core::sc_vector_base
Definition: sc_vector.hh:164
sc_core::sc_vector_assembly::MemberType
MTT::* MemberType
Definition: sc_vector.hh:616
sc_gem5::is_same
Definition: sc_vector.hh:114
sc_core::sc_vector::begin
iterator begin()
Definition: sc_vector.hh:510

Generated on Sun Jul 30 2023 01:57:02 for gem5 by doxygen 1.8.17