Skip to content
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

[SYCLomatic] null_type #528

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions clang/runtime/dpct-rt/include/dpl_extras/functional.h.inc
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@

namespace dpct {

// DPCT_LABEL_BEGIN|null_type|dpct
// DPCT_DEPENDENCY_EMPTY
// DPCT_CODE
struct null_type {};
// DPCT_LABEL_END

namespace internal {

// DPCT_LABEL_BEGIN|enable_if_execution_policy|dpct::internal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

namespace dpct {

struct null_type {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this PR doesn't show the use of null_type{}. So not sure how it is used and why it is necessary to add null_type.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just added a new PR into SYCLomatic-test which shows the intended usage of dpct::null_type.

oneapi-src/SYCLomatic-test#219

It will also likely be used in future dpct helper header APIs to a similar effect.


namespace internal {

template <class _ExecPolicy, class _T>
Expand Down