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

Change SYCLInternal::m_queue std::unique_ptr -> std::optional #3677

Merged
merged 1 commit into from
Dec 18, 2020

Conversation

nliber
Copy link
Contributor

@nliber nliber commented Dec 17, 2020

In SYCLInternal, changed m_queue from a unique_ptr<sycl::queue> to an optional<sycl::queue>.

Ideally, it should just be a sycl::queue directly, but given
current issues with assignability under SYCL+CUDA, this is
the best we can do right now.

Because it was initially developed under C++14, unique_ptr
was used (as optional wasn't there), but it is better to
have fewer heap allocations, instead of unnecessary ones.

to an optional<sycl::queue>.

Ideally, it should just be a sycl::queue directly, but given
current issues with assignability under SYCL+CUDA, this is
the best we can do right now.

Because it was initially developed under C++14, unique_ptr
was used (as optional wasn't there), but it is better to
have fewer heap allocations, instead of unnecessary ones.
Copy link
Contributor

@masterleinad masterleinad left a comment

Choose a reason for hiding this comment

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

Fine with me.

@dalg24 dalg24 merged commit f905b7f into kokkos:develop Dec 18, 2020
@dalg24 dalg24 changed the title Make SYCLInternal::m_queue optional Change SYCLInternal::m_queue std::unique_ptr -> std::optional Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants