Skip to content

Commit e78c2e2

Browse files
Split graph.hpp, graph_impl.hpp and graph_impl.cpp into multiple files
1 parent b437083 commit e78c2e2

File tree

13 files changed

+2133
-1866
lines changed

13 files changed

+2133
-1866
lines changed

sycl/include/sycl/ext/oneapi/experimental/detail/properties/graph_properties.hpp

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,36 @@ class node;
3636
namespace property::node {
3737
class depends_on;
3838
} // 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+
4146
template <graph_state State> class command_graph;
4247

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+
4369
} // namespace experimental
4470
} // namespace oneapi
4571
} // namespace ext

0 commit comments

Comments
 (0)