本文整理汇总了C++中Allocation::printAllocation方法的典型用法代码示例。如果您正苦于以下问题:C++ Allocation::printAllocation方法的具体用法?C++ Allocation::printAllocation怎么用?C++ Allocation::printAllocation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Allocation
的用法示例。
在下文中一共展示了Allocation::printAllocation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char *argv[])
{
Sym_Params sys;
int verbose;
int type_Alg;
int taskOrderSelection;
Allocation allocation;
cout<<"Verbose option?"<<endl;
cout<<"1 - Yes"<<endl;
cout<<"0 - No"<<endl;
cin >>verbose;
if(verbose==1)
cout<<"Verbose option!"<<endl;
cout<<"Select the type of algorithm! Digit:"<<endl;
cout<<"0 - First Fit "<<endl;
cout<<"1 - Best Fit"<<endl;
cout<<"2 - Worst Fit"<<endl;
cin >>type_Alg;
if(verbose==1)
{
cout<<"select alg:"<<type_Alg<<endl;
}
cout<<"Select the type of order in which tasks are selected! Digit:"<<endl;
cout<<"0 - Precedence Order "<<endl;
cout<<"1 - Decrease Computation Time Order"<<endl;
cout<<"2 - Increase Computation Time Order"<<endl;
cin>>taskOrderSelection;
if(verbose==1)
{
cout<<"select task:"<<taskOrderSelection<<endl;
}
sys.parse_args(argc, argv);
sys.print_params();
cout<< "input file name "<<sys.input_filename.c_str()<<endl;
ifstream is;
is.open(sys.input_filename.c_str(),ios_base::in);
if(is.is_open())
cout <<"file is open"<<endl;
else
cout<<"file is close"<<endl;
cout<< "input file name processor "<<sys.input_processor_filename.c_str()<<endl;
ifstream isp;
isp.open(sys.input_processor_filename.c_str(),ios_base::in);
if(isp.is_open())
cout <<"file is open"<<endl;
else
cout<<"file is close"<<endl;
read_input_file(is, sys);
read_proc_file(isp,sys);
if (sys.pipes_data.size() == 0)
cout << "No more task sets to process, exiting!" << endl;
CheckFeasibility* mainClass = new CheckFeasibility( taskOrderSelection , type_Alg, sys.pipes_data,sys.period_deadline, sys.processors,verbose);
allocation= mainClass->check();
allocation.printAllocation();
mainClass->printProcessor();
return 0;
}