Hi! On 2020-01-30T16:45:39+0000, Andrew Stubbs <a...@codesourcery.com> wrote: > On 30/01/2020 16:08, Thomas Schwinge wrote: >> Andrew and Frederik, thanks for your emails reminding/educating me about >> 'snprintf' as well as this HSA fixed-size buffer API. There doesn't >> happen to be something available in the HSA API available so that we >> could use 'sizeof [something]' instead of hard-coding '64' etc.? > > No, not at present; hsa_agent_get_info_fn is a somewhat generic > interface that takes an enum and returns a void*. The return type is > written in the documentation: > https://rocm-documentation.readthedocs.io/en/latest/ROCm_API_References/ROCr-API.html#rocr-api > > However, we don't use the official ROCm header files, because > dependencies and licenses, so we could invent our own typedefs in hsa.h, > if we chose. I don't see that doing so would be worth the effort now, or > maintenance burden later.
ACK. I was just curious if there's an easy way to properly resolve this "magic numbers" issue now, once and for all. Apparently, there isn't -- which shall be fine, then. Grüße Thomas
signature.asc
Description: PGP signature