We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f42b4f4 commit 4adca2bCopy full SHA for 4adca2b
source/module_base/memory.cpp
@@ -234,10 +234,10 @@ double Memory::record_gpu
234
{
235
if(!Memory::init_flag_gpu)
236
237
- name_gpu = new std::string[n_memory + 2];
238
- class_name_gpu = new std::string[n_memory + 2];
239
- consume_gpu = new double[n_memory + 2];
240
- for(int i=0;i<n_memory + 2;i++)
+ name_gpu = new std::string[n_memory];
+ class_name_gpu = new std::string[n_memory];
+ consume_gpu = new double[n_memory];
+ for(int i=0;i<n_memory;i++)
241
242
consume_gpu[i] = 0.0;
243
}
0 commit comments