diff --git a/tests/accessor/accessor_common.h b/tests/accessor/accessor_common.h index 04420b6e7..850ccbdda 100644 --- a/tests/accessor/accessor_common.h +++ b/tests/accessor/accessor_common.h @@ -219,42 +219,151 @@ void common_run_tests() { } /** - * @brief Factory function for getting type_pack with access modes values + * @brief Alias for a value pack containing all tested access modes. */ -inline auto get_access_modes() { - static const auto access_modes = - value_pack::generate_named(); - return access_modes; -} +using access_modes_pack = + value_pack; /** - * @brief Factory function for getting type_pack with dimensions values + * @brief Alias for a integer value pack containing all valid non-zero + * dimensions. */ -inline auto get_dimensions() { - static const auto dimensions = integer_pack<1, 2, 3>::generate_unnamed(); - return dimensions; -} +using dimensions_pack = integer_pack<1, 2, 3>; /** - * @brief Factory function for getting type_pack with all (including zero) - * dimensions values + * @brief Alias for a integer value pack containing all valid dimensions. */ -inline auto get_all_dimensions() { - static const auto dimensions = integer_pack<0, 1, 2, 3>::generate_unnamed(); - return dimensions; -} +using all_dimensions_pack = integer_pack<0, 1, 2, 3>; /** - * @brief Factory function for getting type_pack with target values + * @brief Alias for a value pack containing all tested targets. */ -inline auto get_targets() { - static const auto targets = - value_pack::generate_named(); - return targets; -} +using targets_pack = + value_pack; + +/** + * @brief Lightweight struct for containing tuple types with the singleton packs + * comprising a single combination to test. + */ +template +struct combinations_list {}; + +/** + * @brief Helper trait for concatenating two combinations_list. + */ +template +struct concat_combination_lists; +template +struct concat_combination_lists, + combinations_list> { + using type = combinations_list; +}; + +/** + * @brief Helper trait for appending an element to a combinations_list. + */ +template +struct append_comb; +template +struct append_comb> { + using type = combinations_list; +}; + +/** + * @brief Helper trait for appending a type to each element in a + * combinations_list. + */ +template +struct append_type_to_combs; +template +struct append_type_to_combs< + T, combinations_list, CombTs...>> { + using tail = + typename append_type_to_combs>::type; + using type = typename append_comb, tail>::type; +}; +template +struct append_type_to_combs> { + using type = combinations_list<>; +}; + +/** + * @brief Helper trait for either appending a type to each element of a + * combinations_list or creating a new combination with T if the given + * combination_list is empty. + */ +template +struct append_or_create_combs { + using type = typename append_type_to_combs::type; +}; +template +struct append_or_create_combs> { + using type = combinations_list>; +}; + +/** + * @brief Helper trait for getting all combinations of the values and types in + * the specified packs. + */ +template +struct get_combinations_helper; +template +struct get_combinations_helper { + using type = LastLevelCombs; +}; +template +struct get_combinations_helper, Packs...> { + using new_combs = + typename append_or_create_combs, LastLevelCombs>::type; + using new_current_level_combs = + typename concat_combination_lists::type; + using type = + typename get_combinations_helper, Packs...>::type; +}; +template +struct get_combinations_helper, + Packs...> { + using type = + typename get_combinations_helper, CurrentLevelCombs, + Packs...>::type; +}; +template +struct get_combinations_helper, Packs...> { + using new_combs = + typename append_or_create_combs, LastLevelCombs>::type; + using new_current_level_combs = + typename concat_combination_lists::type; + using type = + typename get_combinations_helper, Packs...>::type; +}; +template +struct get_combinations_helper, + Packs...> { + using type = + typename get_combinations_helper, CurrentLevelCombs, + Packs...>::type; +}; + +/** + * @brief Trait for getting all combinations of the values and types in the + * specified packs. + */ +template +struct get_combinations { + using type = + typename get_combinations_helper, combinations_list<>, + Packs...>::type; +}; /** * @brief Function helps to generate type_pack with sycl::vec of all supported diff --git a/tests/accessor/accessor_default_values.h b/tests/accessor/accessor_default_values.h index aaee79c31..34acbac83 100644 --- a/tests/accessor/accessor_default_values.h +++ b/tests/accessor/accessor_default_values.h @@ -193,21 +193,33 @@ class test_for_generic_acc_placeholder_val_verification { } }; +using test_combinations = + typename get_combinations::type; + /** * @brief Struct with functor that will be used in type coverage to call all * verification functions. * @tparam T Current data type + * @tparam ArgCombination A tuple containing the packs representing the current + * test configuration. The packs appear in the following order: + * access_mode, dimension, target * @param type_name Current data type string representation */ -template +template class run_tests { public: void operator()(const std::string& type_name) { + // Get the packs from the test combination type. + using AccessModePack = std::tuple_element_t<0, ArgCombination>; + using DimensionsPack = std::tuple_element_t<1, ArgCombination>; + using TargetsPack = std::tuple_element_t<2, ArgCombination>; + // Type packs instances have to be const, otherwise for_all_combination // will not compile - const auto access_modes = get_access_modes(); - const auto dimensions = get_all_dimensions(); - const auto targets = get_targets(); + const auto access_modes = AccessModePack::generate_named(); + const auto dimensions = DimensionsPack::generate_unnamed(); + const auto targets = TargetsPack::generate_named(); // Run test with non const data type // Run test for local_accessor diff --git a/tests/accessor/accessor_default_values_core.cpp b/tests/accessor/accessor_default_values_core.cpp index 6caed6d39..64482de84 100644 --- a/tests/accessor/accessor_default_values_core.cpp +++ b/tests/accessor/accessor_default_values_core.cpp @@ -25,8 +25,8 @@ using namespace accessor_tests_common; namespace accessor_default_values_test_core { using namespace sycl_cts; -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("Accessors constructor default values test core types.", - "[accessor]")({ common_run_tests(); }); +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("Accessors constructor default values test core types.", "[accessor]", + test_combinations)({ common_run_tests(); }); } // namespace accessor_default_values_test_core diff --git a/tests/accessor/accessor_default_values_fp16.cpp b/tests/accessor/accessor_default_values_fp16.cpp index 6dfb301d3..808289de2 100644 --- a/tests/accessor/accessor_default_values_fp16.cpp +++ b/tests/accessor/accessor_default_values_fp16.cpp @@ -24,8 +24,9 @@ using namespace accessor_tests_common; namespace accessor_exceptions_test_fp16 { using namespace sycl_cts; -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("Accessors constructor default values test fp16 types.", "[accessor]")({ +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("Accessors constructor default values test fp16 types.", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp16)) { WARN( @@ -35,9 +36,9 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("sycl::half"); + for_type_vectors_marray("sycl::half"); #else - run_tests{}("sycl::half"); + run_tests{}("sycl::half"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); diff --git a/tests/accessor/accessor_default_values_fp64.cpp b/tests/accessor/accessor_default_values_fp64.cpp index cfa206504..2f9da769c 100644 --- a/tests/accessor/accessor_default_values_fp64.cpp +++ b/tests/accessor/accessor_default_values_fp64.cpp @@ -24,8 +24,9 @@ using namespace accessor_tests_common; namespace accessor_default_values_test_fp64 { using namespace sycl_cts; -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("Accessors constructor default values test fp64 types.", "[accessor]")({ +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("Accessors constructor default values test fp64 types.", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp64)) { WARN( @@ -35,9 +36,9 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); + for_type_vectors_marray("double"); #else - run_tests{}("double"); + run_tests{}("double"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); diff --git a/tests/accessor/accessor_exceptions.h b/tests/accessor/accessor_exceptions.h index 1bec234fd..d0f93c438 100644 --- a/tests/accessor/accessor_exceptions.h +++ b/tests/accessor/accessor_exceptions.h @@ -349,6 +349,9 @@ class test_exception_for_generic_acc { } }; +using test_combinations = + typename get_combinations::type; + /** * @brief Struct that runs test with different input parameters types * @tparam AccT Current type of the accessor: generic_accessor, @@ -358,14 +361,18 @@ class test_exception_for_generic_acc { * @param access_mode_name Current access mode string representation * @param target_name Current target string representation */ -template +template class run_tests_with_types { public: void operator()(const std::string& type_name) { + // Get the packs from the test combination type. + using AccessModePack = std::tuple_element_t<0, ArgCombination>; + using DimensionsPack = std::tuple_element_t<1, ArgCombination>; + // Type packs instances have to be const, otherwise for_all_combination // will not compile - const auto access_modes = get_access_modes(); - const auto dimensions = get_dimensions(); + const auto access_modes = AccessModePack::generate_named(); + const auto dimensions = DimensionsPack::generate_unnamed(); // To handle cases when class was called from functions // like for_all_types_vectors_marray or for_all_device_copyable_std_containers. @@ -376,7 +383,7 @@ class run_tests_with_types { constexpr accessor_tests_common::accessor_type acc_type = AccT::value; if constexpr (acc_type == accessor_tests_common::accessor_type::generic_accessor) { - const auto targets = get_targets(); + const auto targets = targets_pack::generate_named(); for_all_combinations( access_modes, dimensions, targets, actual_type_name); } else if constexpr (acc_type == diff --git a/tests/accessor/accessor_exceptions_core.cpp b/tests/accessor/accessor_exceptions_core.cpp index 15b4665ff..67f843b0d 100644 --- a/tests/accessor/accessor_exceptions_core.cpp +++ b/tests/accessor/accessor_exceptions_core.cpp @@ -24,16 +24,22 @@ using namespace accessor_tests_common; namespace accessor_exceptions_test_core { using namespace sycl_cts; -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) ("Generic sycl::accessor constructor exceptions test. Core types.", - "[accessor]")({ common_run_tests(); }); - -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::local_accessor constructor exceptions test. Core types.", - "[accessor]")({ common_run_tests(); }); - -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::host_accessor constructor exceptions test. Core types.", - "[accessor]")({ common_run_tests(); }); + "[accessor]", test_combinations)({ + common_run_tests(); +}); + +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::local_accessor constructor exceptions test. Core types.", "[accessor]", + test_combinations)({ + common_run_tests(); +}); + +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::host_accessor constructor exceptions test. Core types.", "[accessor]", + test_combinations)({ + common_run_tests(); +}); } // namespace accessor_exceptions_test_core diff --git a/tests/accessor/accessor_exceptions_fp16.cpp b/tests/accessor/accessor_exceptions_fp16.cpp index d2098b41c..4938f6ebb 100644 --- a/tests/accessor/accessor_exceptions_fp16.cpp +++ b/tests/accessor/accessor_exceptions_fp16.cpp @@ -23,8 +23,9 @@ using namespace accessor_tests_common; namespace accessor_exceptions_test_fp16 { using namespace sycl_cts; -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("Generic sycl::accessor constructor exceptions. fp16 type", "[accessor]")({ +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("Generic sycl::accessor constructor exceptions. fp16 type", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp16)) { WARN( @@ -34,15 +35,16 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( - "sycl::half"); + for_type_vectors_marray("sycl::half"); #else - run_tests_with_types{}("sycl::half"); + run_tests_with_types{}("sycl::half"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::local_accessor constructor exceptions. fp16 type", "[accessor]")({ +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::local_accessor constructor exceptions. fp16 type", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp16)) { WARN( @@ -52,15 +54,16 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( - "sycl::half"); + for_type_vectors_marray("sycl::half"); #else - run_tests_with_types{}("sycl::half"); + run_tests_with_types{}("sycl::half"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::host_accessor constructor exceptions. fp16 type", "[accessor]")({ +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::host_accessor constructor exceptions. fp16 type", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp16)) { WARN( @@ -70,10 +73,10 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( - "sycl::half"); + for_type_vectors_marray("sycl::half"); #else - run_tests_with_types{}("sycl::half"); + run_tests_with_types{}("sycl::half"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); diff --git a/tests/accessor/accessor_exceptions_fp64.cpp b/tests/accessor/accessor_exceptions_fp64.cpp index e2181fafc..0fb0013c7 100644 --- a/tests/accessor/accessor_exceptions_fp64.cpp +++ b/tests/accessor/accessor_exceptions_fp64.cpp @@ -23,8 +23,9 @@ using namespace accessor_tests_common; namespace accessor_exceptions_test_fp64 { using namespace sycl_cts; -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("Generic sycl::accessor constructor exceptions. fp64 type", "[accessor]")({ +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("Generic sycl::accessor constructor exceptions. fp64 type", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp64)) { WARN( @@ -34,15 +35,16 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( - "double"); + for_type_vectors_marray("double"); #else - run_tests_with_types{}("double"); + run_tests_with_types{}("double"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::local_accessor constructor exceptions. fp64 type", "[accessor]")({ +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::local_accessor constructor exceptions. fp64 type", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp64)) { WARN( @@ -52,15 +54,16 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( - "double"); + for_type_vectors_marray("double"); #else - run_tests_with_types{}("double"); + run_tests_with_types{}("double"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::host_accessor constructor exceptions. fp64 type", "[accessor]")({ +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::host_accessor constructor exceptions. fp64 type", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp64)) { WARN( @@ -70,10 +73,10 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( - "double"); + for_type_vectors_marray("double"); #else - run_tests_with_types{}("double"); + run_tests_with_types{}("double"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); diff --git a/tests/accessor/accessor_implicit_conversions.h b/tests/accessor/accessor_implicit_conversions.h index 96d4fce9c..b49671fa4 100644 --- a/tests/accessor/accessor_implicit_conversions.h +++ b/tests/accessor/accessor_implicit_conversions.h @@ -327,17 +327,27 @@ class check_conversion_host { } }; +using generic_test_combinations = + typename get_combinations::type; + +using host_local_test_combinations = + typename get_combinations::type; + /** * @brief Run tests for generic sycl::accessor * @detail A wrapper around for_all_combinations call to make possible extended * type coverage - e.g. vectors and marrays */ -template +template struct run_test_generic { void operator()(const std::string& type_name) { + // Get the packs from the test combination type. + using DimensionsPack = std::tuple_element_t<0, ArgCombination>; + using TargetsPack = std::tuple_element_t<1, ArgCombination>; + // TODO: make for_all_combinations recognize non-const type packs - const auto dimensions = get_all_dimensions(); - const auto targets = get_targets(); + const auto dimensions = DimensionsPack::generate_unnamed(); + const auto targets = TargetsPack::generate_named(); for_all_combinations(dimensions, targets, type_name); @@ -347,10 +357,11 @@ struct run_test_generic { /** * @brief Run tests for sycl::local_accessor */ -template +template struct run_test_local { void operator()(const std::string& type_name) { - const auto dimensions = get_all_dimensions(); + using DimensionsPack = std::tuple_element_t<0, ArgCombination>; + const auto dimensions = DimensionsPack::generate_unnamed(); for_all_combinations(dimensions, type_name); } @@ -359,10 +370,11 @@ struct run_test_local { /** * @brief Run tests for sycl::host_accessor */ -template +template struct run_test_host { void operator()(const std::string& type_name) { - const auto dimensions = get_all_dimensions(); + using DimensionsPack = std::tuple_element_t<0, ArgCombination>; + const auto dimensions = DimensionsPack::generate_unnamed(); for_all_combinations(dimensions, type_name); } diff --git a/tests/accessor/accessor_implicit_conversions_core.cpp b/tests/accessor/accessor_implicit_conversions_core.cpp index 940379878..d5508ee0a 100644 --- a/tests/accessor/accessor_implicit_conversions_core.cpp +++ b/tests/accessor/accessor_implicit_conversions_core.cpp @@ -25,22 +25,22 @@ using namespace accessor_implicit_conversions; namespace accessor_implicit_conversions_core { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) ("Generic sycl::accessor implicit conversion. core types", - "[accessor][generic_accessor][conversion][core]")({ - common_run_tests(); + "[accessor][generic_accessor][conversion][core]", generic_test_combinations)({ + common_run_tests(); }); -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) ("The sycl::local_accessor implicit conversion. core types", - "[accessor][local_accessor][conversion][core]")({ - common_run_tests(); + "[accessor][local_accessor][conversion][core]", host_local_test_combinations)({ + common_run_tests(); }); -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) ("The sycl::host_accessor implicit conversion. core types", - "[accessor][host_accessor][conversion][core]")({ - common_run_tests(); + "[accessor][host_accessor][conversion][core]", host_local_test_combinations)({ + common_run_tests(); }); } // namespace accessor_implicit_conversions_core diff --git a/tests/accessor/accessor_implicit_conversions_fp16.cpp b/tests/accessor/accessor_implicit_conversions_fp16.cpp index 12e1cc564..15618486c 100644 --- a/tests/accessor/accessor_implicit_conversions_fp16.cpp +++ b/tests/accessor/accessor_implicit_conversions_fp16.cpp @@ -25,9 +25,9 @@ using namespace accessor_implicit_conversions; namespace accessor_implicit_conversions_fp16 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) ("Generic sycl::accessor implicit conversion. fp16 type", - "[accessor][generic_accessor][conversion][fp16]")({ + "[accessor][generic_accessor][conversion][fp16]", generic_test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp16)) { @@ -56,15 +56,15 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) // for_all_combinations( // types, targets, dimensions); // - for_type_vectors_marray("sycl::half"); + for_type_vectors_marray("sycl::half"); #else - run_test_generic{}("sycl::half"); + run_test_generic{}("sycl::half"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) ("The sycl::local_accessor implicit conversion. fp16 type", - "[accessor][local_accessor][conversion][fp16]")({ + "[accessor][local_accessor][conversion][fp16]", host_local_test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp16)) { @@ -73,15 +73,15 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("sycl::half"); + for_type_vectors_marray("sycl::half"); #else - run_test_local{}("sycl::half"); + run_test_local{}("sycl::half"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) ("The sycl::host_accessor implicit conversion. fp16 type", - "[accessor][host_accessor][conversion][fp16]")({ + "[accessor][host_accessor][conversion][fp16]", host_local_test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp16)) { @@ -90,9 +90,9 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("sycl::half"); + for_type_vectors_marray("sycl::half"); #else - run_test_host{}("sycl::half"); + run_test_host{}("sycl::half"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); diff --git a/tests/accessor/accessor_implicit_conversions_fp64.cpp b/tests/accessor/accessor_implicit_conversions_fp64.cpp index 3adc7dc28..7c27117b4 100644 --- a/tests/accessor/accessor_implicit_conversions_fp64.cpp +++ b/tests/accessor/accessor_implicit_conversions_fp64.cpp @@ -25,9 +25,9 @@ using namespace accessor_implicit_conversions; namespace accessor_implicit_conversions_fp64 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) ("Generic sycl::accessor implicit conversion. fp64 type", - "[accessor][generic_accessor][conversion][fp64]")({ + "[accessor][generic_accessor][conversion][fp64]", generic_test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp64)) { @@ -36,15 +36,15 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); + for_type_vectors_marray("double"); #else - run_test_generic{}("double"); + run_test_generic{}("double"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) ("The sycl::local_accessor implicit conversion. fp64 type", - "[accessor][local_accessor][conversion][fp64]")({ + "[accessor][local_accessor][conversion][fp64]", host_local_test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp64)) { @@ -53,15 +53,15 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); + for_type_vectors_marray("double"); #else - run_test_local{}("double"); + run_test_local{}("double"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) ("The sycl::host_accessor implicit conversion. fp64 type", - "[accessor][host_accessor][conversion][fp64]")({ + "[accessor][host_accessor][conversion][fp64]", host_local_test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp64)) { @@ -70,9 +70,9 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); + for_type_vectors_marray("double"); #else - run_test_host{}("double"); + run_test_host{}("double"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); diff --git a/tests/accessor/generic_accessor_api_common.h b/tests/accessor/generic_accessor_api_common.h index 6b065f6d6..2c4c7f807 100644 --- a/tests/accessor/generic_accessor_api_common.h +++ b/tests/accessor/generic_accessor_api_common.h @@ -438,13 +438,24 @@ class run_api_tests { } }; -template +using test_combinations = + typename get_combinations::type; + +template class run_generic_api_for_type { public: void operator()(const std::string &type_name) { - const auto access_modes = get_access_modes(); - const auto dimensions = get_all_dimensions(); - const auto targets = get_targets(); + // Get the packs from the test combination type. + using AccessModePack = std::tuple_element_t<0, ArgCombination>; + using DimensionsPack = std::tuple_element_t<1, ArgCombination>; + using TargetsPack = std::tuple_element_t<2, ArgCombination>; + + // Type packs instances have to be const, otherwise for_all_combination + // will not compile + const auto access_modes = AccessModePack::generate_named(); + const auto dimensions = DimensionsPack::generate_unnamed(); + const auto targets = TargetsPack::generate_named(); // To handle cases when class was called from functions // like for_all_types_vectors_marray or for_all_device_copyable_std_containers. diff --git a/tests/accessor/generic_accessor_api_core.cpp b/tests/accessor/generic_accessor_api_core.cpp index 2aaa5483e..be6a230a8 100644 --- a/tests/accessor/generic_accessor_api_core.cpp +++ b/tests/accessor/generic_accessor_api_core.cpp @@ -13,14 +13,16 @@ #include "accessor_common.h" #include "generic_accessor_api_common.h" + +using namespace generic_accessor_api_common; #endif namespace generic_accessor_api_core { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("Generic sycl::accessor api. core types", "[accessor]")({ +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("Generic sycl::accessor api. core types", "[accessor]", test_combinations)({ using namespace generic_accessor_api_common; - common_run_tests(); + common_run_tests(); }); } // namespace generic_accessor_api_core diff --git a/tests/accessor/generic_accessor_api_fp16.cpp b/tests/accessor/generic_accessor_api_fp16.cpp index 522f2d52c..43b90d249 100644 --- a/tests/accessor/generic_accessor_api_fp16.cpp +++ b/tests/accessor/generic_accessor_api_fp16.cpp @@ -13,12 +13,14 @@ #include "accessor_common.h" #include "generic_accessor_api_common.h" + +using namespace generic_accessor_api_common; #endif namespace generic_accessor_api_fp16 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("Generic sycl::accessor api. fp16 type", "[accessor]")({ +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("Generic sycl::accessor api. fp16 type", "[accessor]", test_combinations)({ using namespace generic_accessor_api_common; auto queue = sycl_cts::util::get_cts_object::queue(); @@ -30,9 +32,10 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("sycl::half"); + for_type_vectors_marray( + "sycl::half"); #else - run_generic_api_for_type{}("sycl::half"); + run_generic_api_for_type{}("sycl::half"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); } // namespace generic_accessor_api_fp16 diff --git a/tests/accessor/generic_accessor_api_fp64.cpp b/tests/accessor/generic_accessor_api_fp64.cpp index f1ccd2a7e..3a8027236 100644 --- a/tests/accessor/generic_accessor_api_fp64.cpp +++ b/tests/accessor/generic_accessor_api_fp64.cpp @@ -12,12 +12,14 @@ #if !SYCL_CTS_COMPILING_WITH_HIPSYCL && !SYCL_CTS_COMPILING_WITH_COMPUTECPP #include "accessor_common.h" #include "generic_accessor_api_common.h" + +using namespace generic_accessor_api_common; #endif namespace generic_accessor_api_fp64 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("Generic sycl::accessor api. fp64 type", "[accessor]")({ +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("Generic sycl::accessor api. fp64 type", "[accessor]", test_combinations)({ using namespace generic_accessor_api_common; auto queue = sycl_cts::util::get_cts_object::queue(); @@ -29,9 +31,9 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); + for_type_vectors_marray("double"); #else - run_generic_api_for_type{}("double"); + run_generic_api_for_type{}("double"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); } // namespace generic_accessor_api_fp64 diff --git a/tests/accessor/generic_accessor_common_buffer_constructors.h b/tests/accessor/generic_accessor_common_buffer_constructors.h index 8ecb4a93c..ba839c924 100644 --- a/tests/accessor/generic_accessor_common_buffer_constructors.h +++ b/tests/accessor/generic_accessor_common_buffer_constructors.h @@ -144,15 +144,24 @@ class run_tests_common_buffer_constructors { } }; -template +using test_combinations = + typename get_combinations::type; + +template class run_generic_common_buffer_constructors_test { public: void operator()(const std::string& type_name) { - // Type packs instances have to be const, otherwise for_all_combination will - // not compile - const auto access_modes = get_access_modes(); - const auto dimensions = get_all_dimensions(); - const auto targets = get_targets(); + // Get the packs from the test combination type. + using AccessModePack = std::tuple_element_t<0, ArgCombination>; + using DimensionsPack = std::tuple_element_t<1, ArgCombination>; + using TargetsPack = std::tuple_element_t<2, ArgCombination>; + + // Type packs instances have to be const, otherwise for_all_combination + // will not compile + const auto access_modes = AccessModePack::generate_named(); + const auto dimensions = DimensionsPack::generate_unnamed(); + const auto targets = TargetsPack::generate_named(); // To handle cases when class was called from functions // like for_all_types_vectors_marray or diff --git a/tests/accessor/generic_accessor_common_buffer_constructors_core.cpp b/tests/accessor/generic_accessor_common_buffer_constructors_core.cpp index 84b411577..a5d01e6c8 100644 --- a/tests/accessor/generic_accessor_common_buffer_constructors_core.cpp +++ b/tests/accessor/generic_accessor_common_buffer_constructors_core.cpp @@ -27,16 +27,18 @@ #if !SYCL_CTS_COMPILING_WITH_HIPSYCL && !SYCL_CTS_COMPILING_WITH_COMPUTECPP #include "accessor_common.h" #include "generic_accessor_common_buffer_constructors.h" + +using namespace generic_accessor_common_buffer_constructors; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_common_buffer_constructors_core { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("Generic sycl::accessor buffer constructors. core types", "[accessor]")({ - using namespace generic_accessor_common_buffer_constructors; - common_run_tests(); +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("Generic sycl::accessor buffer constructors. core types", "[accessor]", + test_combinations)({ + common_run_tests(); }); } // namespace generic_accessor_common_buffer_constructors_core diff --git a/tests/accessor/generic_accessor_common_buffer_constructors_fp16.cpp b/tests/accessor/generic_accessor_common_buffer_constructors_fp16.cpp index 28c514068..b484f1045 100644 --- a/tests/accessor/generic_accessor_common_buffer_constructors_fp16.cpp +++ b/tests/accessor/generic_accessor_common_buffer_constructors_fp16.cpp @@ -27,23 +27,25 @@ #if !SYCL_CTS_COMPILING_WITH_HIPSYCL && !SYCL_CTS_COMPILING_WITH_COMPUTECPP #include "accessor_common.h" #include "generic_accessor_common_buffer_constructors.h" + +using namespace generic_accessor_common_buffer_constructors; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_common_buffer_constructors_fp16 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("Generic sycl::accessor buffer constructors. fp16 type", "[accessor]")({ - using namespace generic_accessor_common_buffer_constructors; - +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("Generic sycl::accessor buffer constructors. fp16 type", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (queue.get_device().has(sycl::aspect::fp16)) { #if SYCL_CTS_ENABLE_FULL_CONFORMANCE for_type_vectors_marray("sycl::half"); + sycl::half, TestType>("sycl::half"); #else - run_generic_common_buffer_constructors_test{}("sycl::half"); + run_generic_common_buffer_constructors_test{}( + "sycl::half"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE } else { WARN("Device does not support half precision floating point operations"); diff --git a/tests/accessor/generic_accessor_common_buffer_constructors_fp64.cpp b/tests/accessor/generic_accessor_common_buffer_constructors_fp64.cpp index 335ce0502..8230eab47 100644 --- a/tests/accessor/generic_accessor_common_buffer_constructors_fp64.cpp +++ b/tests/accessor/generic_accessor_common_buffer_constructors_fp64.cpp @@ -27,23 +27,24 @@ #if !SYCL_CTS_COMPILING_WITH_HIPSYCL && !SYCL_CTS_COMPILING_WITH_COMPUTECPP #include "accessor_common.h" #include "generic_accessor_common_buffer_constructors.h" + +using namespace generic_accessor_common_buffer_constructors; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_common_buffer_constructors_fp64 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("Generic sycl::accessor buffer constructors. fp64 type", "[accessor]")({ - using namespace generic_accessor_common_buffer_constructors; - +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("Generic sycl::accessor buffer constructors. fp64 type", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (queue.get_device().has(sycl::aspect::fp64)) { #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); + for_type_vectors_marray("double"); #else - run_generic_common_buffer_constructors_test{}("double"); + run_generic_common_buffer_constructors_test{}("double"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE } else { WARN("Device does not support double precision floating point operations"); diff --git a/tests/accessor/generic_accessor_common_buffer_tag_constructors.h b/tests/accessor/generic_accessor_common_buffer_tag_constructors.h index 436e254b4..3b638a808 100644 --- a/tests/accessor/generic_accessor_common_buffer_tag_constructors.h +++ b/tests/accessor/generic_accessor_common_buffer_tag_constructors.h @@ -141,15 +141,24 @@ class run_tests_common_buffer_tag_constructors { } }; -template +using test_combinations = + typename get_combinations::type; + +template class run_generic_common_buffer_tag_constructors_test { public: void operator()(const std::string& type_name) { - // Type packs instances have to be const, otherwise for_all_combination will - // not compile - const auto access_modes = get_access_modes(); - const auto dimensions = get_dimensions(); - const auto targets = get_targets(); + // Get the packs from the test combination type. + using AccessModePack = std::tuple_element_t<0, ArgCombination>; + using DimensionsPack = std::tuple_element_t<1, ArgCombination>; + using TargetsPack = std::tuple_element_t<2, ArgCombination>; + + // Type packs instances have to be const, otherwise for_all_combination + // will not compile + const auto access_modes = AccessModePack::generate_named(); + const auto dimensions = DimensionsPack::generate_unnamed(); + const auto targets = TargetsPack::generate_named(); // To handle cases when class was called from functions // like for_all_types_vectors_marray or diff --git a/tests/accessor/generic_accessor_common_buffer_tag_constructors_core.cpp b/tests/accessor/generic_accessor_common_buffer_tag_constructors_core.cpp index 259cea142..14f16307b 100644 --- a/tests/accessor/generic_accessor_common_buffer_tag_constructors_core.cpp +++ b/tests/accessor/generic_accessor_common_buffer_tag_constructors_core.cpp @@ -27,16 +27,18 @@ #if !SYCL_CTS_COMPILING_WITH_HIPSYCL && !SYCL_CTS_COMPILING_WITH_COMPUTECPP #include "accessor_common.h" #include "generic_accessor_common_buffer_tag_constructors.h" + +using namespace generic_accessor_common_buffer_tag_constructors; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_common_buffer_tag_constructors_core { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("Generic sycl::accessor buffer tag constructors. core types", "[accessor]")({ - using namespace generic_accessor_common_buffer_tag_constructors; - common_run_tests(); +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("Generic sycl::accessor buffer tag constructors. core types", "[accessor]", + test_combinations)({ + common_run_tests(); }); } // namespace generic_accessor_common_buffer_tag_constructors_core diff --git a/tests/accessor/generic_accessor_common_buffer_tag_constructors_fp16.cpp b/tests/accessor/generic_accessor_common_buffer_tag_constructors_fp16.cpp index 38ba9af80..be989abcf 100644 --- a/tests/accessor/generic_accessor_common_buffer_tag_constructors_fp16.cpp +++ b/tests/accessor/generic_accessor_common_buffer_tag_constructors_fp16.cpp @@ -27,23 +27,25 @@ #if !SYCL_CTS_COMPILING_WITH_HIPSYCL && !SYCL_CTS_COMPILING_WITH_COMPUTECPP #include "accessor_common.h" #include "generic_accessor_common_buffer_tag_constructors.h" + +using namespace generic_accessor_common_buffer_tag_constructors; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_common_buffer_tag_constructors_fp16 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("Generic sycl::accessor buffer tag constructors. fp16 type", "[accessor]")({ - using namespace generic_accessor_common_buffer_tag_constructors; - +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("Generic sycl::accessor buffer tag constructors. fp16 type", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (queue.get_device().has(sycl::aspect::fp16)) { #if SYCL_CTS_ENABLE_FULL_CONFORMANCE for_type_vectors_marray("sycl::half"); + sycl::half, TestType>("sycl::half"); #else - run_generic_common_buffer_tag_constructors_test{}("sycl::half"); + run_generic_common_buffer_tag_constructors_test{}( + "sycl::half"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE } else { WARN("Device does not support half precision floating point operations"); diff --git a/tests/accessor/generic_accessor_common_buffer_tag_constructors_fp64.cpp b/tests/accessor/generic_accessor_common_buffer_tag_constructors_fp64.cpp index 37b82f699..abbe9c721 100644 --- a/tests/accessor/generic_accessor_common_buffer_tag_constructors_fp64.cpp +++ b/tests/accessor/generic_accessor_common_buffer_tag_constructors_fp64.cpp @@ -27,23 +27,25 @@ #if !SYCL_CTS_COMPILING_WITH_HIPSYCL && !SYCL_CTS_COMPILING_WITH_COMPUTECPP #include "accessor_common.h" #include "generic_accessor_common_buffer_tag_constructors.h" + +using namespace generic_accessor_common_buffer_tag_constructors; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_common_buffer_tag_constructors_fp64 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("Generic sycl::accessor buffer tag constructors. fp64 type", "[accessor]")({ - using namespace generic_accessor_common_buffer_tag_constructors; - +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("Generic sycl::accessor buffer tag constructors. fp64 type", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (queue.get_device().has(sycl::aspect::fp64)) { #if SYCL_CTS_ENABLE_FULL_CONFORMANCE for_type_vectors_marray("double"); + double, TestType>("double"); #else - run_generic_common_buffer_tag_constructors_test{}("double"); + run_generic_common_buffer_tag_constructors_test{}( + "double"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE } else { WARN("Device does not support double precision floating point operations"); diff --git a/tests/accessor/generic_accessor_def_constructor.h b/tests/accessor/generic_accessor_def_constructor.h index ddae84642..b6e2cea4a 100644 --- a/tests/accessor/generic_accessor_def_constructor.h +++ b/tests/accessor/generic_accessor_def_constructor.h @@ -63,15 +63,24 @@ class run_tests_def_constructor { } }; -template +using test_combinations = + typename get_combinations::type; + +template class run_generic_def_constructor_test { public: void operator()(const std::string& type_name) { - // Type packs instances have to be const, otherwise for_all_combination will - // not compile - const auto access_modes = get_access_modes(); - const auto dimensions = get_all_dimensions(); - const auto targets = get_targets(); + // Get the packs from the test combination type. + using AccessModePack = std::tuple_element_t<0, ArgCombination>; + using DimensionsPack = std::tuple_element_t<1, ArgCombination>; + using TargetsPack = std::tuple_element_t<2, ArgCombination>; + + // Type packs instances have to be const, otherwise for_all_combination + // will not compile + const auto access_modes = AccessModePack::generate_named(); + const auto dimensions = DimensionsPack::generate_unnamed(); + const auto targets = TargetsPack::generate_named(); // To handle cases when class was called from functions // like for_all_types_vectors_marray or diff --git a/tests/accessor/generic_accessor_def_constructor_core.cpp b/tests/accessor/generic_accessor_def_constructor_core.cpp index 1ef648016..dcb9980a7 100644 --- a/tests/accessor/generic_accessor_def_constructor_core.cpp +++ b/tests/accessor/generic_accessor_def_constructor_core.cpp @@ -26,16 +26,18 @@ #if !SYCL_CTS_COMPILING_WITH_HIPSYCL && !SYCL_CTS_COMPILING_WITH_COMPUTECPP #include "accessor_common.h" #include "generic_accessor_def_constructor.h" + +using namespace generic_accessor_def_constructor; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_def_constructor_core { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("Generic sycl::accessor def constructors. core types", "[accessor]")({ - using namespace generic_accessor_def_constructor; - common_run_tests(); +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("Generic sycl::accessor def constructors. core types", "[accessor]", + test_combinations)({ + common_run_tests(); }); } // namespace generic_accessor_def_constructor_core diff --git a/tests/accessor/generic_accessor_def_constructor_fp16.cpp b/tests/accessor/generic_accessor_def_constructor_fp16.cpp index 9ee00eb3f..f99bdab69 100644 --- a/tests/accessor/generic_accessor_def_constructor_fp16.cpp +++ b/tests/accessor/generic_accessor_def_constructor_fp16.cpp @@ -27,23 +27,24 @@ #include "accessor_common.h" #include "generic_accessor_def_constructor.h" + +using namespace generic_accessor_def_constructor; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_def_constructor_fp16 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("Generic sycl::accessor def constructors. fp16 type", "[accessor]")({ - using namespace generic_accessor_def_constructor; - +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("Generic sycl::accessor def constructors. fp16 type", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (queue.get_device().has(sycl::aspect::fp16)) { #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( - "sycl::half"); + for_type_vectors_marray("sycl::half"); #else - run_generic_def_constructor_test{}("sycl::half"); + run_generic_def_constructor_test{}("sycl::half"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE } else { WARN("Device does not support half precision floating point operations"); diff --git a/tests/accessor/generic_accessor_def_constructor_fp64.cpp b/tests/accessor/generic_accessor_def_constructor_fp64.cpp index acd777573..92407d7c9 100644 --- a/tests/accessor/generic_accessor_def_constructor_fp64.cpp +++ b/tests/accessor/generic_accessor_def_constructor_fp64.cpp @@ -27,22 +27,24 @@ #include "accessor_common.h" #include "generic_accessor_def_constructor.h" + +using namespace generic_accessor_def_constructor; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_def_constructor_fp64 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("Generic sycl::accessor def constructors. fp64 type", "[accessor]")({ - using namespace generic_accessor_def_constructor; - +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("Generic sycl::accessor def constructors. fp64 type", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (queue.get_device().has(sycl::aspect::fp64)) { #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); + for_type_vectors_marray( + "double"); #else - run_generic_def_constructor_test{}("double"); + run_generic_def_constructor_test{}("double"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE } else { WARN("Device does not support double precision floating point operations"); diff --git a/tests/accessor/generic_accessor_linearization.h b/tests/accessor/generic_accessor_linearization.h index aaab84b87..7cbf632aa 100644 --- a/tests/accessor/generic_accessor_linearization.h +++ b/tests/accessor/generic_accessor_linearization.h @@ -50,13 +50,25 @@ class run_linearization_tests { } }; -template +using test_combinations = + typename get_combinations, + targets_pack>::type; + +template class run_generic_linearization_for_type { public: void operator()(const std::string &type_name) { - const auto access_modes = get_access_modes(); - const auto dimensions = integer_pack<2, 3>::generate_unnamed(); - const auto targets = get_targets(); + // Get the packs from the test combination type. + using AccessModePack = std::tuple_element_t<0, ArgCombination>; + using DimensionsPack = std::tuple_element_t<1, ArgCombination>; + using TargetsPack = std::tuple_element_t<2, ArgCombination>; + + // Type packs instances have to be const, otherwise for_all_combination + // will not compile + const auto access_modes = AccessModePack::generate_named(); + const auto dimensions = DimensionsPack::generate_unnamed(); + const auto targets = TargetsPack::generate_named(); + auto actual_type_name = type_name_string::get(type_name); for_all_combinations(access_modes, dimensions, diff --git a/tests/accessor/generic_accessor_linearization_core.cpp b/tests/accessor/generic_accessor_linearization_core.cpp index 1e49304d5..610fe0d6b 100644 --- a/tests/accessor/generic_accessor_linearization_core.cpp +++ b/tests/accessor/generic_accessor_linearization_core.cpp @@ -27,6 +27,8 @@ #include "accessor_common.h" #include "generic_accessor_linearization.h" + +using namespace generic_accessor_linearization; #endif #include "../common/disabled_for_test_case.h" @@ -34,10 +36,10 @@ namespace generic_accessor_linearization_core { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("Generic sycl::accessor linearization test. core types", "[accessor]")({ - using namespace generic_accessor_linearization; - common_run_tests(); +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("Generic sycl::accessor linearization test. core types", "[accessor]", + test_combinations)({ + common_run_tests(); }); } // namespace generic_accessor_linearization_core diff --git a/tests/accessor/generic_accessor_linearization_fp16.cpp b/tests/accessor/generic_accessor_linearization_fp16.cpp index f51253b52..dd879c506 100644 --- a/tests/accessor/generic_accessor_linearization_fp16.cpp +++ b/tests/accessor/generic_accessor_linearization_fp16.cpp @@ -27,6 +27,8 @@ #include "accessor_common.h" #include "generic_accessor_linearization.h" + +using namespace generic_accessor_linearization; #endif #include "../common/disabled_for_test_case.h" @@ -34,9 +36,9 @@ namespace generic_accessor_linearization_fp16 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("Generic sycl::accessor linearization test. fp16 type", "[accessor]")({ - using namespace generic_accessor_linearization; +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("Generic sycl::accessor linearization test. fp16 type", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp16)) { WARN( @@ -46,10 +48,10 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( - "sycl::half"); + for_type_vectors_marray("sycl::half"); #else - run_generic_linearization_for_type{}("sycl::half"); + run_generic_linearization_for_type{}("sycl::half"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); diff --git a/tests/accessor/generic_accessor_linearization_fp64.cpp b/tests/accessor/generic_accessor_linearization_fp64.cpp index cbab17a32..8b777e256 100644 --- a/tests/accessor/generic_accessor_linearization_fp64.cpp +++ b/tests/accessor/generic_accessor_linearization_fp64.cpp @@ -27,6 +27,8 @@ #include "accessor_common.h" #include "generic_accessor_linearization.h" + +using namespace generic_accessor_linearization; #endif #include "../common/disabled_for_test_case.h" @@ -34,9 +36,9 @@ namespace generic_accessor_linearization_fp64 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("Generic sycl::accessor linearization test. fp64 type", "[accessor]")({ - using namespace generic_accessor_linearization; +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("Generic sycl::accessor linearization test. fp64 type", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp64)) { WARN( @@ -46,9 +48,10 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); + for_type_vectors_marray( + "double"); #else - run_generic_linearization_for_type{}("double"); + run_generic_linearization_for_type{}("double"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); diff --git a/tests/accessor/generic_accessor_placeholder_buffer_constructor.h b/tests/accessor/generic_accessor_placeholder_buffer_constructor.h index b5094edf2..e76e3d0bf 100644 --- a/tests/accessor/generic_accessor_placeholder_buffer_constructor.h +++ b/tests/accessor/generic_accessor_placeholder_buffer_constructor.h @@ -68,15 +68,24 @@ class run_tests_placeholder_buffer_constructor { } }; -template +using test_combinations = + typename get_combinations::type; + +template class run_generic_placeholder_buffer_constructor_test { public: void operator()(const std::string& type_name) { - // Type packs instances have to be const, otherwise for_all_combination will - // not compile - const auto access_modes = get_access_modes(); - const auto dimensions = get_all_dimensions(); - const auto targets = get_targets(); + // Get the packs from the test combination type. + using AccessModePack = std::tuple_element_t<0, ArgCombination>; + using DimensionsPack = std::tuple_element_t<1, ArgCombination>; + using TargetsPack = std::tuple_element_t<2, ArgCombination>; + + // Type packs instances have to be const, otherwise for_all_combination + // will not compile + const auto access_modes = AccessModePack::generate_named(); + const auto dimensions = DimensionsPack::generate_unnamed(); + const auto targets = TargetsPack::generate_named(); // To handle cases when class was called from functions // like for_all_types_vectors_marray or diff --git a/tests/accessor/generic_accessor_placeholder_buffer_constructor_core.cpp b/tests/accessor/generic_accessor_placeholder_buffer_constructor_core.cpp index 1828b5d34..472dace52 100644 --- a/tests/accessor/generic_accessor_placeholder_buffer_constructor_core.cpp +++ b/tests/accessor/generic_accessor_placeholder_buffer_constructor_core.cpp @@ -28,16 +28,18 @@ #include "accessor_common.h" #include "generic_accessor_placeholder_buffer_constructor.h" + +using namespace generic_accessor_placeholder_buffer_constructor; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_placeholder_buffer_constructor_core { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("Generic sycl::accessor placeholder constructors. core types", "[accessor]")({ - using namespace generic_accessor_placeholder_buffer_constructor; - common_run_tests(); +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("Generic sycl::accessor placeholder constructors. core types", "[accessor]", + test_combinations)({ + common_run_tests(); }); } // namespace generic_accessor_placeholder_buffer_constructor_core diff --git a/tests/accessor/generic_accessor_placeholder_buffer_constructor_fp16.cpp b/tests/accessor/generic_accessor_placeholder_buffer_constructor_fp16.cpp index f63b032b1..d6f8c32f4 100644 --- a/tests/accessor/generic_accessor_placeholder_buffer_constructor_fp16.cpp +++ b/tests/accessor/generic_accessor_placeholder_buffer_constructor_fp16.cpp @@ -28,24 +28,25 @@ #include "accessor_common.h" #include "generic_accessor_placeholder_buffer_constructor.h" + +using namespace generic_accessor_placeholder_buffer_constructor; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_placeholder_buffer_constructor_fp16 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) ("Generic sycl::accessor placeholder buffer constructor. fp16 type", - "[accessor]")({ - using namespace generic_accessor_placeholder_buffer_constructor; - + "[accessor]", test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (queue.get_device().has(sycl::aspect::fp16)) { #if SYCL_CTS_ENABLE_FULL_CONFORMANCE for_type_vectors_marray("sycl::half"); + sycl::half, TestType>("sycl::half"); #else - run_generic_placeholder_buffer_constructor_test{}("sycl::half"); + run_generic_placeholder_buffer_constructor_test{}( + "sycl::half"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE } else { WARN("Device does not support half precision floating point operations"); diff --git a/tests/accessor/generic_accessor_placeholder_buffer_constructor_fp64.cpp b/tests/accessor/generic_accessor_placeholder_buffer_constructor_fp64.cpp index 0021aff65..7ef74748f 100644 --- a/tests/accessor/generic_accessor_placeholder_buffer_constructor_fp64.cpp +++ b/tests/accessor/generic_accessor_placeholder_buffer_constructor_fp64.cpp @@ -28,24 +28,25 @@ #include "accessor_common.h" #include "generic_accessor_placeholder_buffer_constructor.h" + +using namespace generic_accessor_placeholder_buffer_constructor; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_placeholder_buffer_constructor_fp64 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) ("Generic sycl::accessor placeholder buffer constructor. fp64 type", - "[accessor]")({ - using namespace generic_accessor_placeholder_buffer_constructor; - + "[accessor]", test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (queue.get_device().has(sycl::aspect::fp64)) { #if SYCL_CTS_ENABLE_FULL_CONFORMANCE for_type_vectors_marray("double"); + double, TestType>("double"); #else - run_generic_placeholder_buffer_constructor_test{}("double"); + run_generic_placeholder_buffer_constructor_test{}( + "double"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE } else { WARN("Device does not support double precision floating point operations"); diff --git a/tests/accessor/generic_accessor_placeholder_buffer_range_constructor.h b/tests/accessor/generic_accessor_placeholder_buffer_range_constructor.h index 8a277af4e..51b1b445a 100644 --- a/tests/accessor/generic_accessor_placeholder_buffer_range_constructor.h +++ b/tests/accessor/generic_accessor_placeholder_buffer_range_constructor.h @@ -70,15 +70,24 @@ class run_tests_placeholder_buffer_range_constructor { } }; -template +using test_combinations = + typename get_combinations::type; + +template class run_generic_placeholder_buffer_range_constructor_test { public: void operator()(const std::string& type_name) { - // Type packs instances have to be const, otherwise for_all_combination will - // not compile - const auto access_modes = get_access_modes(); - const auto dimensions = get_dimensions(); - const auto targets = get_targets(); + // Get the packs from the test combination type. + using AccessModePack = std::tuple_element_t<0, ArgCombination>; + using DimensionsPack = std::tuple_element_t<1, ArgCombination>; + using TargetsPack = std::tuple_element_t<2, ArgCombination>; + + // Type packs instances have to be const, otherwise for_all_combination + // will not compile + const auto access_modes = AccessModePack::generate_named(); + const auto dimensions = DimensionsPack::generate_unnamed(); + const auto targets = TargetsPack::generate_named(); // To handle cases when class was called from functions // like for_all_types_vectors_marray or diff --git a/tests/accessor/generic_accessor_placeholder_buffer_range_constructor_core.cpp b/tests/accessor/generic_accessor_placeholder_buffer_range_constructor_core.cpp index 2adea5d25..25324d0eb 100644 --- a/tests/accessor/generic_accessor_placeholder_buffer_range_constructor_core.cpp +++ b/tests/accessor/generic_accessor_placeholder_buffer_range_constructor_core.cpp @@ -28,17 +28,19 @@ #include "accessor_common.h" #include "generic_accessor_placeholder_buffer_range_constructor.h" + +using namespace generic_accessor_placeholder_buffer_range_constructor; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_placeholder_buffer_range_constructor_core { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) ("Generic sycl::accessor placeholder buffer range constructor. core types", - "[accessor]")({ - using namespace generic_accessor_placeholder_buffer_range_constructor; - common_run_tests(); + "[accessor]", test_combinations)({ + common_run_tests(); }); } // namespace generic_accessor_placeholder_buffer_range_constructor_core diff --git a/tests/accessor/generic_accessor_placeholder_buffer_range_constructor_fp16.cpp b/tests/accessor/generic_accessor_placeholder_buffer_range_constructor_fp16.cpp index a4b848cef..54a664f33 100644 --- a/tests/accessor/generic_accessor_placeholder_buffer_range_constructor_fp16.cpp +++ b/tests/accessor/generic_accessor_placeholder_buffer_range_constructor_fp16.cpp @@ -28,25 +28,26 @@ #include "accessor_common.h" #include "generic_accessor_placeholder_buffer_range_constructor.h" + +using namespace generic_accessor_placeholder_buffer_range_constructor; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_placeholder_buffer_range_constructor_fp16 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) ("Generic sycl::accessor placeholder buffer range constructor. fp16 type", - "[accessor]")({ - using namespace generic_accessor_placeholder_buffer_range_constructor; - + "[accessor]", test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (queue.get_device().has(sycl::aspect::fp16)) { #if SYCL_CTS_ENABLE_FULL_CONFORMANCE for_type_vectors_marray< - run_generic_placeholder_buffer_range_constructor_test, sycl::half>( - "sycl::half"); + run_generic_placeholder_buffer_range_constructor_test, sycl::half, + TestType>("sycl::half"); #else - run_generic_placeholder_buffer_range_constructor_test{}( + run_generic_placeholder_buffer_range_constructor_test{}( "sycl::half"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE } else { diff --git a/tests/accessor/generic_accessor_placeholder_buffer_range_constructor_fp64.cpp b/tests/accessor/generic_accessor_placeholder_buffer_range_constructor_fp64.cpp index 3cfd7b0ab..46970b849 100644 --- a/tests/accessor/generic_accessor_placeholder_buffer_range_constructor_fp64.cpp +++ b/tests/accessor/generic_accessor_placeholder_buffer_range_constructor_fp64.cpp @@ -28,25 +28,26 @@ #include "accessor_common.h" #include "generic_accessor_placeholder_buffer_range_constructor.h" + +using namespace generic_accessor_placeholder_buffer_range_constructor; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_placeholder_buffer_range_constructor_fp64 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) ("Generic sycl::accessor placeholder buffer range constructor. fp64 type", - "[accessor]")({ - using namespace generic_accessor_placeholder_buffer_range_constructor; - + "[accessor]", test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (queue.get_device().has(sycl::aspect::fp64)) { #if SYCL_CTS_ENABLE_FULL_CONFORMANCE for_type_vectors_marray< - run_generic_placeholder_buffer_range_constructor_test, double>( - "double"); + run_generic_placeholder_buffer_range_constructor_test, double, + TestType>("double"); #else - run_generic_placeholder_buffer_range_constructor_test{}("double"); + run_generic_placeholder_buffer_range_constructor_test{}( + "double"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE } else { WARN("Device does not support double precision floating point operations"); diff --git a/tests/accessor/generic_accessor_placeholder_buffer_range_offset_constructor.h b/tests/accessor/generic_accessor_placeholder_buffer_range_offset_constructor.h index 679b8ff05..ba0f8800f 100644 --- a/tests/accessor/generic_accessor_placeholder_buffer_range_offset_constructor.h +++ b/tests/accessor/generic_accessor_placeholder_buffer_range_offset_constructor.h @@ -72,15 +72,24 @@ class run_tests_placeholder_buffer_range_offset_constructor { } }; -template +using test_combinations = + typename get_combinations::type; + +template class run_generic_placeholder_buffer_range_offset_constructor_test { public: void operator()(const std::string& type_name) { - // Type packs instances have to be const, otherwise for_all_combination will - // not compile - const auto access_modes = get_access_modes(); - const auto dimensions = get_dimensions(); - const auto targets = get_targets(); + // Get the packs from the test combination type. + using AccessModePack = std::tuple_element_t<0, ArgCombination>; + using DimensionsPack = std::tuple_element_t<1, ArgCombination>; + using TargetsPack = std::tuple_element_t<2, ArgCombination>; + + // Type packs instances have to be const, otherwise for_all_combination + // will not compile + const auto access_modes = AccessModePack::generate_named(); + const auto dimensions = DimensionsPack::generate_unnamed(); + const auto targets = TargetsPack::generate_named(); // To handle cases when class was called from functions // like for_all_types_vectors_marray or diff --git a/tests/accessor/generic_accessor_placeholder_buffer_range_offset_constructor_core.cpp b/tests/accessor/generic_accessor_placeholder_buffer_range_offset_constructor_core.cpp index 24f0a7b1d..bd4ff136a 100644 --- a/tests/accessor/generic_accessor_placeholder_buffer_range_offset_constructor_core.cpp +++ b/tests/accessor/generic_accessor_placeholder_buffer_range_offset_constructor_core.cpp @@ -28,19 +28,20 @@ #include "accessor_common.h" #include "generic_accessor_placeholder_buffer_range_offset_constructor.h" + +using namespace generic_accessor_placeholder_buffer_range_offset_constructor; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_placeholder_buffer_range_offset_constructor_core { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) ("Generic sycl::accessor placeholder buffer range offset constructor. core " "types", - "[accessor]")({ - using namespace generic_accessor_placeholder_buffer_range_offset_constructor; - common_run_tests< - run_generic_placeholder_buffer_range_offset_constructor_test>(); + "[accessor]", test_combinations)({ + common_run_tests(); }); } // namespace diff --git a/tests/accessor/generic_accessor_placeholder_buffer_range_offset_constructor_fp16.cpp b/tests/accessor/generic_accessor_placeholder_buffer_range_offset_constructor_fp16.cpp index cd5e5f933..73a8f6c11 100644 --- a/tests/accessor/generic_accessor_placeholder_buffer_range_offset_constructor_fp16.cpp +++ b/tests/accessor/generic_accessor_placeholder_buffer_range_offset_constructor_fp16.cpp @@ -28,26 +28,27 @@ #include "accessor_common.h" #include "generic_accessor_placeholder_buffer_range_offset_constructor.h" + +using namespace generic_accessor_placeholder_buffer_range_offset_constructor; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_placeholder_buffer_range_offset_constructor_fp16 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) ("Generic sycl::accessor placeholder buffer range offset constructor. fp16 " "type", - "[accessor]")({ - using namespace generic_accessor_placeholder_buffer_range_offset_constructor; - + "[accessor]", test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (queue.get_device().has(sycl::aspect::fp16)) { #if SYCL_CTS_ENABLE_FULL_CONFORMANCE for_type_vectors_marray< run_generic_placeholder_buffer_range_offset_constructor_test, - sycl::half>("sycl::half"); + sycl::half, TestType>("sycl::half"); #else - run_generic_placeholder_buffer_range_offset_constructor_test{}( + run_generic_placeholder_buffer_range_offset_constructor_test{}( "sycl::half"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE } else { diff --git a/tests/accessor/generic_accessor_placeholder_buffer_range_offset_constructor_fp64.cpp b/tests/accessor/generic_accessor_placeholder_buffer_range_offset_constructor_fp64.cpp index 5de2412e1..f20efd0c0 100644 --- a/tests/accessor/generic_accessor_placeholder_buffer_range_offset_constructor_fp64.cpp +++ b/tests/accessor/generic_accessor_placeholder_buffer_range_offset_constructor_fp64.cpp @@ -28,26 +28,27 @@ #include "accessor_common.h" #include "generic_accessor_placeholder_buffer_range_offset_constructor.h" + +using namespace generic_accessor_placeholder_buffer_range_offset_constructor; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_placeholder_buffer_range_offset_constructor_fp64 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) ("Generic sycl::accessor placeholder buffer range offset constructor. fp64 " "type", - "[accessor]")({ - using namespace generic_accessor_placeholder_buffer_range_offset_constructor; - + "[accessor]", test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (queue.get_device().has(sycl::aspect::fp64)) { #if SYCL_CTS_ENABLE_FULL_CONFORMANCE for_type_vectors_marray< - run_generic_placeholder_buffer_range_offset_constructor_test, double>( - "double"); + run_generic_placeholder_buffer_range_offset_constructor_test, double, + TestType>("double"); #else - run_generic_placeholder_buffer_range_offset_constructor_test{}( + run_generic_placeholder_buffer_range_offset_constructor_test{}( "double"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE } else { diff --git a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_constructor.h b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_constructor.h index aa5adf59a..420583bca 100644 --- a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_constructor.h +++ b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_constructor.h @@ -68,15 +68,24 @@ class run_tests_placeholder_zero_length_buffer_constructor { } }; -template +using test_combinations = + typename get_combinations::type; + +template class run_generic_placeholder_zero_length_buffer_constructor { public: void operator()(const std::string& type_name) { - // Type packs instances have to be const, otherwise for_all_combination will - // not compile - const auto access_modes = get_access_modes(); - const auto dimensions = get_all_dimensions(); - const auto targets = get_targets(); + // Get the packs from the test combination type. + using AccessModePack = std::tuple_element_t<0, ArgCombination>; + using DimensionsPack = std::tuple_element_t<1, ArgCombination>; + using TargetsPack = std::tuple_element_t<2, ArgCombination>; + + // Type packs instances have to be const, otherwise for_all_combination + // will not compile + const auto access_modes = AccessModePack::generate_named(); + const auto dimensions = DimensionsPack::generate_unnamed(); + const auto targets = TargetsPack::generate_named(); // To handle cases when class was called from functions // like for_all_types_vectors_marray or diff --git a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_constructor_core.cpp b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_constructor_core.cpp index 657fd38c2..9983ea9e1 100644 --- a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_constructor_core.cpp +++ b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_constructor_core.cpp @@ -28,18 +28,20 @@ #include "accessor_common.h" #include "generic_accessor_placeholder_zero_length_buffer_constructor.h" + +using namespace generic_accessor_placeholder_zero_length_buffer_constructor; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_placeholder_zero_length_buffer_constructor_core { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) ("Generic sycl::accessor placeholder zero-length buffer constructor. core " "types", - "[accessor]")({ - using namespace generic_accessor_placeholder_zero_length_buffer_constructor; - common_run_tests(); + "[accessor]", test_combinations)({ + common_run_tests(); }); } // namespace generic_accessor_placeholder_zero_length_buffer_constructor_core diff --git a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_constructor_fp16.cpp b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_constructor_fp16.cpp index 2f65bc04f..3957316ad 100644 --- a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_constructor_fp16.cpp +++ b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_constructor_fp16.cpp @@ -28,25 +28,26 @@ #include "accessor_common.h" #include "generic_accessor_placeholder_zero_length_buffer_constructor.h" + +using namespace generic_accessor_placeholder_zero_length_buffer_constructor; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_placeholder_zero_length_buffer_constructor_fp16 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) ("Generic sycl::accessor placeholder zero-length buffer constructor. fp16 type", - "[accessor]")({ - using namespace generic_accessor_placeholder_zero_length_buffer_constructor; - + "[accessor]", test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (queue.get_device().has(sycl::aspect::fp16)) { #if SYCL_CTS_ENABLE_FULL_CONFORMANCE for_type_vectors_marray< - run_generic_placeholder_zero_length_buffer_constructor, sycl::half>( - "sycl::half"); + run_generic_placeholder_zero_length_buffer_constructor, sycl::half, + TestType>("sycl::half"); #else - run_generic_placeholder_zero_length_buffer_constructor{}( + run_generic_placeholder_zero_length_buffer_constructor{}( "sycl::half"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE } else { diff --git a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_constructor_fp64.cpp b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_constructor_fp64.cpp index 624143809..c9762e2fd 100644 --- a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_constructor_fp64.cpp +++ b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_constructor_fp64.cpp @@ -28,25 +28,26 @@ #include "accessor_common.h" #include "generic_accessor_placeholder_zero_length_buffer_constructor.h" + +using namespace generic_accessor_placeholder_zero_length_buffer_constructor; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_placeholder_zero_length_buffer_constructor_fp64 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) ("Generic sycl::accessor placeholder zero-length buffer constructor. fp64 type", - "[accessor]")({ - using namespace generic_accessor_placeholder_zero_length_buffer_constructor; - + "[accessor]", test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (queue.get_device().has(sycl::aspect::fp64)) { #if SYCL_CTS_ENABLE_FULL_CONFORMANCE for_type_vectors_marray< - run_generic_placeholder_zero_length_buffer_constructor, double>( - "double"); + run_generic_placeholder_zero_length_buffer_constructor, double, + TestType>("double"); #else - run_generic_placeholder_zero_length_buffer_constructor{}("double"); + run_generic_placeholder_zero_length_buffer_constructor{}( + "double"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE } else { WARN("Device does not support double precision floating point operations"); diff --git a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_constructor.h b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_constructor.h index 796950076..ebe480778 100644 --- a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_constructor.h +++ b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_constructor.h @@ -72,15 +72,24 @@ class run_tests_placeholder_zero_length_buffer_range_constructor { } }; -template +using test_combinations = + typename get_combinations::type; + +template class run_generic_placeholder_zero_length_buffer_range_constructor_test { public: void operator()(const std::string& type_name) { - // Type packs instances have to be const, otherwise for_all_combination will - // not compile - const auto access_modes = get_access_modes(); - const auto dimensions = get_dimensions(); - const auto targets = get_targets(); + // Get the packs from the test combination type. + using AccessModePack = std::tuple_element_t<0, ArgCombination>; + using DimensionsPack = std::tuple_element_t<1, ArgCombination>; + using TargetsPack = std::tuple_element_t<2, ArgCombination>; + + // Type packs instances have to be const, otherwise for_all_combination + // will not compile + const auto access_modes = AccessModePack::generate_named(); + const auto dimensions = DimensionsPack::generate_unnamed(); + const auto targets = TargetsPack::generate_named(); // To handle cases when class was called from functions // like for_all_types_vectors_marray or diff --git a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_constructor_core.cpp b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_constructor_core.cpp index b94e23fcc..69701ffe0 100644 --- a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_constructor_core.cpp +++ b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_constructor_core.cpp @@ -28,19 +28,21 @@ #include "accessor_common.h" #include "generic_accessor_placeholder_zero_length_buffer_range_constructor.h" + +using namespace generic_accessor_placeholder_zero_length_buffer_range_constructor; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_placeholder_zero_length_buffer_range_constructor_core { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) ("Generic sycl::accessor placeholder zero-length buffer range constructor. " "core types", - "[accessor]")({ - using namespace generic_accessor_placeholder_zero_length_buffer_range_constructor; + "[accessor]", test_combinations)({ common_run_tests< - run_generic_placeholder_zero_length_buffer_range_constructor_test>(); + run_generic_placeholder_zero_length_buffer_range_constructor_test, + TestType>(); }); } // namespace diff --git a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_constructor_fp16.cpp b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_constructor_fp16.cpp index 6f4c159ee..acdad15f3 100644 --- a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_constructor_fp16.cpp +++ b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_constructor_fp16.cpp @@ -28,27 +28,27 @@ #include "accessor_common.h" #include "generic_accessor_placeholder_zero_length_buffer_range_constructor.h" + +using namespace generic_accessor_placeholder_zero_length_buffer_range_constructor; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_placeholder_zero_length_buffer_range_constructor_fp16 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) ("Generic sycl::accessor placeholder zero-length buffer range constructor. " "fp16 type", - "[accessor]")({ - using namespace generic_accessor_placeholder_zero_length_buffer_range_constructor; - + "[accessor]", test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (queue.get_device().has(sycl::aspect::fp16)) { #if SYCL_CTS_ENABLE_FULL_CONFORMANCE for_type_vectors_marray< run_generic_placeholder_zero_length_buffer_range_constructor_test, - sycl::half>("sycl::half"); + sycl::half, TestType>("sycl::half"); #else run_generic_placeholder_zero_length_buffer_range_constructor_test< - sycl::half>{}("sycl::half"); + sycl::half, TestType>{}("sycl::half"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE } else { WARN("Device does not support half precision floating point operations"); diff --git a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_constructor_fp64.cpp b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_constructor_fp64.cpp index ccb98eea2..82cbb3a65 100644 --- a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_constructor_fp64.cpp +++ b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_constructor_fp64.cpp @@ -28,27 +28,27 @@ #include "accessor_common.h" #include "generic_accessor_placeholder_zero_length_buffer_range_constructor.h" + +using namespace generic_accessor_placeholder_zero_length_buffer_range_constructor; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_placeholder_zero_length_buffer_range_constructor_fp64 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) ("Generic sycl::accessor placeholder zero-length buffer range constructor. " "fp64 type", - "[accessor]")({ - using namespace generic_accessor_placeholder_zero_length_buffer_range_constructor; - + "[accessor]", test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (queue.get_device().has(sycl::aspect::fp64)) { #if SYCL_CTS_ENABLE_FULL_CONFORMANCE for_type_vectors_marray< run_generic_placeholder_zero_length_buffer_range_constructor_test, - double>("double"); + double, TestType>("double"); #else - run_generic_placeholder_zero_length_buffer_range_constructor_test{}( - "double"); + run_generic_placeholder_zero_length_buffer_range_constructor_test< + double, TestType>{}("double"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE } else { WARN("Device does not support double precision floating point operations"); diff --git a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor.h b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor.h index ece1fc259..60479ad4b 100644 --- a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor.h +++ b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor.h @@ -73,15 +73,24 @@ class run_tests_placeholder_zero_length_buffer_range_offset_constructor { } }; -template +using test_combinations = + typename get_combinations::type; + +template class run_generic_placeholder_zero_length_buffer_range_offset_constructor_test { public: void operator()(const std::string& type_name) { - // Type packs instances have to be const, otherwise for_all_combination will - // not compile - const auto access_modes = get_access_modes(); - const auto dimensions = get_dimensions(); - const auto targets = get_targets(); + // Get the packs from the test combination type. + using AccessModePack = std::tuple_element_t<0, ArgCombination>; + using DimensionsPack = std::tuple_element_t<1, ArgCombination>; + using TargetsPack = std::tuple_element_t<2, ArgCombination>; + + // Type packs instances have to be const, otherwise for_all_combination + // will not compile + const auto access_modes = AccessModePack::generate_named(); + const auto dimensions = DimensionsPack::generate_unnamed(); + const auto targets = TargetsPack::generate_named(); // To handle cases when class was called from functions // like for_all_types_vectors_marray or diff --git a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_core.cpp b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_core.cpp index 6fe4e63c6..b0b646fe9 100644 --- a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_core.cpp +++ b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_core.cpp @@ -28,19 +28,21 @@ #include "accessor_common.h" #include "generic_accessor_placeholder_zero_length_buffer_range_offset_constructor.h" + +using namespace generic_accessor_placeholder_zero_length_buffer_range_offset_constructor; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_core { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) ("Generic sycl::accessor placeholder zero-length buffer range offset " "constructor. core types", - "[accessor]")({ - using namespace generic_accessor_placeholder_zero_length_buffer_range_offset_constructor; + "[accessor]", test_combinations)({ common_run_tests< - run_generic_placeholder_zero_length_buffer_range_offset_constructor_test>(); + run_generic_placeholder_zero_length_buffer_range_offset_constructor_test, + TestType>(); }); } // namespace diff --git a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_fp16.cpp b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_fp16.cpp index 49802e271..b1106f1f4 100644 --- a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_fp16.cpp +++ b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_fp16.cpp @@ -28,27 +28,27 @@ #include "accessor_common.h" #include "generic_accessor_placeholder_zero_length_buffer_range_offset_constructor.h" + +using namespace generic_accessor_placeholder_zero_length_buffer_range_offset_constructor; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_fp16 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) ("Generic sycl::accessor placeholder zero-length buffer range offset " "constructor. fp16 type", - "[accessor]")({ - using namespace generic_accessor_placeholder_zero_length_buffer_range_offset_constructor; - + "[accessor]", test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (queue.get_device().has(sycl::aspect::fp16)) { #if SYCL_CTS_ENABLE_FULL_CONFORMANCE for_type_vectors_marray< run_generic_placeholder_zero_length_buffer_range_offset_constructor_test, - sycl::half>("sycl::half"); + sycl::half, TestType>("sycl::half"); #else run_generic_placeholder_zero_length_buffer_range_offset_constructor_test< - sycl::half>{}("sycl::half"); + sycl::half, TestType>{}("sycl::half"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE } else { WARN("Device does not support half precision floating point operations"); diff --git a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_fp64.cpp b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_fp64.cpp index c53a71d8a..fd246956a 100644 --- a/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_fp64.cpp +++ b/tests/accessor/generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_fp64.cpp @@ -28,27 +28,27 @@ #include "accessor_common.h" #include "generic_accessor_placeholder_zero_length_buffer_range_offset_constructor.h" + +using namespace generic_accessor_placeholder_zero_length_buffer_range_offset_constructor; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_placeholder_zero_length_buffer_range_offset_constructor_fp64 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) ("Generic sycl::accessor placeholder zero-length buffer range offset. fp64 " "type", - "[accessor]")({ - using namespace generic_accessor_placeholder_zero_length_buffer_range_offset_constructor; - + "[accessor]", test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (queue.get_device().has(sycl::aspect::fp64)) { #if SYCL_CTS_ENABLE_FULL_CONFORMANCE for_type_vectors_marray< run_generic_placeholder_zero_length_buffer_range_offset_constructor_test, - double>("double"); + double, TestType>("double"); #else run_generic_placeholder_zero_length_buffer_range_offset_constructor_test< - double>{}("double"); + double, TestType>{}("double"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE } else { WARN("Device does not support double precision floating point operations"); diff --git a/tests/accessor/generic_accessor_properties.h b/tests/accessor/generic_accessor_properties.h index 273303f86..fb70faae1 100644 --- a/tests/accessor/generic_accessor_properties.h +++ b/tests/accessor/generic_accessor_properties.h @@ -415,15 +415,24 @@ class run_tests_properties { } }; -template +using test_combinations = + typename get_combinations::type; + +template class run_generic_properties_tests { public: void operator()(const std::string& type_name) { + // Get the packs from the test combination type. + using AccessModePack = std::tuple_element_t<0, ArgCombination>; + using DimensionsPack = std::tuple_element_t<1, ArgCombination>; + using TargetsPack = std::tuple_element_t<2, ArgCombination>; + // Type packs instances have to be const, otherwise for_all_combination // will not compile - const auto access_modes = get_access_modes(); - const auto dimensions = get_all_dimensions(); - const auto targets = get_targets(); + const auto access_modes = AccessModePack::generate_named(); + const auto dimensions = DimensionsPack::generate_unnamed(); + const auto targets = TargetsPack::generate_named(); // To handle cases when class was called from functions // like for_all_types_vectors_marray or for_all_device_copyable_std_containers. diff --git a/tests/accessor/generic_accessor_properties_core.cpp b/tests/accessor/generic_accessor_properties_core.cpp index 068d8a60b..fad1f4fb8 100644 --- a/tests/accessor/generic_accessor_properties_core.cpp +++ b/tests/accessor/generic_accessor_properties_core.cpp @@ -13,6 +13,8 @@ #include "accessor_common.h" #include "generic_accessor_properties.h" + +using namespace generic_accessor_properties; #endif #include "../common/disabled_for_test_case.h" @@ -20,10 +22,10 @@ namespace generic_accessor_properties_core { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("Generic sycl::accessor properties test. core types", "[accessor]")({ - using namespace generic_accessor_properties; - common_run_tests(); +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("Generic sycl::accessor properties test. core types", "[accessor]", + test_combinations)({ + common_run_tests(); }); } // namespace generic_accessor_properties_core diff --git a/tests/accessor/generic_accessor_properties_fp16.cpp b/tests/accessor/generic_accessor_properties_fp16.cpp index deb666ad2..0b82a0a37 100644 --- a/tests/accessor/generic_accessor_properties_fp16.cpp +++ b/tests/accessor/generic_accessor_properties_fp16.cpp @@ -13,6 +13,8 @@ #include "accessor_common.h" #include "generic_accessor_properties.h" + +using namespace generic_accessor_properties; #endif #include "../common/disabled_for_test_case.h" @@ -20,9 +22,9 @@ namespace generic_accessor_properties_fp16 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("Generic sycl::accessor properties test. fp16 type", "[accessor]")({ - using namespace generic_accessor_properties; +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("Generic sycl::accessor properties test. fp16 type", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp16)) { WARN( @@ -32,10 +34,10 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( + for_type_vectors_marray( "sycl::half"); #else - run_generic_properties_tests{}("sycl::half"); + run_generic_properties_tests{}("sycl::half"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); diff --git a/tests/accessor/generic_accessor_properties_fp64.cpp b/tests/accessor/generic_accessor_properties_fp64.cpp index 4fed1d4c8..7f48f09a9 100644 --- a/tests/accessor/generic_accessor_properties_fp64.cpp +++ b/tests/accessor/generic_accessor_properties_fp64.cpp @@ -13,6 +13,8 @@ #include "accessor_common.h" #include "generic_accessor_properties.h" + +using namespace generic_accessor_properties; #endif #include "../common/disabled_for_test_case.h" @@ -20,9 +22,9 @@ namespace generic_accessor_properties_fp64 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("Generic sycl::accessor properties test. fp64 type", "[accessor]")({ - using namespace generic_accessor_properties; +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("Generic sycl::accessor properties test. fp64 type", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp64)) { WARN( @@ -32,9 +34,10 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); + for_type_vectors_marray( + "double"); #else - run_generic_properties_tests{}("double"); + run_generic_properties_tests{}("double"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); diff --git a/tests/accessor/generic_accessor_zero_dim_constructor.h b/tests/accessor/generic_accessor_zero_dim_constructor.h index 7d45441e9..40c6a2bbf 100644 --- a/tests/accessor/generic_accessor_zero_dim_constructor.h +++ b/tests/accessor/generic_accessor_zero_dim_constructor.h @@ -63,16 +63,24 @@ class run_tests_zero_dim_constructor { } }; -template +using test_combinations = + typename get_combinations, + targets_pack>::type; + +template class run_generic_zero_dim_constructor_test { public: void operator()(const std::string& type_name) { - // Type packs instances have to be const, otherwise for_all_combination will - // not compile - const auto access_modes = get_access_modes(); + // Get the packs from the test combination type. + using AccessModePack = std::tuple_element_t<0, ArgCombination>; + using DimensionsPack = std::tuple_element_t<1, ArgCombination>; + using TargetsPack = std::tuple_element_t<2, ArgCombination>; - const auto dimensions = integer_pack<0>::generate_unnamed(); - const auto targets = get_targets(); + // Type packs instances have to be const, otherwise for_all_combination + // will not compile + const auto access_modes = AccessModePack::generate_named(); + const auto dimensions = DimensionsPack::generate_unnamed(); + const auto targets = TargetsPack::generate_named(); // To handle cases when class was called from functions // like for_all_types_vectors_marray or diff --git a/tests/accessor/generic_accessor_zero_dim_constructor_core.cpp b/tests/accessor/generic_accessor_zero_dim_constructor_core.cpp index 83bad9ab0..a8ab947f7 100644 --- a/tests/accessor/generic_accessor_zero_dim_constructor_core.cpp +++ b/tests/accessor/generic_accessor_zero_dim_constructor_core.cpp @@ -28,16 +28,18 @@ #include "accessor_common.h" #include "generic_accessor_zero_dim_constructor.h" + +using namespace generic_accessor_zero_dim_constructor; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_zero_dim_constructor_core { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("Generic sycl::accessor zero-dim constructors. core types", "[accessor]")({ - using namespace generic_accessor_zero_dim_constructor; - common_run_tests(); +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("Generic sycl::accessor zero-dim constructors. core types", "[accessor]", + test_combinations)({ + common_run_tests(); }); } // namespace generic_accessor_zero_dim_constructor_core diff --git a/tests/accessor/generic_accessor_zero_dim_constructor_fp16.cpp b/tests/accessor/generic_accessor_zero_dim_constructor_fp16.cpp index 67ce47d06..39ef6ac45 100644 --- a/tests/accessor/generic_accessor_zero_dim_constructor_fp16.cpp +++ b/tests/accessor/generic_accessor_zero_dim_constructor_fp16.cpp @@ -27,23 +27,24 @@ #include "accessor_common.h" #include "generic_accessor_zero_dim_constructor.h" + +using namespace generic_accessor_zero_dim_constructor; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_zero_dim_constructor_fp16 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("Generic sycl::accessor zero-dim constructors. fp16 type", "[accessor]")({ - using namespace generic_accessor_zero_dim_constructor; - +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("Generic sycl::accessor zero-dim constructors. fp16 type", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (queue.get_device().has(sycl::aspect::fp16)) { #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( - "sycl::half"); + for_type_vectors_marray("sycl::half"); #else - run_generic_zero_dim_constructor_test{}("sycl::half"); + run_generic_zero_dim_constructor_test{}("sycl::half"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE } else { WARN("Device does not support half precision floating point operations"); diff --git a/tests/accessor/generic_accessor_zero_dim_constructor_fp64.cpp b/tests/accessor/generic_accessor_zero_dim_constructor_fp64.cpp index b2a08fcde..40a68ba71 100644 --- a/tests/accessor/generic_accessor_zero_dim_constructor_fp64.cpp +++ b/tests/accessor/generic_accessor_zero_dim_constructor_fp64.cpp @@ -26,23 +26,24 @@ #if !SYCL_CTS_COMPILING_WITH_HIPSYCL && !SYCL_CTS_COMPILING_WITH_COMPUTECPP #include "accessor_common.h" #include "generic_accessor_zero_dim_constructor.h" + +using namespace generic_accessor_zero_dim_constructor; #endif #include "../common/disabled_for_test_case.h" namespace generic_accessor_zero_dim_constructor_fp64 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("Generic sycl::accessor zero-dim constructors. fp64 type", "[accessor]")({ - using namespace generic_accessor_zero_dim_constructor; - +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("Generic sycl::accessor zero-dim constructors. fp64 type", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (queue.get_device().has(sycl::aspect::fp64)) { #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( - "double"); + for_type_vectors_marray("double"); #else - run_generic_zero_dim_constructor_test{}("double"); + run_generic_zero_dim_constructor_test{}("double"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE } else { WARN("Device does not support double precision floating point operations"); diff --git a/tests/accessor/host_accessor_api_common.h b/tests/accessor/host_accessor_api_common.h index 0262fc311..b82146c97 100644 --- a/tests/accessor/host_accessor_api_common.h +++ b/tests/accessor/host_accessor_api_common.h @@ -197,12 +197,21 @@ class run_api_tests { } }; -template +using test_combinations = + typename get_combinations::type; + +template class run_host_accessor_api_for_type { public: void operator()(const std::string &type_name) { - const auto access_modes = get_access_modes(); - const auto dimensions = get_all_dimensions(); + // Get the packs from the test combination type. + using AccessModePack = std::tuple_element_t<0, ArgCombination>; + using DimensionsPack = std::tuple_element_t<1, ArgCombination>; + + // Type packs instances have to be const, otherwise for_all_combination + // will not compile + const auto access_modes = AccessModePack::generate_named(); + const auto dimensions = DimensionsPack::generate_unnamed(); // To handle cases when class was called from functions // like for_all_types_vectors_marray or diff --git a/tests/accessor/host_accessor_api_core.cpp b/tests/accessor/host_accessor_api_core.cpp index f61d74902..4aa6d7d07 100644 --- a/tests/accessor/host_accessor_api_core.cpp +++ b/tests/accessor/host_accessor_api_core.cpp @@ -12,14 +12,15 @@ #if !SYCL_CTS_COMPILING_WITH_HIPSYCL && !SYCL_CTS_COMPILING_WITH_COMPUTECPP #include "accessor_common.h" #include "host_accessor_api_common.h" + +using namespace host_accessor_api_common; #endif namespace host_accessor_api_core { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::host_accessor api. core types", "[accessor]")({ - using namespace host_accessor_api_common; - common_run_tests(); +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::host_accessor api. core types", "[accessor]", test_combinations)({ + common_run_tests(); }); } // namespace host_accessor_api_core diff --git a/tests/accessor/host_accessor_api_fp16.cpp b/tests/accessor/host_accessor_api_fp16.cpp index c94e10ea9..989ed919f 100644 --- a/tests/accessor/host_accessor_api_fp16.cpp +++ b/tests/accessor/host_accessor_api_fp16.cpp @@ -12,14 +12,14 @@ #if !SYCL_CTS_COMPILING_WITH_HIPSYCL && !SYCL_CTS_COMPILING_WITH_COMPUTECPP #include "accessor_common.h" #include "host_accessor_api_common.h" + +using namespace host_accessor_api_common; #endif namespace host_accessor_api_fp16 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::host_accessor api. fp16 type", "[accessor]")({ - using namespace host_accessor_api_common; - +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::host_accessor api. fp16 type", "[accessor]", test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp16)) { WARN( @@ -29,10 +29,10 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( + for_type_vectors_marray( "sycl::half"); #else - run_host_accessor_api_for_type{}("sycl::half"); + run_host_accessor_api_for_type{}("sycl::half"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); } // namespace host_accessor_api_fp16 diff --git a/tests/accessor/host_accessor_api_fp64.cpp b/tests/accessor/host_accessor_api_fp64.cpp index 6f3643eb7..807e35cc1 100644 --- a/tests/accessor/host_accessor_api_fp64.cpp +++ b/tests/accessor/host_accessor_api_fp64.cpp @@ -12,14 +12,14 @@ #if !SYCL_CTS_COMPILING_WITH_HIPSYCL && !SYCL_CTS_COMPILING_WITH_COMPUTECPP #include "accessor_common.h" #include "host_accessor_api_common.h" + +using namespace host_accessor_api_common; #endif namespace host_accessor_api_fp64 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::host_accessor api. fp64 type", "[accessor]")({ - using namespace host_accessor_api_common; - +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::host_accessor api. fp64 type", "[accessor]", test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp64)) { WARN( @@ -29,9 +29,10 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); + for_type_vectors_marray( + "double"); #else - run_host_accessor_api_for_type{}("double"); + run_host_accessor_api_for_type{}("double"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); } // namespace host_accessor_api_fp64 diff --git a/tests/accessor/host_accessor_constructors.h b/tests/accessor/host_accessor_constructors.h index 8bbdfeca9..7b86891a3 100644 --- a/tests/accessor/host_accessor_constructors.h +++ b/tests/accessor/host_accessor_constructors.h @@ -253,14 +253,21 @@ class run_tests_constructors { } }; -template +using test_combinations = + typename get_combinations::type; + +template class run_host_constructors_test { public: void operator()(const std::string& type_name) { - // Type packs instances have to be const, otherwise for_all_combination will - // not compile - const auto access_modes = get_access_modes(); - const auto dimensions = get_all_dimensions(); + // Get the packs from the test combination type. + using AccessModePack = std::tuple_element_t<0, ArgCombination>; + using DimensionsPack = std::tuple_element_t<1, ArgCombination>; + + // Type packs instances have to be const, otherwise for_all_combination + // will not compile + const auto access_modes = AccessModePack::generate_named(); + const auto dimensions = DimensionsPack::generate_unnamed(); // To handle cases when class was called from functions // like for_all_types_vectors_marray or for_all_device_copyable_std_containers. diff --git a/tests/accessor/host_accessor_constructors_core.cpp b/tests/accessor/host_accessor_constructors_core.cpp index b0c1b5c60..4fcee4012 100644 --- a/tests/accessor/host_accessor_constructors_core.cpp +++ b/tests/accessor/host_accessor_constructors_core.cpp @@ -25,6 +25,8 @@ #if !SYCL_CTS_COMPILING_WITH_HIPSYCL && !SYCL_CTS_COMPILING_WITH_COMPUTECPP #include "accessor_common.h" #include "host_accessor_constructors.h" + +using namespace host_accessor_constructors; #endif #include "../common/disabled_for_test_case.h" @@ -32,10 +34,10 @@ namespace host_accessor_constructors_core { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::host_accessor constructors. core types", "[accessor]")({ - using namespace host_accessor_constructors; - common_run_tests(); +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::host_accessor constructors. core types", "[accessor]", + test_combinations)({ + common_run_tests(); }); } // namespace host_accessor_constructors_core diff --git a/tests/accessor/host_accessor_constructors_fp16.cpp b/tests/accessor/host_accessor_constructors_fp16.cpp index c86eaae73..c2417d024 100644 --- a/tests/accessor/host_accessor_constructors_fp16.cpp +++ b/tests/accessor/host_accessor_constructors_fp16.cpp @@ -26,6 +26,8 @@ #if !SYCL_CTS_COMPILING_WITH_HIPSYCL && !SYCL_CTS_COMPILING_WITH_COMPUTECPP #include "accessor_common.h" #include "host_accessor_constructors.h" + +using namespace host_accessor_constructors; #endif #include "../common/disabled_for_test_case.h" @@ -33,9 +35,9 @@ namespace host_accessor_constructors_fp16 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::host_accessor constructors. fp16 type", "[accessor]")({ - using namespace host_accessor_constructors; +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::host_accessor constructors. fp16 type", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp16)) { WARN( @@ -45,9 +47,10 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("sycl::half"); + for_type_vectors_marray( + "sycl::half"); #else - run_host_constructors_test{}("sycl::half"); + run_host_constructors_test{}("sycl::half"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); } // namespace host_accessor_constructors_fp16 diff --git a/tests/accessor/host_accessor_constructors_fp64.cpp b/tests/accessor/host_accessor_constructors_fp64.cpp index fe21b7144..5f73a6ce8 100644 --- a/tests/accessor/host_accessor_constructors_fp64.cpp +++ b/tests/accessor/host_accessor_constructors_fp64.cpp @@ -26,6 +26,8 @@ #if !SYCL_CTS_COMPILING_WITH_HIPSYCL && !SYCL_CTS_COMPILING_WITH_COMPUTECPP #include "accessor_common.h" #include "host_accessor_constructors.h" + +using namespace host_accessor_constructors; #endif #include "../common/disabled_for_test_case.h" @@ -33,9 +35,9 @@ namespace host_accessor_constructors_fp64 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::host_accessor constructors. fp64 type", "[accessor]")({ - using namespace host_accessor_constructors; +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::host_accessor constructors. fp64 type", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp64)) { WARN( @@ -45,9 +47,10 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); + for_type_vectors_marray( + "double"); #else - run_host_constructors_test{}("double"); + run_host_constructors_test{}("double"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); } // namespace host_accessor_constructors_fp64 diff --git a/tests/accessor/host_accessor_linearization.h b/tests/accessor/host_accessor_linearization.h index 6a14549c7..9490c28ed 100644 --- a/tests/accessor/host_accessor_linearization.h +++ b/tests/accessor/host_accessor_linearization.h @@ -43,12 +43,22 @@ class run_linearization_tests { } }; -template +using test_combinations = + typename get_combinations>::type; + +template class run_host_linearization_for_type { public: void operator()(const std::string &type_name) { - const auto access_modes = get_access_modes(); - const auto dimensions = integer_pack<2, 3>::generate_unnamed(); + // Get the packs from the test combination type. + using AccessModePack = std::tuple_element_t<0, ArgCombination>; + using DimensionsPack = std::tuple_element_t<1, ArgCombination>; + + // Type packs instances have to be const, otherwise for_all_combination + // will not compile + const auto access_modes = AccessModePack::generate_named(); + const auto dimensions = DimensionsPack::generate_unnamed(); + auto actual_type_name = type_name_string::get(type_name); for_all_combinations(access_modes, dimensions, diff --git a/tests/accessor/host_accessor_linearization_core.cpp b/tests/accessor/host_accessor_linearization_core.cpp index c28645250..4fc9ea7bc 100644 --- a/tests/accessor/host_accessor_linearization_core.cpp +++ b/tests/accessor/host_accessor_linearization_core.cpp @@ -27,14 +27,16 @@ #include "accessor_common.h" #include "host_accessor_linearization.h" + +using namespace host_accessor_linearization; #endif namespace host_accessor_liniarization_core { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::host_accessor linearization. core types", "[accessor]")({ - using namespace host_accessor_linearization; - common_run_tests(); +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::host_accessor linearization. core types", "[accessor]", + test_combinations)({ + common_run_tests(); }); } // namespace host_accessor_liniarization_core diff --git a/tests/accessor/host_accessor_linearization_fp16.cpp b/tests/accessor/host_accessor_linearization_fp16.cpp index fcd827630..afc03db7d 100644 --- a/tests/accessor/host_accessor_linearization_fp16.cpp +++ b/tests/accessor/host_accessor_linearization_fp16.cpp @@ -27,6 +27,8 @@ #include "accessor_common.h" #include "host_accessor_linearization.h" + +using namespace host_accessor_linearization; #endif #include "../common/disabled_for_test_case.h" @@ -34,9 +36,9 @@ namespace host_accessor_linearization_fp16 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::host_accessor linearization test. fp16 type", "[accessor]")({ - using namespace host_accessor_linearization; +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::host_accessor linearization test. fp16 type", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp16)) { WARN( @@ -46,10 +48,10 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( - "sycl::half"); + for_type_vectors_marray("sycl::half"); #else - run_host_linearization_for_type{}("sycl::half"); + run_host_linearization_for_type{}("sycl::half"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); diff --git a/tests/accessor/host_accessor_linearization_fp64.cpp b/tests/accessor/host_accessor_linearization_fp64.cpp index 911688d9e..bdde27d85 100644 --- a/tests/accessor/host_accessor_linearization_fp64.cpp +++ b/tests/accessor/host_accessor_linearization_fp64.cpp @@ -27,6 +27,8 @@ #include "accessor_common.h" #include "host_accessor_linearization.h" + +using namespace host_accessor_linearization; #endif #include "../common/disabled_for_test_case.h" @@ -34,9 +36,9 @@ namespace host_accessor_linearization_fp64 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::host_accessor linearization test. fp64 type", "[accessor]")({ - using namespace host_accessor_linearization; +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::host_accessor linearization test. fp64 type", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp64)) { WARN( @@ -46,9 +48,10 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); + for_type_vectors_marray( + "double"); #else - run_host_linearization_for_type{}("double"); + run_host_linearization_for_type{}("double"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); diff --git a/tests/accessor/host_accessor_properties.h b/tests/accessor/host_accessor_properties.h index ace7e5278..4c82d635f 100644 --- a/tests/accessor/host_accessor_properties.h +++ b/tests/accessor/host_accessor_properties.h @@ -320,14 +320,21 @@ class run_tests_properties { } }; -template +using test_combinations = + typename get_combinations::type; + +template class run_host_properties_tests { public: void operator()(const std::string& type_name) { - // Type packs instances have to be const, otherwise for_all_combination will - // not compile - const auto access_modes = get_access_modes(); - const auto dimensions = get_all_dimensions(); + // Get the packs from the test combination type. + using AccessModePack = std::tuple_element_t<0, ArgCombination>; + using DimensionsPack = std::tuple_element_t<1, ArgCombination>; + + // Type packs instances have to be const, otherwise for_all_combination + // will not compile + const auto access_modes = AccessModePack::generate_named(); + const auto dimensions = DimensionsPack::generate_unnamed(); // To handle cases when class was called from functions // like for_all_types_vectors_marray or for_all_device_copyable_std_containers. diff --git a/tests/accessor/host_accessor_properties_core.cpp b/tests/accessor/host_accessor_properties_core.cpp index b240d6f36..7f6970a5c 100644 --- a/tests/accessor/host_accessor_properties_core.cpp +++ b/tests/accessor/host_accessor_properties_core.cpp @@ -12,6 +12,8 @@ #if !SYCL_CTS_COMPILING_WITH_HIPSYCL && !SYCL_CTS_COMPILING_WITH_COMPUTECPP #include "accessor_common.h" #include "host_accessor_properties.h" + +using namespace host_accessor_properties; #endif #include "../common/disabled_for_test_case.h" @@ -19,10 +21,10 @@ namespace host_accessor_properties_core { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::host_accessor properties. core types", "[accessor]")({ - using namespace host_accessor_properties; - common_run_tests(); +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::host_accessor properties. core types", "[accessor]", + test_combinations)({ + common_run_tests(); }); } // namespace host_accessor_properties_core diff --git a/tests/accessor/host_accessor_properties_fp16.cpp b/tests/accessor/host_accessor_properties_fp16.cpp index bd7384ef9..cd1edfcfe 100644 --- a/tests/accessor/host_accessor_properties_fp16.cpp +++ b/tests/accessor/host_accessor_properties_fp16.cpp @@ -13,6 +13,8 @@ #include "accessor_common.h" #include "host_accessor_properties.h" + +using namespace host_accessor_properties; #endif #include "../common/disabled_for_test_case.h" @@ -20,9 +22,8 @@ namespace host_accessor_properties_fp16 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::host_accessor properties. fp16 type", "[accessor]")({ - using namespace host_accessor_properties; +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::host_accessor properties. fp16 type", "[accessor]", test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp16)) { WARN( @@ -32,9 +33,10 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("sycl::half"); + for_type_vectors_marray( + "sycl::half"); #else - run_host_properties_tests{}("sycl::half"); + run_host_properties_tests{}("sycl::half"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); } // namespace host_accessor_properties_fp16 diff --git a/tests/accessor/host_accessor_properties_fp64.cpp b/tests/accessor/host_accessor_properties_fp64.cpp index 3f5628958..6a70c6cfd 100644 --- a/tests/accessor/host_accessor_properties_fp64.cpp +++ b/tests/accessor/host_accessor_properties_fp64.cpp @@ -13,6 +13,8 @@ #include "accessor_common.h" #include "host_accessor_properties.h" + +using namespace host_accessor_properties; #endif #include "../common/disabled_for_test_case.h" @@ -20,9 +22,8 @@ namespace host_accessor_properties_fp64 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::host_accessor properties. fp64 type", "[accessor]")({ - using namespace host_accessor_properties; +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::host_accessor properties. fp64 type", "[accessor]", test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp64)) { WARN( @@ -32,9 +33,10 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); + for_type_vectors_marray( + "double"); #else - run_host_properties_tests{}("double"); + run_host_properties_tests{}("double"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); } // namespace host_accessor_properties_fp64 diff --git a/tests/accessor/local_accessor_access_among_work_items.h b/tests/accessor/local_accessor_access_among_work_items.h index 65d90722e..8de62ab3f 100644 --- a/tests/accessor/local_accessor_access_among_work_items.h +++ b/tests/accessor/local_accessor_access_among_work_items.h @@ -102,13 +102,18 @@ class run_test { } }; -template +using test_combinations = typename get_combinations::type; + +template class run_local_accessor_access_among_work_items_tests { public: void operator()(const std::string& type_name) { - // Type packs instances have to be const, otherwise for_all_combination will - // not compile - const auto dimensions = get_dimensions(); + // Get the packs from the test combination type. + using DimensionsPack = std::tuple_element_t<0, ArgCombination>; + + // Type packs instances have to be const, otherwise for_all_combination + // will not compile + const auto dimensions = DimensionsPack::generate_unnamed(); for_all_combinations(dimensions, type_name); } diff --git a/tests/accessor/local_accessor_access_among_work_items_core.cpp b/tests/accessor/local_accessor_access_among_work_items_core.cpp index b44769544..c1a9df8b9 100644 --- a/tests/accessor/local_accessor_access_among_work_items_core.cpp +++ b/tests/accessor/local_accessor_access_among_work_items_core.cpp @@ -23,9 +23,11 @@ using namespace accessor_tests_common; namespace local_accessor_access_among_work_items_core { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::local_accessor access among work items. core types", "[accessor]")({ - common_run_tests(); +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::local_accessor access among work items. core types", "[accessor]", + test_combinations)({ + common_run_tests(); }); } // namespace local_accessor_access_among_work_items_core diff --git a/tests/accessor/local_accessor_access_among_work_items_fp16.cpp b/tests/accessor/local_accessor_access_among_work_items_fp16.cpp index d69a1341c..8a0071cb6 100644 --- a/tests/accessor/local_accessor_access_among_work_items_fp16.cpp +++ b/tests/accessor/local_accessor_access_among_work_items_fp16.cpp @@ -22,8 +22,9 @@ using namespace accessor_tests_common; namespace local_accessor_access_among_work_items_fp16 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::local_accessor access among work items. fp16 type", "[accessor]")({ +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::local_accessor access among work items. fp16 type", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp16)) { WARN( @@ -34,9 +35,10 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) #if SYCL_CTS_ENABLE_FULL_CONFORMANCE for_type_vectors_marray("sycl::half"); + sycl::half, TestType>("sycl::half"); #else - run_local_accessor_access_among_work_items_tests{}("sycl::half"); + run_local_accessor_access_among_work_items_tests{}( + "sycl::half"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); diff --git a/tests/accessor/local_accessor_access_among_work_items_fp64.cpp b/tests/accessor/local_accessor_access_among_work_items_fp64.cpp index c9e63be3e..afdd1dc77 100644 --- a/tests/accessor/local_accessor_access_among_work_items_fp64.cpp +++ b/tests/accessor/local_accessor_access_among_work_items_fp64.cpp @@ -22,8 +22,9 @@ using namespace accessor_tests_common; namespace local_accessor_access_among_work_items_fp64 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::local_accessor access among work items. fp64 type", "[accessor]")({ +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::local_accessor access among work items. fp64 type", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp64)) { WARN( @@ -34,9 +35,10 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) #if SYCL_CTS_ENABLE_FULL_CONFORMANCE for_type_vectors_marray("double"); + double, TestType>("double"); #else - run_local_accessor_access_among_work_items_tests{}("double"); + run_local_accessor_access_among_work_items_tests{}( + "double"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); diff --git a/tests/accessor/local_accessor_api_common.h b/tests/accessor/local_accessor_api_common.h index 2108fb4c1..55c9df3cc 100644 --- a/tests/accessor/local_accessor_api_common.h +++ b/tests/accessor/local_accessor_api_common.h @@ -343,11 +343,18 @@ class run_api_tests { } }; -template +using test_combinations = typename get_combinations::type; + +template class run_local_api_for_type { public: void operator()(const std::string &type_name) { - const auto dimensions = get_all_dimensions(); + // Get the packs from the test combination type. + using DimensionsPack = std::tuple_element_t<0, ArgCombination>; + + // Type packs instances have to be const, otherwise for_all_combination + // will not compile + const auto dimensions = DimensionsPack::generate_unnamed(); // To handle cases when class was called from functions // like for_all_types_vectors_marray or for_all_device_copyable_std_containers. diff --git a/tests/accessor/local_accessor_api_core.cpp b/tests/accessor/local_accessor_api_core.cpp index d157abbd5..5f92f7025 100644 --- a/tests/accessor/local_accessor_api_core.cpp +++ b/tests/accessor/local_accessor_api_core.cpp @@ -12,14 +12,14 @@ #if !SYCL_CTS_COMPILING_WITH_HIPSYCL && !SYCL_CTS_COMPILING_WITH_COMPUTECPP #include "accessor_common.h" #include "local_accessor_api_common.h" + +using namespace local_accessor_api_common; #endif namespace local_accessor_api_core { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::local_accessor api. core types", "[accessor]")({ - using namespace local_accessor_api_common; - common_run_tests(); -}); +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::local_accessor api. core types", "[accessor]", + test_combinations)({ common_run_tests(); }); } // namespace local_accessor_api_core diff --git a/tests/accessor/local_accessor_api_fp16.cpp b/tests/accessor/local_accessor_api_fp16.cpp index 04f2e60d8..82a5c0d92 100644 --- a/tests/accessor/local_accessor_api_fp16.cpp +++ b/tests/accessor/local_accessor_api_fp16.cpp @@ -12,14 +12,14 @@ #if !SYCL_CTS_COMPILING_WITH_HIPSYCL && !SYCL_CTS_COMPILING_WITH_COMPUTECPP #include "accessor_common.h" #include "local_accessor_api_common.h" + +using namespace local_accessor_api_common; #endif namespace local_accessor_api_fp16 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::local_accessor api. fp16 type", "[accessor]")({ - using namespace local_accessor_api_common; - +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::local_accessor api. fp16 type", "[accessor]", test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp16)) { WARN( @@ -29,9 +29,10 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("sycl::half"); + for_type_vectors_marray( + "sycl::half"); #else - run_local_api_for_type{}("sycl::half"); + run_local_api_for_type{}("sycl::half"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); } // namespace local_accessor_api_fp16 diff --git a/tests/accessor/local_accessor_api_fp64.cpp b/tests/accessor/local_accessor_api_fp64.cpp index dda4cd634..886d8314f 100644 --- a/tests/accessor/local_accessor_api_fp64.cpp +++ b/tests/accessor/local_accessor_api_fp64.cpp @@ -12,14 +12,14 @@ #if !SYCL_CTS_COMPILING_WITH_HIPSYCL && !SYCL_CTS_COMPILING_WITH_COMPUTECPP #include "accessor_common.h" #include "local_accessor_api_common.h" + +using namespace local_accessor_api_common; #endif namespace local_accessor_api_fp64 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::local_accessor api. fp64 type", "[accessor]")({ - using namespace local_accessor_api_common; - +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::local_accessor api. fp64 type", "[accessor]", test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp64)) { WARN( @@ -29,9 +29,9 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); + for_type_vectors_marray("double"); #else - run_local_api_for_type{}("double"); + run_local_api_for_type{}("double"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); } // namespace local_accessor_api_fp64 diff --git a/tests/accessor/local_accessor_constructors.h b/tests/accessor/local_accessor_constructors.h index 8a58624b5..095e0b7ba 100644 --- a/tests/accessor/local_accessor_constructors.h +++ b/tests/accessor/local_accessor_constructors.h @@ -174,13 +174,18 @@ class run_tests_constructors { } }; -template +using test_combinations = typename get_combinations::type; + +template class run_local_constructors_test { public: void operator()(const std::string& type_name) { - // Type packs instances have to be const, otherwise for_all_combination will - // not compile - const auto dimensions = get_all_dimensions(); + // Get the packs from the test combination type. + using DimensionsPack = std::tuple_element_t<0, ArgCombination>; + + // Type packs instances have to be const, otherwise for_all_combination + // will not compile + const auto dimensions = DimensionsPack::generate_unnamed(); // To handle cases when class was called from functions // like for_all_types_vectors_marray or for_all_device_copyable_std_containers. diff --git a/tests/accessor/local_accessor_constructors_core.cpp b/tests/accessor/local_accessor_constructors_core.cpp index 4b3f417a8..0da5fd9e6 100644 --- a/tests/accessor/local_accessor_constructors_core.cpp +++ b/tests/accessor/local_accessor_constructors_core.cpp @@ -27,6 +27,8 @@ #include "accessor_common.h" #include "local_accessor_constructors.h" + +using namespace local_accessor_constructors; #endif #include "../common/disabled_for_test_case.h" @@ -34,9 +36,9 @@ namespace local_accessor_constructors_core { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::local_accessor constructors. core types", "[accessor]")({ - using namespace local_accessor_constructors; - common_run_tests(); +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::local_accessor constructors. core types", "[accessor]", + test_combinations)({ + common_run_tests(); }); } // namespace local_accessor_constructors_core diff --git a/tests/accessor/local_accessor_constructors_fp16.cpp b/tests/accessor/local_accessor_constructors_fp16.cpp index de41d9500..bef76f269 100644 --- a/tests/accessor/local_accessor_constructors_fp16.cpp +++ b/tests/accessor/local_accessor_constructors_fp16.cpp @@ -25,6 +25,8 @@ #if !SYCL_CTS_COMPILING_WITH_HIPSYCL && !SYCL_CTS_COMPILING_WITH_COMPUTECPP #include "accessor_common.h" #include "local_accessor_constructors.h" + +using namespace local_accessor_constructors; #endif #include "../common/disabled_for_test_case.h" @@ -32,16 +34,16 @@ namespace local_accessor_constructors_fp16 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::local_accessor constructors. fp16 type", "[accessor]")({ - using namespace local_accessor_constructors; +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::local_accessor constructors. fp16 type", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (queue.get_device().has(sycl::aspect::fp16)) { #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( + for_type_vectors_marray( "sycl::half"); #else - run_local_constructors_test{}("sycl::half"); + run_local_constructors_test{}("sycl::half"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE } else { WARN("Device does not support half precision floating point operations"); diff --git a/tests/accessor/local_accessor_constructors_fp64.cpp b/tests/accessor/local_accessor_constructors_fp64.cpp index 6bb6378e2..de014d0d7 100644 --- a/tests/accessor/local_accessor_constructors_fp64.cpp +++ b/tests/accessor/local_accessor_constructors_fp64.cpp @@ -25,6 +25,8 @@ #if !SYCL_CTS_COMPILING_WITH_HIPSYCL && !SYCL_CTS_COMPILING_WITH_COMPUTECPP #include "accessor_common.h" #include "local_accessor_constructors.h" + +using namespace local_accessor_constructors; #endif #include "../common/disabled_for_test_case.h" @@ -32,15 +34,16 @@ namespace local_accessor_constructors_fp64 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::local_accessor constructors. fp64 type", "[accessor]")({ - using namespace local_accessor_constructors; +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::local_accessor constructors. fp64 type", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (queue.get_device().has(sycl::aspect::fp64)) { #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); + for_type_vectors_marray( + "double"); #else - run_local_constructors_test{}("double"); + run_local_constructors_test{}("double"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE } else { WARN("Device does not support double precision floating point operations"); diff --git a/tests/accessor/local_accessor_linearization.h b/tests/accessor/local_accessor_linearization.h index 1fb58e0fa..ffca555f2 100644 --- a/tests/accessor/local_accessor_linearization.h +++ b/tests/accessor/local_accessor_linearization.h @@ -77,11 +77,19 @@ class run_linearization_tests { } }; -template +using test_combinations = typename get_combinations>::type; + +template class run_local_linearization_for_type { public: void operator()(const std::string &type_name) { - const auto dimensions = integer_pack<2, 3>::generate_unnamed(); + // Get the packs from the test combination type. + using DimensionsPack = std::tuple_element_t<0, ArgCombination>; + + // Type packs instances have to be const, otherwise for_all_combination + // will not compile + const auto dimensions = DimensionsPack::generate_unnamed(); + auto actual_type_name = type_name_string::get(type_name); for_all_combinations(dimensions, diff --git a/tests/accessor/local_accessor_linearization_core.cpp b/tests/accessor/local_accessor_linearization_core.cpp index 72e88f841..633bef2aa 100644 --- a/tests/accessor/local_accessor_linearization_core.cpp +++ b/tests/accessor/local_accessor_linearization_core.cpp @@ -27,14 +27,16 @@ #include "accessor_common.h" #include "local_accessor_linearization.h" + +using namespace local_accessor_linearization; #endif namespace local_accessor_liniarization_core { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::local_accessor linearization. core types", "[accessor]")({ - using namespace local_accessor_linearization; - common_run_tests(); +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::local_accessor linearization. core types", "[accessor]", + test_combinations)({ + common_run_tests(); }); } // namespace local_accessor_liniarization_core diff --git a/tests/accessor/local_accessor_linearization_fp16.cpp b/tests/accessor/local_accessor_linearization_fp16.cpp index c8df59682..cb8f405f8 100644 --- a/tests/accessor/local_accessor_linearization_fp16.cpp +++ b/tests/accessor/local_accessor_linearization_fp16.cpp @@ -27,6 +27,8 @@ #include "accessor_common.h" #include "local_accessor_linearization.h" + +using namespace local_accessor_linearization; #endif #include "../common/disabled_for_test_case.h" @@ -34,9 +36,9 @@ namespace local_accessor_linearization_fp16 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::local_accessor linearization test. fp16 type", "[accessor]")({ - using namespace local_accessor_linearization; +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::local_accessor linearization test. fp16 type", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp16)) { WARN( @@ -46,10 +48,10 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray( - "sycl::half"); + for_type_vectors_marray("sycl::half"); #else - run_local_linearization_for_type{}("sycl::half"); + run_local_linearization_for_type{}("sycl::half"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); diff --git a/tests/accessor/local_accessor_linearization_fp64.cpp b/tests/accessor/local_accessor_linearization_fp64.cpp index ba8e1964c..2eabe6c8d 100644 --- a/tests/accessor/local_accessor_linearization_fp64.cpp +++ b/tests/accessor/local_accessor_linearization_fp64.cpp @@ -27,6 +27,8 @@ #include "accessor_common.h" #include "local_accessor_linearization.h" + +using namespace local_accessor_linearization; #endif #include "../common/disabled_for_test_case.h" @@ -34,9 +36,9 @@ namespace local_accessor_linearization_fp64 { -DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) -("sycl::local_accessor linearization test. fp64 type", "[accessor]")({ - using namespace local_accessor_linearization; +DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(hipSYCL, ComputeCpp) +("sycl::local_accessor linearization test. fp64 type", "[accessor]", + test_combinations)({ auto queue = sycl_cts::util::get_cts_object::queue(); if (!queue.get_device().has(sycl::aspect::fp64)) { WARN( @@ -46,9 +48,10 @@ DISABLED_FOR_TEST_CASE(hipSYCL, ComputeCpp) } #if SYCL_CTS_ENABLE_FULL_CONFORMANCE - for_type_vectors_marray("double"); + for_type_vectors_marray( + "double"); #else - run_local_linearization_for_type{}("double"); + run_local_linearization_for_type{}("double"); #endif // SYCL_CTS_ENABLE_FULL_CONFORMANCE }); diff --git a/tests/common/disabled_for_test_case.h b/tests/common/disabled_for_test_case.h index 0e880d6c6..c975ba8ab 100644 --- a/tests/common/disabled_for_test_case.h +++ b/tests/common/disabled_for_test_case.h @@ -11,6 +11,7 @@ // This is required for detecting the active SYCL implementation #include "macro_utils.h" +#include #include #include @@ -43,6 +44,9 @@ #define DISABLED_FOR_TEMPLATE_TEST_CASE_SIG(...) \ INTERNAL_CTS_DISABLED_FOR_TEMPLATE_TEST_CASE_SIG(__VA_ARGS__) +#define DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(...) \ + INTERNAL_CTS_DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(__VA_ARGS__) + // ------------------------------------------------------------------------------------ #if SYCL_CTS_COMPILING_WITH_COMPUTECPP @@ -146,4 +150,10 @@ INTERNAL_CTS_MAYBE_DISABLE_TEST_CASE( \ INTERNAL_CTS_ENABLED_TEMPLATE_TEST_CASE_SIG, __VA_ARGS__) +#define INTERNAL_CTS_ENABLED_TEMPLATE_LIST_TEST_CASE(...) \ + TEMPLATE_LIST_TEST_CASE(__VA_ARGS__) INTERNAL_CTS_ENABLED_TEST_CASE_BODY +#define INTERNAL_CTS_DISABLED_FOR_TEMPLATE_LIST_TEST_CASE(...) \ + INTERNAL_CTS_MAYBE_DISABLE_TEST_CASE( \ + INTERNAL_CTS_ENABLED_TEMPLATE_LIST_TEST_CASE, __VA_ARGS__) + #endif