Skip to content

Commit 8c9c0ea

Browse files
committed
Address review comments
1 parent eb2f79b commit 8c9c0ea

File tree

4 files changed

+17
-7
lines changed

4 files changed

+17
-7
lines changed

sycl/include/sycl/ext/oneapi/experimental/graph.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
1818
#include <sycl/detail/string_view.hpp>
1919
#endif
20-
#include <sycl/device.hpp> // for device
20+
#include <sycl/device.hpp> // for device
2121
#include <sycl/ext/oneapi/experimental/detail/properties/graph_properties.hpp> // for graph properties classes
2222
#include <sycl/nd_range.hpp> // for range, nd_range
2323
#include <sycl/properties/property_traits.hpp> // for is_property, is_property_of

sycl/source/detail/graph_impl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2171,8 +2171,8 @@ size_t std::hash<sycl::ext::oneapi::experimental::node>::operator()(
21712171

21722172
size_t
21732173
std::hash<sycl::ext::oneapi::experimental::dynamic_command_group>::operator()(
2174-
const sycl::ext::oneapi::experimental::dynamic_command_group &DynamicCGH)
2174+
const sycl::ext::oneapi::experimental::dynamic_command_group &DynamicCG)
21752175
const {
2176-
auto ID = sycl::detail::getSyclObjImpl(DynamicCGH)->getID();
2176+
auto ID = sycl::detail::getSyclObjImpl(DynamicCG)->getID();
21772177
return std::hash<decltype(ID)>()(ID);
21782178
}

sycl/source/detail/graph_impl.hpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,7 @@ class graph_impl : public std::enable_shared_from_this<graph_impl> {
11201120
return MBarrierDependencyMap[Queue];
11211121
}
11221122

1123-
unsigned long long getID() { return MID; }
1123+
unsigned long long getID() const { return MID; }
11241124

11251125
private:
11261126
/// Iterate over the graph depth-first and run \p NodeFunc on each node.
@@ -1202,6 +1202,7 @@ class graph_impl : public std::enable_shared_from_this<graph_impl> {
12021202
MBarrierDependencyMap;
12031203

12041204
unsigned long long MID;
1205+
// Used for std::hash in order to create a unique hash for the instance.
12051206
inline static std::atomic<unsigned long long> NextAvailableID = 0;
12061207
};
12071208

@@ -1302,7 +1303,7 @@ class exec_graph_impl {
13021303

13031304
void updateImpl(std::shared_ptr<node_impl> NodeImpl);
13041305

1305-
unsigned long long getID() { return MID; }
1306+
unsigned long long getID() const { return MID; }
13061307

13071308
private:
13081309
/// Create a command-group for the node and add it to command-buffer by going
@@ -1417,6 +1418,7 @@ class exec_graph_impl {
14171418
std::multimap<node_impl::id_type, std::shared_ptr<node_impl>> MIDCache;
14181419

14191420
unsigned long long MID;
1421+
// Used for std::hash in order to create a unique hash for the instance.
14201422
inline static std::atomic<unsigned long long> NextAvailableID = 0;
14211423
};
14221424

@@ -1505,7 +1507,7 @@ class dynamic_parameter_impl {
15051507
int ArgIndex,
15061508
const sycl::detail::AccessorBaseHost *Acc);
15071509

1508-
unsigned long long getID() { return MID; }
1510+
unsigned long long getID() const { return MID; }
15091511

15101512
// Weak ptrs to node_impls which will be updated
15111513
std::vector<std::pair<std::weak_ptr<node_impl>, int>> MNodes;
@@ -1517,6 +1519,7 @@ class dynamic_parameter_impl {
15171519

15181520
private:
15191521
unsigned long long MID;
1522+
// Used for std::hash in order to create a unique hash for the instance.
15201523
inline static std::atomic<unsigned long long> NextAvailableID = 0;
15211524
};
15221525

@@ -1559,10 +1562,11 @@ class dynamic_command_group_impl
15591562
/// List of nodes using this dynamic command-group.
15601563
std::vector<std::weak_ptr<node_impl>> MNodes;
15611564

1562-
unsigned long long getID() { return MID; }
1565+
unsigned long long getID() const { return MID; }
15631566

15641567
private:
15651568
unsigned long long MID;
1569+
// Used for std::hash in order to create a unique hash for the instance.
15661570
inline static std::atomic<unsigned long long> NextAvailableID = 0;
15671571
};
15681572
} // namespace detail

sycl/test/abi/sycl_symbols_windows.dump

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,12 @@
334334
??0dynamic_parameter_base@detail@experimental@oneapi@ext@_V1@sycl@@QEAA@$$QEAV0123456@@Z
335335
??0dynamic_parameter_base@detail@experimental@oneapi@ext@_V1@sycl@@QEAA@AEBV0123456@@Z
336336
??0dynamic_parameter_base@detail@experimental@oneapi@ext@_V1@sycl@@QEAA@V?$command_graph@$0A@@23456@_KPEBX@Z
337+
??4?$hash@Vdynamic_command_group@experimental@oneapi@ext@_V1@sycl@@@std@@QEAAAEAU01@AEBU01@@Z
338+
??4?$hash@Vdynamic_command_group@experimental@oneapi@ext@_V1@sycl@@@std@@QEAAAEAU01@$$QEAU01@@Z
339+
??R?$hash@Vdynamic_command_group@experimental@oneapi@ext@_V1@sycl@@@std@@QEBA_KAEBVdynamic_command_group@experimental@oneapi@ext@_V1@sycl@@@Z
340+
??R?$hash@Vnode@experimental@oneapi@ext@_V1@sycl@@@std@@QEBA_KAEBVnode@experimental@oneapi@ext@_V1@sycl@@@Z
341+
??4?$hash@Vnode@experimental@oneapi@ext@_V1@sycl@@@std@@QEAAAEAU01@$$QEAU01@@Z
342+
??4?$hash@Vnode@experimental@oneapi@ext@_V1@sycl@@@std@@QEAAAEAU01@AEBU01@@Z
337343
??0event@_V1@sycl@@AEAA@V?$shared_ptr@Vevent_impl@detail@_V1@sycl@@@std@@@Z
338344
??0event@_V1@sycl@@QEAA@$$QEAV012@@Z
339345
??0event@_V1@sycl@@QEAA@AEBV012@@Z

0 commit comments

Comments
 (0)