alpaka
alpaka copied to clipboard
Improve implicit sharing in `BufCpu`
Discussion brought up in https://github.com/alpaka-group/alpaka/pull/1127#discussion_r518619180_ .
@j-stephan is this still relevent since Omp5 and Oacc backends have been dropped?
I think it can be closed.
This does still affect BufCpu
, which has a shared private implementation pointer which is public.
So this issue is about the shared pointer inside a BufCpu
to be public
?
So this issue is about the shared pointer inside a
BufCpu
to bepublic
?
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.