bool ImR_Activator_i::still_running_i (const char *name, pid_t &pid) { bool is_running = this->running_server_list_.find (name) == 0; if (is_running) { pid = ACE_INVALID_PID; for (ProcessMap::ITERATOR iter = this->process_map_.begin (); iter != process_map_.end (); iter++) { if (ACE_OS::strcmp (name, iter->item ().c_str()) == 0) { pid = iter->key (); break; } } #if defined (ACE_WIN32) if (pid != ACE_INVALID_PID) { Active_Pid_Setter aps(*this, pid); pid_t waitp = this->process_mgr_.wait (pid, ACE_Time_Value::zero); is_running = (waitp != pid); } #endif /* ACE_WIN32 */ } return is_running; }
int main() { auto atmosphere = StE::Graphics::atmospherics_earth_properties({ 0,-6.371e+6,0 }); StE::Graphics::atmospherics_precompute_scattering aps(atmosphere); // aps.load("atmospherics_scatter_lut.bin"); aps.build_optical_length_lut(); aps.build_scatter_lut(9); aps.build_ambient_lut(); aps.write_out("atmospherics_scatter_lut.bin"); return 0; }
/// Get the apriori solution, given the systems in the current epoch's data Vector<double> getAprioriSolution(std::vector<SatID::SatelliteSystem> syss) { if(APSolution.size() == 3 + syss.size()) return APSolution; // must cut down the vector int j; size_t i; Vector<double> aps(3+syss.size(),0.0); for(i=0; i<3; i++) aps[i] = APSolution[i]; for(j=3,i=0; i<APsysIDs.size(); i++) { if(std::find(syss.begin(),syss.end(),APsysIDs[i]) != syss.end()) aps[j++] = APSolution[3+i]; } return aps; }