alpaka icon indicating copy to clipboard operation
alpaka copied to clipboard

Improve implicit sharing in `BufCpu`

Open jkelling opened this issue 4 years ago • 5 comments

Discussion brought up in https://github.com/alpaka-group/alpaka/pull/1127#discussion_r518619180_ .

jkelling avatar Nov 12 '20 14:11 jkelling

@j-stephan is this still relevent since Omp5 and Oacc backends have been dropped?

bernhardmgruber avatar Aug 07 '23 14:08 bernhardmgruber

I think it can be closed.

j-stephan avatar Aug 07 '23 14:08 j-stephan

This does still affect BufCpu, which has a shared private implementation pointer which is public.

jkelling avatar Aug 07 '23 14:08 jkelling

So this issue is about the shared pointer inside a BufCpu to be public?

bernhardmgruber avatar Aug 07 '23 14:08 bernhardmgruber

So this issue is about the shared pointer inside a BufCpu to be public?

The shared pointer should be private, not part of the public interface. This requires, though, that there either is a public interface for trait implementations to use, or they need to be friends. This is the reason, why this is an open issue and not a quick fix ... could be part of some larger refactoring.

Making trait implementations friends, would not defeat the purpose here, as the purpose is to keep user code from using implementation details directly.

jkelling avatar Aug 07 '23 14:08 jkelling