Skip to content
Snippets Groups Projects
Unverified Commit 4697ee36 authored by Recolic Keghart's avatar Recolic Keghart
Browse files

performance improvement

parent 76001f29
No related branches found
No related tags found
No related merge requests found
...@@ -17,7 +17,8 @@ namespace rlib { ...@@ -17,7 +17,8 @@ namespace rlib {
appendable_stdlayout_array() appendable_stdlayout_array()
: m_size(0), cap(0), mem(nullptr) { : m_size(0), cap(0), mem(nullptr) {
rlib::cuda_assert(cudaMalloc(&pLock, sizeof(int))); rlib::cuda_assert(cudaMallocManaged(&pLock, sizeof(int)));
*pLock = 0;
} }
// host-only function. we can write the device-only version easily but not necessary. // host-only function. we can write the device-only version easily but not necessary.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment