|
@ -7,7 +7,7 @@ |
|
|
#include <thread> |
|
|
#include <thread> |
|
|
|
|
|
|
|
|
void get_status() { |
|
|
void get_status() { |
|
|
switch (BasicRanges::get_status()) { |
|
|
switch (BasicRanges::status()) { |
|
|
case BasicRanges::NO_INIT: |
|
|
case BasicRanges::NO_INIT: |
|
|
std::cout << "basic ranges no init" << std::endl; |
|
|
std::cout << "basic ranges no init" << std::endl; |
|
|
break; |
|
|
break; |
|
@ -19,7 +19,7 @@ void get_status() { |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
switch (AllCases::get_status()) { |
|
|
switch (AllCases::status()) { |
|
|
case AllCases::NO_INIT: |
|
|
case AllCases::NO_INIT: |
|
|
std::cout << "all cases no init" << std::endl; |
|
|
std::cout << "all cases no init" << std::endl; |
|
|
break; |
|
|
break; |
|
@ -34,21 +34,33 @@ void get_status() { |
|
|
|
|
|
|
|
|
int main() { |
|
|
int main() { |
|
|
|
|
|
|
|
|
// get_status();
|
|
|
printf("%p\n", BasicRanges::build); |
|
|
// BasicRanges::build_basic_ranges();
|
|
|
printf("%p\n", AllCases::build); |
|
|
// get_status();
|
|
|
|
|
|
// AllCases::build_all_cases();
|
|
|
printf("%p\n", BasicRanges::status); |
|
|
// get_status();
|
|
|
printf("%p\n", AllCases::status); |
|
|
//
|
|
|
|
|
|
// for (auto const &all_case : *AllCases::get_all_cases()) {
|
|
|
printf("%p\n", BasicRanges::fetch); |
|
|
// std::cout << " " << all_case.size() << std::endl;
|
|
|
printf("%p\n", AllCases::fetch); |
|
|
// }
|
|
|
|
|
|
//
|
|
|
get_status(); |
|
|
// std::cout << BasicRanges::get_basic_ranges() << std::endl;
|
|
|
BasicRanges::build(); |
|
|
// std::cout << AllCases::get_basic_ranges() << std::endl;
|
|
|
get_status(); |
|
|
//
|
|
|
AllCases::build(); |
|
|
// printf("%p\n", BasicRanges::get_status);
|
|
|
get_status(); |
|
|
// printf("%p\n", AllCases::get_status);
|
|
|
|
|
|
|
|
|
std::cout << BasicRanges::fetch()->size() << std::endl; |
|
|
|
|
|
|
|
|
|
|
|
uint32_t sum = 0; |
|
|
|
|
|
for (auto const &all_case : *AllCases::fetch()) { |
|
|
|
|
|
sum += all_case.size(); |
|
|
|
|
|
std::cout << " " << all_case.size() << std::endl; |
|
|
|
|
|
} |
|
|
|
|
|
std::cout << sum << std::endl; |
|
|
|
|
|
|
|
|
|
|
|
std::cout << AllCases::fetch() << std::endl; |
|
|
|
|
|
std::cout << AllCases::BasicRanges::fetch() << std::endl; |
|
|
|
|
|
std::cout << BasicRanges::fetch() << std::endl; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// std::cout << CommonCode::check(0x123456789) << std::endl;
|
|
|
// std::cout << CommonCode::check(0x123456789) << std::endl;
|
|
@ -69,25 +81,25 @@ int main() { |
|
|
|
|
|
|
|
|
// std::cout << ShortCode::check_mode() << std::endl;
|
|
|
// std::cout << ShortCode::check_mode() << std::endl;
|
|
|
|
|
|
|
|
|
std::cout << "start NORMAL speed up" << std::endl; |
|
|
// std::cout << "start NORMAL speed up" << std::endl;
|
|
|
// ShortCode::speed_up(ShortCode::NORMAL);
|
|
|
//// ShortCode::speed_up(ShortCode::NORMAL);
|
|
|
std::thread t1(ShortCode::speed_up, ShortCode::NORMAL); |
|
|
// std::thread t1(ShortCode::speed_up, ShortCode::NORMAL);
|
|
|
std::thread t2(ShortCode::speed_up, ShortCode::NORMAL); |
|
|
// std::thread t2(ShortCode::speed_up, ShortCode::NORMAL);
|
|
|
t1.join(); |
|
|
// t1.join();
|
|
|
t2.join(); |
|
|
// t2.join();
|
|
|
std::cout << "NORMAL speed up complete" << std::endl; |
|
|
// std::cout << "NORMAL speed up complete" << std::endl;
|
|
|
|
|
|
//
|
|
|
std::cout << ShortCode::check_mode() << std::endl; |
|
|
// std::cout << ShortCode::check_mode() << std::endl;
|
|
|
|
|
|
//
|
|
|
std::cout << "start FAST speed up" << std::endl; |
|
|
// std::cout << "start FAST speed up" << std::endl;
|
|
|
// ShortCode::speed_up(ShortCode::FAST);
|
|
|
//// ShortCode::speed_up(ShortCode::FAST);
|
|
|
std::thread t3(ShortCode::speed_up, ShortCode::FAST); |
|
|
// std::thread t3(ShortCode::speed_up, ShortCode::FAST);
|
|
|
std::thread t4(ShortCode::speed_up, ShortCode::FAST); |
|
|
// std::thread t4(ShortCode::speed_up, ShortCode::FAST);
|
|
|
t3.join(); |
|
|
// t3.join();
|
|
|
t4.join(); |
|
|
// t4.join();
|
|
|
std::cout << "FAST speed up complete" << std::endl; |
|
|
// std::cout << "FAST speed up complete" << std::endl;
|
|
|
|
|
|
//
|
|
|
std::cout << ShortCode::check_mode() << std::endl; |
|
|
// std::cout << ShortCode::check_mode() << std::endl;
|
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|