Commits for msvc 16.9

This commit is contained in:
hchandirasekar
2021-03-10 12:59:04 +05:30
parent 4a90314333
commit 6aa8666be5
4 changed files with 13 additions and 4 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fPIC -Wno-deprecated-declara
endif()
if(WIN32)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS "/O2 ")
set(CMAKE_CXX_FLAGS "/O2 /FS ")
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif(WIN32)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include/tkDNN)
+1 -1
View File
@@ -22,7 +22,7 @@ int main(int argc, char *argv[]) {
signal(SIGINT, sig_handler);
std::string net = "yolo3_berkeley.rt";
std::string net = "yolo4tiny_fp32.rt";
if(argc > 1)
net = argv[1];
std::string input = "../demo/yolo_test.mp4";
+1 -1
View File
@@ -18,7 +18,7 @@ inline int GET_BLOCKS(const int N)
}
__device__ float dmcn_im2col_bilinear(const float *bottom_data, const int data_width,
__device__ __host__ float dmcn_im2col_bilinear(const float *bottom_data, const int data_width,
const int height, const int width, float h, float w) {
int h_low = floor(h);
int w_low = floor(w);
+10 -1
View File
@@ -23,14 +23,23 @@ bool fileExist(const char *fname) {
void downloadWeightsifDoNotExist(const std::string& input_bin, const std::string& test_folder, const std::string& weights_url){
if(!fileExist(input_bin.c_str())){
std::string mkdir_cmd = "mkdir " + test_folder;
std::string wget_cmd = "wget " + weights_url + " -O " + test_folder + "/weights.zip";
std::string wget_cmd = "curl " + weights_url + " --output " + test_folder + "/weights.zip";
#ifdef __linux__
std::string unzip_cmd = "unzip " + test_folder + "/weights.zip -d" + test_folder;
std::string rm_cmd = "rm " + test_folder + "/weights.zip";
#elif _WIN32
std::string unzip_cmd = "7z x " + test_folder + "/weights.zip -o" + test_folder;
#endif
int err = 0;
err = system(mkdir_cmd.c_str());
err = system(wget_cmd.c_str());
err = system(unzip_cmd.c_str());
#ifdef __linux__
err = system(rm_cmd.c_str());
#endif
}
}