MCPcopy Create free account
hub / github.com/AIS-SNU/Smart-Infinity / read_binary_file

Function read_binary_file

hls_smartInfinity/src/host/host_step_sgd.cpp:108–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106 }
107
108 char* read_binary_file(const std::string &xclbin_file_name, unsigned &nb)
109 {
110 std::cout << "INFO: Reading " << xclbin_file_name << std::endl;
111
112 if(access(xclbin_file_name.c_str(), R_OK) != 0) {
113 printf("ERROR: %s xclbin not available please build\n", xclbin_file_name.c_str());
114 exit(EXIT_FAILURE);
115 }
116 //Loading XCL Bin into char buffer
117 std::cout << "Loading: '" << xclbin_file_name.c_str() << "'\n";
118 std::ifstream bin_file(xclbin_file_name.c_str(), std::ifstream::binary);
119 bin_file.seekg (0, bin_file.end);
120 nb = bin_file.tellg();
121 bin_file.seekg (0, bin_file.beg);
122 char *buf = new char [nb];
123 bin_file.read(buf, nb);
124 return buf;
125 }
126};
127
128void sgd_CPU(

Callers

nothing calls this directly

Calls 1

readMethod · 0.80

Tested by

no test coverage detected