MCPcopy Create free account
hub / github.com/ModelEngine-Group/flexai / HexDump

Function HexDump

GPU-Virtual-Service/gpu-remoting/include/define.h:146–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144 }
145
146 inline void HexDump(const uint8_t* data, size_t size){
147 size_t pos = 0;
148 while (pos < size) {
149 printf("%#05zx: ", pos);
150 for (int i = 0; i < 16; i++) {
151 if (pos + i < size) {
152 printf("%02x", data[pos + i]);
153 } else {
154 printf(" ");
155 }
156 if (i % 4 == 3) {
157 printf(" ");
158 }
159 }
160 printf(" | ");
161 for (int i = 0; i < 16; i++) {
162 if (pos + i < size) {
163 if (data[pos + i] >= 0x20 && data[pos + i] <= 0x7e) {
164 printf("%c", data[pos + i]);
165 } else {
166 printf(".");
167 }
168 } else {
169 printf(" ");
170 }
171 }
172 printf("\n");
173 pos += 16;
174 }
175 }
176
177 inline void PrintStackTrace(const std::string& filename, bool append = false) {
178 const int maxFrames = 128; // max number of frames in the stack trace

Callers 2

DecompressFatbinFunction · 0.85
DecompressSingleSectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected