12 #ifndef SSTMAC_SOFTWARE_PROCESS_GLOBAL_PTR_H_INCLUDED 13 #define SSTMAC_SOFTWARE_PROCESS_GLOBAL_PTR_H_INCLUDED 25 typedef spkt_unordered_map<long, T*>
val_map;
34 if (vals_.find(ptxt) == vals_.end()) {
65 val_map& vals =
const_cast<val_map&
> (vals_);
67 typename val_map::iterator it = vals.find(ptxt);
68 if (it == vals.end()) {
69 T*& ret = vals[ptxt] = init_;
76 return const_cast<T*&
> (init_);
89 T*& myval = get_val();
97 T*& myval = get_val();
141 return (
char*) get_val();
145 return (
int*) get_val();
149 return (
long*) get_val();
153 return (
void*) get_val();
156 operator const char*()
const {
157 return (
const char*) get_val();
160 operator const int*()
const {
161 return (
const int*) get_val();
164 operator const long*()
const {
165 return (
const long*) get_val();
168 operator const void*()
const {
169 return (
const void*) get_val();
180 T* myval = get_val();
181 T* otherval = (T*) b;
182 return myval == otherval;
204 return vals_.begin();
const_iterator end() const
val_map::const_iterator const_iterator
T * operator++(int dummy)
T * operator--(int dummy)
virtual T *& get_val(int n=0) const
const_iterator begin() const
virtual std::string to_string() const
bool check_init(process_context ptxt)
T *& operator=(const sstmac_global_builtin< U > &b)
parallel_runtime * init()
SUMI = Simulator unified messagine interface It is also the name for a solid ink in Japanese - i...
T * operator-(const U &b)
spkt_unordered_map< long, T * > val_map
bool operator==(const software_id &a, const software_id &b)
virtual ~sstmac_global_builtin()
T * operator+(const U &b)
sstmac_global_builtin(T *init)