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

Function read_binary_file

hls_smartInfinity/src/host/host_step_adam.cpp:111–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

readMethod · 0.80

Tested by

no test coverage detected