----------------------------------------- doTest -----------------------------------------
| 687 | // doTest |
| 688 | //----------------------------------------- |
| 689 | int doTest(cl_command_queue queue, cl_context context, |
| 690 | const unsigned int testId, cl_device_id device) |
| 691 | { |
| 692 | int err = TEST_FAIL; |
| 693 | |
| 694 | if ((allTestCase[testId]->_type == TYPE_HALF |
| 695 | || allTestCase[testId]->_type == TYPE_HALF_LIMITS) |
| 696 | && !is_extension_available(device, "cl_khr_fp16")) |
| 697 | { |
| 698 | log_info("Skipping half because cl_khr_fp16 extension is not " |
| 699 | "supported.\n"); |
| 700 | return TEST_SKIPPED_ITSELF; |
| 701 | } |
| 702 | |
| 703 | if ((allTestCase[testId]->_type == TYPE_LONG) && !isLongSupported(device)) |
| 704 | { |
| 705 | log_info("Skipping long because long is not supported.\n"); |
| 706 | return TEST_SKIPPED_ITSELF; |
| 707 | } |
| 708 | |
| 709 | if ((allTestCase[testId]->_type == TYPE_DOUBLE |
| 710 | || allTestCase[testId]->_type == TYPE_DOUBLE_LIMITS) |
| 711 | && !is_extension_available(device, "cl_khr_fp64")) |
| 712 | { |
| 713 | log_info("Skipping double because cl_khr_fp64 extension is not " |
| 714 | "supported.\n"); |
| 715 | return TEST_SKIPPED_ITSELF; |
| 716 | } |
| 717 | |
| 718 | auto& genParams = allTestCase[testId]->_genParameters; |
| 719 | |
| 720 | auto fail_count = s_test_fail; |
| 721 | auto pass_count = s_test_cnt; |
| 722 | auto skip_count = s_test_skip; |
| 723 | |
| 724 | for (unsigned testNum = 0; testNum < genParams.size(); testNum++) |
| 725 | { |
| 726 | if (allTestCase[testId]->_type == TYPE_VECTOR) |
| 727 | { |
| 728 | auto is_vector_type_supported = [&](const char* type_name, |
| 729 | const char* ext_name) { |
| 730 | if ((strcmp(genParams[testNum].dataType, type_name) == 0) |
| 731 | && !is_extension_available(device, ext_name)) |
| 732 | { |
| 733 | log_info("Skipping %s because %s extension " |
| 734 | "is not supported.\n", |
| 735 | type_name, ext_name); |
| 736 | |
| 737 | s_test_skip++; |
| 738 | s_test_cnt++; |
| 739 | return false; |
| 740 | } |
| 741 | return true; |
| 742 | }; |
| 743 | |
| 744 | if (!is_vector_type_supported("half", "cl_khr_fp16")) continue; |
| 745 | |
| 746 | if (!is_vector_type_supported("double", "cl_khr_fp64")) continue; |
no test coverage detected