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

Array library GPU device memory abstraction #41

Closed
kknox opened this issue May 24, 2015 · 1 comment
Closed

Array library GPU device memory abstraction #41

kknox opened this issue May 24, 2015 · 1 comment
Milestone

Comments

@kknox
Copy link
Contributor

kknox commented May 24, 2015

The library is providing interfaces for both cl1.2 and cl2.0, and these two interfaces have very different memory buffer management API's. The library has attempted to abstract the differences between these API's with an internal class called clMemRAII, but we can do better. clMemRAII is being upgraded over time with new functionality, but it is not growing very gracefully. It is treating buffer allocation and mapping device memory as 'the same'.

We would like to treat device memory as any old array of data from the hosts perspective, and we can create a clsparse::array class that implements the same interface as std::array. The primary difference would be that clsparse::array would encapsulate device memory, and we could access that memory through the host by using iterators (with all the expected performance degradations but at least the memory is easy to use and manage). With proper use of c++11/14 constructors, move semantics, operator='s and iterators, management of device memory could be as easy as host memory.

@kknox kknox modified the milestone: clSPARSE Beta Jun 4, 2015
@kknox
Copy link
Contributor Author

kknox commented Jun 16, 2015

I think the spirit of this enhancement has been merged into the codebase already. cl2.0 support is not yet present in the clsparse::vector class, but I think we should track that in a seperate issue.

@kknox kknox closed this as completed Jun 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant