32 namespace swarm {
namespace monitors {
56 :ej(cfg), ce(cfg), co(cfg) {}
61 (
const params& p,ensemble::SystemRef& s,
L& l)
62 : ej(p.ej,s,l), ce(p.ce,s,l), co(p.co,s,l) {}
65 static GENERIC int thread_per_system(T compile_time_param){
70 static GENERIC int shmem_per_system(T compile_time_param) {
79 { ej(thread_in_system); ce(thread_in_system); co(thread_in_system); }
86 if(need_to_log_system() && (thread_in_system==0) )
90 GPUAPI
bool is_deactivate_on() {
return ej.is_deactivate_on() || ce.is_deactivate_on() || co.is_deactivate_on(); }
91 GPUAPI
bool is_log_on() {
return ej.is_log_on() || ce.is_log_on() || co.is_log_on(); }
92 GPUAPI
bool is_verbose_on() {
return ej.is_verbose_on() || ce.is_verbose_on() || co.is_verbose_on(); };
93 GPUAPI
bool is_any_on() {
return is_deactivate_on() || is_log_on() || is_verbose_on() ; }
95 GPUAPI
bool is_condition_met () {
return ej.is_condition_met() || ce.is_condition_met() || co.is_condition_met(); }
96 GPUAPI
bool need_to_log_system ()
97 {
return (ej.need_to_log_system() || ce.need_to_log_system() || co.need_to_log_system() ); }
98 GPUAPI
bool need_to_deactivate ()
99 {
return (ej.need_to_deactivate() || ce.need_to_deactivate() || co.need_to_deactivate() ); }
103 {
return ej.
pass_one(thread_in_system) || ce.
pass_one(thread_in_system) || co.pass_one(thread_in_system); }
109 int s1 = ej.
pass_two(thread_in_system);
110 int s2 = ce.
pass_two(thread_in_system);
111 int s3 = co.pass_two(thread_in_system);
112 if((s1==0)&&(s1==0)&&(s3==0))
return 0;
116 if((s1<0)||(s2<0)||(s3<0))
160 : ej(p.ej,s,l), ce(p.ce,s,l) {}
163 static GENERIC int thread_per_system(T compile_time_param){
168 static GENERIC int shmem_per_system(T compile_time_param) {
176 GPUAPI
void operator () (
const int thread_in_system)
177 { ej(thread_in_system); ce(thread_in_system); }
179 GPUAPI
void operator () (
const int thread_in_system)
183 if(need_to_log_system() && (thread_in_system==0) )
187 GPUAPI
bool is_deactivate_on() {
return ej.is_deactivate_on() || ce.is_deactivate_on(); }
188 GPUAPI
bool is_log_on() {
return ej.is_log_on() || ce.is_log_on(); }
189 GPUAPI
bool is_verbose_on() {
return ej.is_verbose_on() || ce.is_verbose_on(); };
190 GPUAPI
bool is_any_on() {
return is_deactivate_on() || is_log_on() || is_verbose_on() ; }
192 GPUAPI
bool is_condition_met () {
return ej.is_condition_met() || ce.is_condition_met(); }
193 GPUAPI
bool need_to_log_system ()
194 {
return (ej.need_to_log_system() || ce.need_to_log_system() ); }
195 GPUAPI
bool need_to_deactivate ()
196 {
return (ej.need_to_deactivate() || ce.need_to_deactivate()); }
205 int s1 = ej.
pass_two(thread_in_system);
206 int s2 = ce.
pass_two(thread_in_system);
207 if((s1==0)&&(s1==0))
return 0;
212 {
if(s2<ret) ret = s2; }
214 {
if(s2>ret) ret = s2; }