File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ size_t used_device_memory_start = used_device_memory;
3737CUDA_CHECK_MEMORY ();
3838const double to_MB = 1.0 / (1024.0 * 1024.0 );
3939double tot_memory_MB = (used_device_memory - used_device_memory_start) * to_MB;
40- double time_passed = std::chrono::duration_cast<std::chrono::nanoseconds>(( std::chrono::high_resolution_clock::now() - start_timer);
40+ double time_passed = std::chrono::duration< double >( std::chrono::high_resolution_clock::now() - start_timer).count( );
4141std::cout << " INFO: {{owner.name}} creation took " << time_passed << " s" ;
4242if (tot_memory_MB > 0 )
4343 std::cout << " and used " << tot_memory_MB << " MB of device memory." ;
Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ size_t used_device_memory_start = used_device_memory;
154154CUDA_CHECK_MEMORY();
155155const double to_MB = 1.0 / (1024.0 * 1024.0);
156156double tot_memory_MB = (used_device_memory - used_device_memory_start) * to_MB;
157- double time_passed = std::chrono::duration_cast<std::chrono::nanoseconds >(std::chrono::high_resolution_clock::now() - start_timer);
157+ double time_passed = std::chrono::duration<double >(std::chrono::high_resolution_clock::now() - start_timer).count( );
158158std::cout << "INFO: {{owner.name}} creation took " << time_passed << "s";
159159if (tot_memory_MB > 0)
160160 std::cout << " and used " << tot_memory_MB << "MB of memory.";
Original file line number Diff line number Diff line change @@ -977,7 +977,7 @@ __global__ void _before_run_kernel_{{codeobj_name}}(
977977 }
978978
979979 CUDA_CHECK_MEMORY ();
980- double time_passed = std::chrono::duration_cast<std::chrono::nanoseconds >(std::chrono::high_resolution_clock::now() - start_timer);
980+ double time_passed = std::chrono::duration< double >(std::chrono::high_resolution_clock::now() - start_timer).count( );
981981 std::cout << " INFO: {{owner.name}} initialisation took " << time_passed << " s" ;
982982 if (used_device_memory_after_dealloc < used_device_memory_start){
983983 size_t freed_bytes = used_device_memory_start - used_device_memory_after_dealloc;
You can’t perform that action at this time.
0 commit comments