/gem5/src/python/m5/util/ |
H A D | attrdict.py | 35 def __getattr__(self, attr): 36 if attr in self: 37 return self.__getitem__(attr) 38 return super(attrdict, self).__getattribute__(attr) 40 def __setattr__(self, attr, value): 41 if attr in dir(self) or attr.startswith('_'): 42 return super(attrdict, self).__setattr__(attr, value) 43 return self.__setitem__(attr, value) 45 def __delattr__(self, attr) [all...] |
H A D | grammar.py | 57 def __getattr__(self, attr): 58 if attr == 'lexers': 62 if attr == 'lex_kwargs': 66 if attr == 'yacc_kwargs': 70 if attr == 'lex': 74 if attr == 'yacc': 78 if attr == 'current_lexer': 83 if attr == 'current_source': 88 if attr == 'current_line': 94 "'%s' object has no attribute '%s'" % (type(self), attr)) [all...] |
/gem5/src/systemc/core/ |
H A D | sc_attr.cc | 72 sc_attr_cltn::push_back(sc_attr_base *attr) argument 74 if (!attr || (*this)[attr->name()]) 77 cltn.push_back(attr); 84 for (auto &attr: cltn) 85 if (attr->name() == name) 86 return attr; 93 for (auto &attr: cltn) 94 if (attr->name() == name) 95 return attr; [all...] |
/gem5/ext/pybind11/tests/ |
H A D | test_async.cpp | 21 py::object loop = py::module::import("asyncio.events").attr("get_event_loop")(); 22 py::object f = loop.attr("create_future")(); 23 f.attr("set_result")(5); 24 return f.attr("__await__")();
|
H A D | test_pickling.cpp | 96 return py::make_tuple(self.attr("value"), self.attr("extra"), self.attr("__dict__")); 109 self.attr("__dict__") = t[2]; 116 return py::make_tuple(self.attr("value"), self.attr("extra"), self.attr("__dict__"));
|
H A D | test_pytypes.cpp | 116 d["basic_attr"] = o.attr("basic_attr"); 119 for (const auto &item : o.attr("begin_end")) { 124 d["operator[object]"] = o.attr("d")["operator[object]"_s]; 125 d["operator[char *]"] = o.attr("d")["operator[char *]"]; 127 d["attr(object)"] = o.attr("sub").attr("attr_obj"); 128 d["attr(char *)"] = o.attr("sub").attr("attr_cha [all...] |
H A D | pybind11_tests.cpp | 71 m.attr("debug_enabled") = true; 73 m.attr("debug_enabled") = false; 92 if (!py::hasattr(m, "have_eigen")) m.attr("have_eigen") = false;
|
H A D | test_iostream.cpp | 40 py::scoped_ostream_redirect redir(std::cout, py::module::import("sys").attr("stdout")); 49 py::scoped_ostream_redirect redir(std::cerr, py::module::import("sys").attr("stderr")); 68 py::scoped_ostream_redirect redirout(std::cout, py::module::import("sys").attr("stdout")); 69 py::scoped_ostream_redirect redirerr(std::cerr, py::module::import("sys").attr("stderr"));
|
/gem5/src/cpu/kvm/ |
H A D | device.hh | 73 * @param attr Attribute ID within group 77 T getAttr(uint32_t group, uint64_t attr) const { 79 getAttrPtr(group, attr, &data); 90 * @param attr Attribute ID within group 94 void setAttr(uint32_t group, uint64_t attr, const T &data) const { argument 95 setAttrPtr(group, attr, &data); 98 void getAttrPtr(uint32_t group, uint64_t attr, void *data) const; 99 void setAttrPtr(uint32_t group, uint64_t attr, const void *data) const; 108 * @param attr Attribute ID within group 111 bool hasAttr(uint32_t group, uint64_t attr) cons [all...] |
H A D | device.cc | 62 KvmDevice::getAttrPtr(uint32_t group, uint64_t attr, void *data) const argument 68 attr, 73 panic("Failed to get attribute (group: %i, attr: %i, errno: %i)", 74 group, attr, errno); 82 KvmDevice::setAttrPtr(uint32_t group, uint64_t attr, const void *data) const argument 88 attr, 93 panic("Failed to set attribute (group: %i, attr: %i, errno: %i)", 94 group, attr, errno); 102 KvmDevice::hasAttr(uint32_t group, uint64_t attr) const 108 attr, [all...] |
H A D | perfevent.hh | 88 attr.freq = 0; 89 attr.sample_period = period; 101 attr.watermark = 0; 102 attr.wakeup_events = events; 113 attr.disabled = val; 126 attr.pinned = val; 145 attr.exclude_host = val; 159 attr.exclude_hv = val; 164 struct perf_event_attr attr; member in class:PerfKvmCounterConfig
|
H A D | perfevent.cc | 58 memset(&attr, 0, sizeof(attr)); 60 attr.size = PERF_ATTR_SIZE_VER0; 61 attr.type = type; 62 attr.config = config; 167 &config.attr, tid,
|
/gem5/util/stats/ |
H A D | chart.py | 71 def __getattr__(self, attr): 72 if attr in self.options: 73 return self.options[attr] 75 if attr in ChartOptions.defaults: 76 return ChartOptions.defaults[attr] 79 "%s instance has no attribute '%s'" % (type(self), attr) 81 def __setattr__(self, attr, value): 82 if attr in ChartOptions.defaults: 83 self.options[attr] = value 85 super(ChartOptions, self).__setattr__(attr, valu [all...] |
H A D | info.py | 177 def __getattr__(self, attr): 178 if attr in ('data', 'x', 'y'): 183 return super(Statistic, self).__getattribute__(attr) 185 def __setattr__(self, attr, value): 186 if attr == 'stat': 188 if attr in ('source', 'ticks'): 189 if getattr(self, attr) != value: 193 super(Statistic, self).__setattr__(attr, value) 199 def __getattr__(self, attr): 200 if attr [all...] |
/gem5/src/python/m5/ |
H A D | options.py | 112 def __getattr__(self, attr): 113 if attr.startswith('_'): 114 return super(OptionParser, self).__getattribute__(attr) 116 if attr in self: 117 return self[attr] 119 return super(OptionParser, self).__getattribute__(attr) 121 def __setattr__(self, attr, value): 122 if attr.startswith('_'): 123 super(OptionParser, self).__setattr__(attr, value) 124 elif attr i [all...] |
H A D | proxy.py | 72 def __setattr__(self, attr, value): 73 if not attr.startswith('_'): 75 "cannot set attribute '%s' on proxy object" % attr) 76 super(BaseProxy, self).__setattr__(attr, value) 156 def __init__(self, search_self, search_up, attr): 158 self._attr = attr 161 def __getattr__(self, attr): 163 if attr.startswith('_'): 164 return super(AttrProxy, self).__getattr__(self, attr) 171 new_self._modifiers.append(attr) [all...] |
H A D | SimObject.py | 601 def _cls_get_port_ref(cls, attr): 605 ref = cls._port_refs.get(attr) 607 ref = cls._ports[attr].makeRef(cls) 608 cls._port_refs[attr] = ref 611 # Set attribute (called on foo.attr = value when foo is an 613 def __setattr__(cls, attr, value): 615 if public_value(attr, value): 616 type.__setattr__(cls, attr, value) 619 if attr in cls.keywords: 620 cls._set_keyword(attr, valu [all...] |
/gem5/ext/pybind11/tests/test_embed/ |
H A D | test_interpreter.cpp | 57 auto locals = py::dict("hello"_a="Hello, World!", "x"_a=5, **module.attr("__dict__")); 64 auto py_widget = module.attr("DerivedWidget")("The question"); 65 auto message = py_widget.attr("the_message"); 110 REQUIRE(py::module::import("widget_module").attr("add")(1, 2).cast<int>() == 3); 113 REQUIRE(py::module::import("external_module").attr("A")(123).attr("value").cast<int>() == 123); 117 py::module::import("external_module").attr("internals_at")().cast<uintptr_t>()); 133 py::module::import("external_module").attr("internals_at")().cast<uintptr_t>()); 140 py::module::import("__main__").attr("internals_destroy_test") = 153 REQUIRE(cpp_module.attr("ad [all...] |
/gem5/ext/pybind11/tests/test_cmake_build/ |
H A D | embed.cpp | 16 if (m.attr("add")(1, 2).cast<int>() != 3) 19 py::module::import("sys").attr("argv") = py::make_tuple("test.py", "embed.cpp");
|
/gem5/src/arch/x86/ |
H A D | system.cc | 71 SegAttr attr = 0; local 73 attr.dpl = desc.dpl; 74 attr.unusable = 0; 75 attr.defaultSize = desc.d; 76 attr.longMode = desc.l; 77 attr.avl = desc.avl; 78 attr.granularity = desc.g; 79 attr.present = desc.p; 80 attr.system = desc.s; 81 attr [all...] |
/gem5/ext/testlib/ |
H A D | config.py | 127 def _add_post_processor(self, attr, post_processor): 129 :param attr: Attribute to pass to and recieve from the 134 tuple containing the new value for the config attr. 136 if attr not in self._post_processors: 137 self._post_processors[attr] = [] 138 self._post_processors[attr].append(post_processor) 148 for attr in dir(args): 150 if not attr.startswith('_'): 151 self._config_file_args[attr] = getattr(args, attr) [all...] |
/gem5/configs/common/ |
H A D | CacheConfig.py | 212 def __getattr__(cls, attr): 213 if (attr == "cpu_side"): 214 attr = "port" 215 return super(ExternalSlave, cls).__getattr__(attr) 217 def __setattr__(cls, attr, value): 218 if (attr == "cpu_side"): 219 attr = "port" 220 return super(ExternalSlave, cls).__setattr__(attr, value)
|
/gem5/ext/systemc/src/sysc/kernel/ |
H A D | sc_cor_pthread.cpp | 192 pthread_attr_t attr; local 193 pthread_attr_init( &attr ); 196 pthread_attr_setstacksize( &attr, stack_size ); 215 if ( pthread_create( &cor_p->m_thread, &attr, 226 pthread_attr_destroy( &attr );
|
/gem5/src/python/pybind11/ |
H A D | core.cc | 80 auto f = m.attr("resolveSimObject"); 258 m_core.attr("compileDate") = py::cast(compileDate); 260 m_core.attr("flag_DEBUG") = py::cast(flag_DEBUG); 261 m_core.attr("flag_DEBUG") = py::cast(flag_DEBUG); 262 m_core.attr("flag_NDEBUG") = py::cast(flag_NDEBUG); 263 m_core.attr("flag_TRACING_ON") = py::cast(flag_TRACING_ON); 265 m_core.attr("MaxTick") = py::cast(MaxTick);
|
/gem5/ext/pybind11/include/pybind11/ |
H A D | iostream.h | 62 pywrite(pyostream.attr("write")), 63 pyflush(pyostream.attr("flush")) { 98 py::scoped_ostream_redirect output{std::cerr, py::module::import("sys").attr("stderr")}; 111 object pyostream = module::import("sys").attr("stdout")) 142 object pyostream = module::import("sys").attr("stderr"))
|