int TestMain() { #if TBB_USE_DEBUG // size and copyability. REMARK("is_large_object<int>::value=%d\n", tbb::interface6::internal::is_large_object<int>::value); REMARK("is_large_object<double>::value=%d\n", tbb::interface6::internal::is_large_object<double>::value); REMARK("is_large_object<int *>::value=%d\n", tbb::interface6::internal::is_large_object<int *>::value); REMARK("is_large_object<check_type<int> >::value=%d\n", tbb::interface6::internal::is_large_object<check_type<int> >::value); REMARK("is_large_object<check_type<int>* >::value=%d\n", tbb::interface6::internal::is_large_object<check_type<int>* >::value); REMARK("is_large_object<check_type<short> >::value=%d\n\n", tbb::interface6::internal::is_large_object<check_type<short> >::value); #endif // Test with varying number of threads. for( int nthread=MinThread; nthread<=MaxThread; ++nthread ) { // Initialize TBB task scheduler REMARK("\nTesting with nthread=%d\n", nthread); tbb::task_scheduler_init init(nthread); // Run test several times with different types run_function_spec(); run_function<size_t,int>("size_t", "int"); run_function<int,double>("int", "double"); run_function<size_t,double>("size_t", "double"); run_function<size_t,bool>("size_t", "bool"); run_function<int,int>("int","int"); run_function<check_type<unsigned int>,size_t>("check_type<unsigned int>", "size_t"); run_function<check_type<unsigned short>,size_t>("check_type<unsigned short>", "size_t"); run_function<check_type<unsigned int>, check_type<unsigned int> >("check_type<unsigned int>", "check_type<unsigned int>"); run_function<check_type<unsigned int>, check_type<unsigned short> >("check_type<unsigned int>", "check_type<unsigned short>"); run_function<check_type<unsigned short>, check_type<unsigned short> >("check_type<unsigned short>", "check_type<unsigned short>"); run_function<double, check_type<unsigned short> >("double", "check_type<unsigned short>"); } return Harness::Done; }
int TestMain() { // Test with varying number of threads. for( int nthread=MinThread; nthread<=MaxThread; ++nthread ) { // Initialize TBB task scheduler tbb::task_scheduler_init init(nthread); // Run test several times with different types run_function_spec(); run_function<size_t,int>(); run_function<int,double>(); run_function<check_type,size_t>(); } return Harness::Done; }
int TestMain() { // Test with varying number of threads. for( int nthread=MinThread; nthread<=MaxThread; ++nthread ) { // Initialize TBB task scheduler REMARK("\nTesting with nthread=%d\n", nthread); tbb::task_scheduler_init init(nthread); // Run test several times with different types run_function_spec(); run_function<size_t,int>("size_t", "int"); run_function<int,double>("int", "double"); check_type_counter = 0; run_function<check_type,size_t>("check_type", "size_t"); ASSERT(!check_type_counter, "Error in check_type creation/destruction"); // check_type as the second type in the pipeline only works if check_type // is also the first type. The middle_filter specialization for <check_type, check_type> // changes the state of the check_type items, and this is checked in the output_filter // specialization. run_function<check_type, check_type>("check_type", "check_type"); ASSERT(!check_type_counter, "Error in check_type creation/destruction"); } return Harness::Done; }