-Modified Dockerfile.base to cudagl

-Changed demo to take in input from demoConfig.yaml file
-Readme changes for demo.md
This commit is contained in:
perseusdg
2021-11-24 03:39:57 +05:30
parent a8c98e3c31
commit 9cecc5051a
11 changed files with 422 additions and 124 deletions
+16 -1
View File
@@ -6,6 +6,8 @@
#include <fstream>
#include <iomanip>
#include <stdlib.h>
#include <yaml-cpp/yaml.h>
#include "cuda.h"
#include "cuda_runtime_api.h"
@@ -16,7 +18,6 @@
#ifdef __linux__
#include <unistd.h>
#endif
#include <ios>
@@ -161,5 +162,19 @@ static inline bool isCudaPointer(void *data) {
return cudaPointerGetAttributes(&attr, data) == 0;
}
inline YAML::Node YAMLloadConf(const std::string& conf_file) {
std::cerr<<"Loading YAML: "<<conf_file<<"\n";
return YAML::LoadFile(conf_file);
}
template<typename T>
inline T YAMLgetConf(YAML::Node conf, std::string key, T defaultVal) {
T val = defaultVal;
if(conf && conf[key]) {
val = conf[key].as<T>();
}
return val;
}
#endif //UTILS_H