memory release

This commit is contained in:
Francesco Gatti
2020-06-02 12:43:06 +02:00
parent 0458f361b1
commit 62e4a3f779
7 changed files with 20 additions and 5 deletions
+6
View File
@@ -197,6 +197,12 @@ void getMemUsage(double& vm_usage_kb, double& resident_set_kb){
resident_set_kb = rss * page_size_kb;
}
void printCudaMemUsage() {
size_t free, total;
checkCuda( cudaMemGetInfo(&free, &total) );
std::cout<<"GPU free memory: "<<double(free)/1e6<<" mb.\n";
}
void removePathAndExtension(const std::string &full_string, std::string &name){
name = full_string;
std::string tmp_str = full_string;