static void OnExecuteCommand(Gtk::ComboBoxEntryText& cmd_ent, Gtk::FileChooserButton& ch_btn) { ExecState& es = GetES(); Execution::Data& edat = es.eDat; if( !es.isExec ) { ConsoleSetter ess(es); Gtk::Entry& ent = *cmd_ent.get_entry(); std::string cmd = ent.get_text().raw(); if( cmd.size() ) { Gtk::TextView& txt_view = es.detailsView; // переставим команду наверх по истории cmd_ent.remove_text(cmd); cmd_ent.prepend_text(cmd); ent.set_text(""); // очищаем AppendCommandText(txt_view, "Execute Command: '" + cmd + "'"); ConsoleOF cof; ExitData ed = ExecuteAsync(ch_btn.get_filename().c_str(), cmd.c_str(), OF2RRF(cof), &edat.pid); std::string exit_str = ExitDescription(ed); AppendCommandText(txt_view, "Exit Status: " + exit_str + "."); es.SetStatus(ed.IsGood() ? std::string() : exit_str); } } else edat.StopExecution("\"command\""); }
void SpParHelper::LockNFetch(DER * & Matrix, int owner, vector<MPI_Win> & arrwin, MPI_Group & group, IT ** sizes) { LockWindows(owner, arrwin); vector<IT> ess(DER::esscount); // pack essentials to a vector for(int j=0; j< DER::esscount; ++j) ess[j] = sizes[j][owner]; Matrix = new DER(); // create the object first FetchMatrix(*Matrix, ess, arrwin, owner); // then start fetching its elements }
void SpParHelper::AccessNFetch(DER * & Matrix, int owner, vector<MPI_Win> & arrwin, MPI_Group & group, IT ** sizes) { StartAccessEpoch(owner, arrwin, group); // start the access epoch to arrwin of owner vector<IT> ess(DER::esscount); // pack essentials to a vector for(int j=0; j< DER::esscount; ++j) ess[j] = sizes[j][owner]; Matrix = new DER(); // create the object first FetchMatrix(*Matrix, ess, arrwin, owner); // then start fetching its elements }