I wonder if pagelocked memory is visible from the cpu outside the .cu file.
To explain: I call a .cu file from a .cpp file. In .cu file i allocate some bytes of pinned memory where both cpu and gpu read and write.
Can I pass a pointer to that memory as parameter to the .cpp file and have access (read) to pinned memory or is it visible only inside .cu file?
The answer seems yes since the memory is pagelocked but so far I don’t have any success.
Any example code / pseudocode would help.
I have only one gpu.
I would like to see an example of how we can read/ write from .cpp file to pinned memory which has been allocated in a .cu file.
If all the code is in .cu file I did it, but I would like to be able to read/ write mapped memory from other functions / other files.
Could anyone post some code or some links to stg relative?