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

Make Resource Constructor Explicit #150

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kab163
Copy link
Collaborator

@kab163 kab163 commented Apr 23, 2024

Currently, the resource test may be creating temporary Resource objects for certain tests instead of doing what we expect - so making the Resource constructor explicit.

However, this will require a change to the Reassignment test (and any user code which does a reassignment).

@kab163
Copy link
Collaborator Author

kab163 commented May 2, 2024

Hoping this PR can fix a couple of issues:

  • First, once the Resource constructor is explicit, some of the other operator overload functions could be added back in - see here. They had to be removed because the Host2 dummy struct in the resource test makes the context model initialize itself and confused the MSVC and SYCL compilers since it did not know how to resolve which operator overload to use for Host2 and Host in the following get and try_get calls.
  • Second, we are hoping that this will also resolve an issue in Umpire where the compiler does not know whether it should call allocate(Resource r, size_t bytes) or allocate("my_string", size_t bytes) since a char* can be converted to anything.

@kab163 kab163 marked this pull request as ready for review May 2, 2024 17:34
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.

1 participant