One of the unused ident_t fields now holds the size of the string
(=const char *) field so we have an easier time dealing with those
in the future.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
We have a device pointer to an ident_t object. We don't know the corresponding host address and we are on the host. We can copy over the ident_t with a single d2h but for the string we now need to either launch a kernel that computes strlen on the device or copy it byte-by-byte, neither are good options. Instead, we can simply embed the string length in the otherwise unused ident_t field and copy it over with a second d2h memcpy.