void TestExceptionHandling() { REMARK (__FUNCTION__); for( size_t n = 2; n <= 10; ++n ) { for( exception_mask = 1; exception_mask < (size_t) (1 << n); ++exception_mask ) { ResetEhGlobals(); TRY(); REMARK("Calling parallel_invoke, number of functions = %d, exception_mask = %d\n", n, exception_mask); call_parallel_invoke(n, test_with_throw0, test_with_throw1, test_with_throw2, test_with_throw3, test_with_throw4, test_with_throw5, test_with_throw6, test_with_throw7, test_with_throw8, test_with_throw9, NULL); CATCH_AND_ASSERT(); } } }
void TestExceptionsSupport() { REMARK (__FUNCTION__); size_t test_vector[NUMBER_OF_ELEMENTS + 1]; for (size_t i = 0; i < NUMBER_OF_ELEMENTS; i++) { test_vector[i] = i; } Iterator begin(&test_vector[0]); Iterator end(&test_vector[NUMBER_OF_ELEMENTS]); TRY(); tbb::parallel_for_each(begin, end, (TestFunctionType)test_function_with_exception); CATCH_AND_ASSERT(); }