@@ -36,10 +36,36 @@ class node;
36
36
namespace property ::node {
37
37
class depends_on ;
38
38
} // namespace property::node
39
- // Graph property trait specializations.
40
- enum class graph_state ;
39
+
40
+ // / State to template the command_graph class on.
41
+ enum class graph_state {
42
+ modifiable, // /< In modifiable state, commands can be added to graph.
43
+ executable, // /< In executable state, the graph is ready to execute.
44
+ };
45
+
41
46
template <graph_state State> class command_graph ;
42
47
48
+ namespace detail {
49
+ inline void checkGraphPropertiesAndThrow (const property_list &Properties) {
50
+ static auto CheckDataLessProperties = [](int PropertyKind) -> bool {
51
+ #define __SYCL_DATA_LESS_PROP (NS_QUALIFIER, PROP_NAME, ENUM_VAL ) \
52
+ case NS_QUALIFIER::PROP_NAME::getKind (): \
53
+ return true ;
54
+ #define __SYCL_MANUALLY_DEFINED_PROP (NS_QUALIFIER, PROP_NAME )
55
+ switch (PropertyKind) {
56
+ #include < sycl/ext/oneapi/experimental/detail/properties/graph_properties.def>
57
+
58
+ default :
59
+ return false ;
60
+ }
61
+ };
62
+ // No properties with data for graph now.
63
+ static auto NoAllowedPropertiesCheck = [](int ) -> bool { return false ; };
64
+ sycl::detail::PropertyValidator::checkPropsAndThrow (
65
+ Properties, CheckDataLessProperties, NoAllowedPropertiesCheck);
66
+ }
67
+ } // namespace detail
68
+
43
69
} // namespace experimental
44
70
} // namespace oneapi
45
71
} // namespace ext
0 commit comments