Skip to content

Conversation

martygrant
Copy link
Contributor

@martygrant martygrant commented Jun 5, 2025

Closes #18644

Some adapters had a count member in their structs with methods to modify, or a dedicated class which classes inherited from. I opted to create a new class UR_ReferenceCounter in /common/ur_ref_counter.hpp and added this as a member to any structs which had reference counting to follow preferring composition over inheritance. Happy to hear opinions on other ways of doing it.

Removes contextReleaseMutex from OpenCL urContextRelease which shouldn't be required.

Also added this across the Sanitizer layers.

@martygrant martygrant force-pushed the martin/commonReferenceCounting branch from dc52dce to bea539d Compare June 18, 2025 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UR] Unify reference counting helpers across adapters

1 participant