diff options
author | Per Åstrand <per.astrand@arm.com> | 2020-09-25 15:04:26 +0200 |
---|---|---|
committer | Per Åstrand <per.astrand@arm.com> | 2020-09-25 15:05:13 +0200 |
commit | 91a91738c0d7f4128edd5f2806b6b5292a698608 (patch) | |
tree | cf885fb08c8e5c0a5a3b2c2f26bb5906c9446886 /applications/message_process/src | |
parent | 72fa50bcf362643431c39642e5af30781714b2fc (diff) | |
download | ethos-u-core-software-91a91738c0d7f4128edd5f2806b6b5292a698608.tar.gz |
Move to inttypes format specifiers for printf
Change-Id: I799add461ab0db5b86c78a440937d722620e6d3b
Diffstat (limited to 'applications/message_process/src')
-rw-r--r-- | applications/message_process/src/message_process.cc | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/applications/message_process/src/message_process.cc b/applications/message_process/src/message_process.cc index b201f32..db8b446 100644 --- a/applications/message_process/src/message_process.cc +++ b/applications/message_process/src/message_process.cc @@ -21,6 +21,7 @@ #include <cstddef> #include <cstdio> #include <cstring> +#include <inttypes.h> using namespace std; using namespace InferenceProcess; @@ -150,7 +151,7 @@ bool MessageProcess::handleMessage() { return false; } - printf("Message. type=%u, length=%u\n", msg.type, msg.length); + printf("Message. type=%" PRIu32 ", length=%" PRIu32 "\n", msg.type, msg.length); // Read payload if (!queueIn.read(data.data, msg.length)) { @@ -168,25 +169,28 @@ bool MessageProcess::handleMessage() { ethosu_core_inference_req &req = data.inferenceReq; - printf("InferenceReq. user_arg=0x%x, network={0x%x, %u}", req.user_arg, req.network.ptr, req.network.size); + printf("InferenceReq. user_arg=0x%" PRIx64 ", network={0x%" PRIu32 ", %" PRIu32 "}", + req.user_arg, + req.network.ptr, + req.network.size); - printf(", ifm_count=%u, ifm=[", req.ifm_count); + printf(", ifm_count=%" PRIu32 ", ifm=[", req.ifm_count); for (uint32_t i = 0; i < req.ifm_count; ++i) { if (i > 0) { printf(", "); } - printf("{0x%x, %u}", req.ifm[i].ptr, req.ifm[i].size); + printf("{0x%" PRIx32 ", %" PRIu32 "}", req.ifm[i].ptr, req.ifm[i].size); } printf("]"); - printf(", ofm_count=%u, ofm=[", req.ofm_count); + printf(", ofm_count=%" PRIu32 ", ofm=[", req.ofm_count); for (uint32_t i = 0; i < req.ofm_count; ++i) { if (i > 0) { printf(", "); } - printf("{0x%x, %u}", req.ofm[i].ptr, req.ofm[i].size); + printf("{0x%" PRIx32 ", %" PRIu32 "}", req.ofm[i].ptr, req.ofm[i].size); } printf("]\n"); @@ -235,7 +239,7 @@ void MessageProcess::sendInferenceRsp(uint64_t userArg, vector<DataPtr> &ofm, bo rsp.ofm_size[i] = ofm[i].size; } - printf("Sending inference response. userArg=0x%llx, ofm_count=%u, status=%u\n", + printf("Sending inference response. userArg=0x%" PRIx64 ", ofm_count=%" PRIu32 ", status=%" PRIu32 "\n", rsp.user_arg, rsp.ofm_count, rsp.status); |