This is a test plan for the APIs described in SYCL_EXT_ONEAPI_property_list.asciidoc
Tests are using compile-time properties from extension SYCL_EXT_ONEAPI_DEVICE_GLOBAL,
because of it test should be skipped if SYCL_EXT_ONEAPI_DEVICE_GLOBAL
is not defined.
Get prop_values from prop_lists:
property_list props1{device_image_scope_v};
auto prop_value1 = props.get_property<device_image_scope>();
property_list props2{host_access_v<A>};
where A = host_access::access::read, host_access::access::write, host_access::access::read_write, host_access::access::none
auto prop_value_A = props.get_property<host_access>();
Check that for prop_value1
members value
and value_t
are not available.
Check that for every A
prop_value_A
member value
is A
and member value_t
is host_access::access
.
Get prop_values from prop_lists:
property_list props1{device_image_scope_v};
auto prop_value_device_image_scope = props.get_property<device_image_scope>();
property_list props2{implement_in_csr_v<true>};
auto prop_value_implement_in_csr_true = props.get_property<implement_in_csr_v>();
property_list props3{implement_in_csr_v<false>};
auto prop_value_implement_in_csr_false = props.get_property<implement_in_csr_v>();
Check constexpr correctness if required and result for operators:
operator | first parameter | second parameter | result |
---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-
Create property_list with
property_list props{device_image_scope_v, implement_in_csr_v<true>}
-
Check that
is_property_list<decltype(props)>
isstd::true_type
-
Check that
is_property_list_v<decltype(props)>
istrue
-
Create custom class A
-
Check that
is_property_list<A>
isstd::false_type
-
Check that
is_property_list_v<A>
isfalse
-
Call property_list constructor
property_list P1{implement_in_csr_v<true>, device_image_scope_v}
-
Call property_list constructor
property_list P2{device_image_scope_v, implement_in_csr_v<true>}
-
Check that
std::is_same_v<decltype(P1), decltype(P2)>
istrue
.
-
Check that
is_property<device_image_scope>
isstd::true_type
-
Check that
is_property<host_access>
isstd::true_type
-
Check that
is_property<init_mode>
isstd::true_type
-
Check that
is_property<device_image_scope>
isstd::true_type
-
Check that
is_device_copyable<device_image_scope::value_t>
isstd::true_type
-
Check that
is_device_copyable<host_access::value_t<access::read>>
isstd::true_type
-
Check that
is_device_copyable<host_access::value_t<access::write>>
isstd::true_type
-
Check that
is_device_copyable<host_access::value_t<access::read_write>>
isstd::true_type
-
Check that
is_device_copyable<host_access::value_t<access::none>>
isstd::true_type
-
Check that
is_device_copyable<init_mode::value_t<trigger::reprogram>>
isstd::true_type
-
Check that
is_device_copyable<init_mode::value_t<trigger::reset>>
isstd::true_type
-
Check that
is_device_copyable<implement_in_csr::value_t<true>>
isstd::true_type
-
Check that
is_device_copyable<implement_in_csr::value_t<false>>
isstd::true_type
-
Create empty propery_list
property_list P1{}
-
Check that
is_device_copyable<decltype(P1)>
isstd::true_type