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

Implement a safe mapped memory wrapper #12

Closed
c0gent opened this issue Feb 28, 2016 · 1 comment
Closed

Implement a safe mapped memory wrapper #12

c0gent opened this issue Feb 28, 2016 · 1 comment

Comments

@c0gent
Copy link
Member

c0gent commented Feb 28, 2016

... to handle any host memory mapped to a buffer or image object on the device.

The enqueue_map... functions are currently returning pointers and leaving it completely to the caller. It's also currently possible to map some memory by setting the right flags when creating a buffer or image. Doing this just leaves everything in the hands of the caller (should probably error if either of the mapping CL_MEM_ flags are on to prevent this for now -- or at least provide something else in the way of warnings as it's not marked unsafe to create either mem object).

This new type should automatically track any pending reads and writes as well as ensure that all commands related to it have completed before unmapping and dropping.

@c0gent
Copy link
Member Author

c0gent commented Apr 6, 2017

Done: MemMap

@c0gent c0gent closed this as completed Apr 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant