-
Notifications
You must be signed in to change notification settings - Fork 753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SYCL][Graph] Add common reference semantics #16788
base: sycl
Are you sure you want to change the base?
Conversation
d1ac215
to
8a2571d
Compare
8a2571d
to
e786630
Compare
e786630
to
c547e3f
Compare
sycl/source/detail/graph_impl.cpp
Outdated
|
||
size_t | ||
std::hash<sycl::ext::oneapi::experimental::dynamic_command_group>::operator()( | ||
const sycl::ext::oneapi::experimental::dynamic_command_group &DynamicCGH) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const sycl::ext::oneapi::experimental::dynamic_command_group &DynamicCGH) | |
const sycl::ext::oneapi::experimental::dynamic_command_group &DynamicCG) |
sycl/source/detail/graph_impl.hpp
Outdated
unsigned long long getID() { return MID; } | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think this function can be const, also applies to same function in other classes.
sycl/source/detail/graph_impl.hpp
Outdated
unsigned long long MID; | ||
inline static std::atomic<unsigned long long> NextAvailableID = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit but I think it's worth having a comment for these that they are only used for std::hash
@@ -17,7 +17,7 @@ | |||
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES | |||
#include <sycl/detail/string_view.hpp> | |||
#endif | |||
#include <sycl/device.hpp> // for device | |||
#include <sycl/device.hpp> // for device |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This formatting change doesn't seem to match the rest, are we sure it is correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran clang-format on the file and it changed that line. But there is no point in changing that unrelated comment so I reverted that change.
@@ -0,0 +1,194 @@ | |||
//==----------------------- CommandGraph.cpp -------------------------------==// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CommonReferenceSemantics.cpp
sycl::queue Queue; | ||
experimental::command_graph Graph(Queue.get_context(), Queue.get_device()); | ||
|
||
auto factory = [&]() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Factor
more consistent variable naming
* @param objFactory A function object that returns an object to be tested. | ||
*/ | ||
template <typename T, typename LambdaType> | ||
void testSemantics(LambdaType &&objFactory) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
void testSemantics(LambdaType &&objFactory) { | |
void testSemantics(LambdaType &&ObjFactory) { |
and the doxy comment
Adds missing common reference semantic functionality such as operator==, operator!= and hash functions to all sycl graph related classes.
1db12ad
to
8c9c0ea
Compare
Adds missing common reference semantic functionality such as operator==, operator!= and hash functions to all sycl graph related classes.