12 #ifndef SSTMAC_SOFTWARE_PROCESS_APP_H_INCLUDED 13 #define SSTMAC_SOFTWARE_PROCESS_APP_H_INCLUDED 34 return "sstmac mutex";
60 typedef void (*destructor_fxn)(
void*);
62 typedef int (*
main_fxn)(
int argc,
char** argv);
66 allocate_tls_key(destructor_fxn fnx);
68 static sprockit::sim_parameters*
88 return const_cast<app*
>(
this);
106 compute_loop(uint64_t,
108 int nintops_per_loop,
112 compute_detailed(
long flops,
long intops,
long bytes);
115 compute_block_read(
long bytes);
118 compute_block_write(
long bytes);
121 compute_block_memcpy(
long bytes);
130 consume_params(sprockit::sim_parameters* params) = 0;
133 clone_type()
const = 0;
147 init_factory_params(sprockit::sim_parameters *params);
149 sprockit::sim_parameters*
160 void add_subthread(
thread* thr);
167 void set_subthread_done(
thread* thr);
174 void remove_subthread(
thread* thr);
176 void remove_subthread(
long thr_id);
183 thread* get_subthread(
long id);
189 int allocate_mutex();
195 int allocate_condition();
209 condition_t* get_condition(
int id);
211 bool erase_condition(
int id);
213 bool erase_mutex(
int id);
216 clear_subthread_from_parent_app();
224 _get_api(
const char* name);
226 virtual void init_mem_lib();
258 void skeleton_main();
261 consume_params(sprockit::sim_parameters *params);
293 consume_params(sprockit::sim_parameters *params);
300 void skeleton_main();
std::list< key * > conditionals
std::map< long, thread * > subthreads_
Input for processor models that use performance counter data.
std::map< long, mutex_t * > condition_t
std::map< int, condition_t > conditions_
sprockit::sim_parameters * params_
std::map< int, mutex_t > mutexes_
lib_compute_loops * compute_loops_
The app derived class adds to the thread base class by providing facilities to allow applications to ...
void compute_time(double tsec)
utility function for computing stuff
sprockit::sim_parameters * params() const
static std::map< std::string, app::main_fxn > * main_fxns_
static std::map< std::string, app::empty_main_fxn > * empty_main_fxns_
A basic container for time (subject to future transplant).
SUMI = Simulator unified messagine interface It is also the name for a solid ink in Japanese - i...
lib_compute_memmove * compute_mem_move_
DeclareFactory(blas_kernel)
int(* main_fxn)(int argc, char **argv)
std::list< key * > waiters
Blocking keys for those threads waiting on the mutex.
lib_compute_inst * compute_inst_
void run(opts &oo, sstmac::parallel_runtime *rt, sprockit::sim_parameters *params, sim_stats &stats)
static std::map< app_id, argv_entry > argv_map_
std::string to_string() const
lib_compute_time * compute_time_
A wrapper for an appid, taskid pair.
int(* main_fxn)(int, char **)
std::map< int, destructor_fxn > tls_key_fxns_