12 #ifndef SSTMAC_SOFTWARE_PROCESS_GLOBAL_BUILTIN_ARRAY_H_INCLUDED 13 #define SSTMAC_SOFTWARE_PROCESS_GLOBAL_BUILTIN_ARRAY_H_INCLUDED 21 template<
typename T,
int N>
26 typedef spkt_unordered_map<long, T*>
val_map;
42 ::memcpy(init_, init, N *
sizeof(T));
47 "copy constructor should never be called for primitive global");
52 for (
auto& pair : vals_){
56 if (init_)
delete[]
init_;
61 typename val_map::const_iterator it = vals_.begin();
62 for (; it != vals_.end(); ++it) {
63 std::cout << it->second << std::endl;
70 val_map& vals =
const_cast<val_map&
> (
vals_);
72 typename val_map::iterator it = vals.find(ptxt);
73 if (it == vals.end()) {
87 "getting static array value with no process context");
110 return myval == otherval;
118 return myval != otherval;
121 template <
typename U>
151 operator void*()
const {
155 operator double*()
const {
159 operator int*()
const {
163 operator bool*()
const {
167 operator size_t*()
const {
171 operator long*()
const {
175 operator long long*()
const {
219 T* otherval = (T*) b;
220 return myval > otherval;
228 return myval < otherval;
233 return vals_[0].begin();
237 return vals_[0].end();
process_context current_context() const
void * memcpy(const VariablePtr< T > &dst, const VariablePtr< T > &src, size_t size)
bool operator!=(const U &b) const
T * operator-(const U &b) const
const_iterator end() const
virtual ~sstmac_global_builtin_arr()
sstmac_global_builtin_arr()
bool operator==(const U &b) const
parallel_runtime * init()
virtual std::string to_string() const
SUMI = Simulator unified messagine interface It is also the name for a solid ink in Japanese - i...
T * operator+(const U &b) const
spkt_unordered_map< long, T * > val_map
bool operator>(const U &b)
virtual T * get_val() const
val_map::const_iterator const_iterator
sstmac_global_builtin_arr(const sstmac_global_builtin_arr< T, N > &other)
bool operator<(const U &b)
#define spkt_throw_printf(exc, template_str,...)
const_iterator begin() const
T * operator=(const U &b)
sstmac_global_builtin_arr(static_arr init)