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

performance improvement

parent 8b077d5f
No related branches found
No related tags found
No related merge requests found
...@@ -113,7 +113,7 @@ namespace rlib { ...@@ -113,7 +113,7 @@ namespace rlib {
private: private:
__host__ void apply_new_cap() { __host__ void apply_new_cap() {
void *new_mem; void *new_mem;
rlib::cuda_assert(cudaMallocManaged(&new_mem, cap)); rlib::cuda_assert(cudaMalloc(&new_mem, cap));
if(new_mem == nullptr) if(new_mem == nullptr)
throw std::runtime_error("Failed to allocate memory."); throw std::runtime_error("Failed to allocate memory.");
if(mem != nullptr) { if(mem != nullptr) {
...@@ -125,7 +125,7 @@ namespace rlib { ...@@ -125,7 +125,7 @@ namespace rlib {
__device__ bool dev_apply_new_cap() { __device__ bool dev_apply_new_cap() {
void *new_mem = nullptr; void *new_mem = nullptr;
rlib::dev_cuda_assert(cudaMallocManaged(&new_mem, cap)); rlib::dev_cuda_assert(cudaMalloc(&new_mem, cap));
if(new_mem == nullptr) if(new_mem == nullptr)
return false; return false;
if(mem != nullptr) { if(mem != nullptr) {
......
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