12 #ifndef SSTMAC_SOFTWARE_PROCESS_GLOBAL_BUILTIN_H_INCLUDED 13 #define SSTMAC_SOFTWARE_PROCESS_GLOBAL_BUILTIN_H_INCLUDED 26 typedef spkt_unordered_map<long, T>
val_map;
34 val_map& vals =
const_cast<val_map&
> (
vals_);
36 typename val_map::iterator it = vals.find(ptxt);
37 if (it == vals.end()) {
57 init_(init), isinit_(true) {
63 "copy constructor should never be called for primitive global");
73 typename val_map::const_iterator it = vals_.begin();
74 for (; it != vals_.end(); ++it) {
75 std::cout << it->second << std::endl;
82 val_map& vals =
const_cast<val_map&
> (
vals_);
84 typename val_map::iterator it = vals.find(ptxt);
85 if (it == vals.end()) {
98 return const_cast<T&
> (
init_);
103 std::stringstream ss;
153 return myval == otherval;
198 operator double()
const {
202 operator int()
const {
206 operator bool()
const {
210 operator size_t()
const {
214 operator long()
const {
218 operator long long()
const {
274 return myval > otherval;
282 return myval < otherval;
291 typedef typename spkt_unordered_map<long, T>::iterator myiter;
293 for (it = vals_.begin(); it != vals_.end(); ++it)
302 return vals_.begin();
311 template<
typename T,
typename U>
316 return ((U) b) / ((T) t);
319 template<
typename T,
typename U>
324 return (U) b + (T) t;
327 template<
typename T,
typename U>
332 return (U) b - (T) t;
336 template<
typename T,
typename U>
341 return ((U) b) * ((T) t);
344 template<
typename T,
typename U>
349 return ((U) b) * ((T) t);
352 template<
typename T,
typename U>
357 return ((U) b) * ((T) t);
361 template<
typename T,
typename U>
368 template<
typename T,
typename U>
375 template<
typename T,
typename U>
383 template<
typename T,
typename U>
391 template<
typename T,
typename U>
398 template<
typename T,
typename U>
406 template<
typename T,
typename U>
414 template<
typename T,
typename U>
416 operator<(const U& b, const sstmac_global_builtin<T>& t)
421 template<
typename T,
typename U>
428 template <
typename T>
430 operator<<(std::ostream& os, const sstmac_global_builtin<T>& t)
T & operator/=(const U &b)
T operator>>(const U &b) const
T operator+(const U &b) const
T operator<<(const U &b) const
process_context current_context() const
T & operator=(const U &b)
T operator/(const U &b) const
spkt_unordered_map< long, T > val_map
T operator%(const U &b) const
T operator-(const U &b) const
T & operator-=(const 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)
virtual ~sstmac_global_builtin()
T operator*(const U &b) const
bool operator<(const U &b)
bool check_init(process_context ptxt) const
T & operator*=(const U &b)
const_iterator end() const
#define spkt_throw_printf(exc, template_str,...)
val_map::const_iterator const_iterator
sstmac_global_builtin(T init)
bool operator!=(const U &b) const
bool operator>(const U &b)
bool operator==(const U &b) const
sstmac_global_builtin(const sstmac_global_builtin< T > &other)
const_iterator begin() const
virtual std::string to_string() const
virtual T & get_val() const