Why does CUDA printf not support “%.*s”?

(asked originally on StackOverflow)

The CUDA programming guide tells us that CUDA printf() supports setting the minimum width of fields with an argument (e.g. printf(“%*d”, width, num)) , but does not support setting the precision with an argument (e.g. printf("%.*s, num_chars, str) ).

Why is that?

It’s not very realistic to expect NVIDIA to explain details of design decisions upon request. If you want this feature, just file an enhancement request.

1 Like

Sure it is. Everybody should explain their design decisions upon (reasonable) request.

But it is true that NVIDIA tends not to be very forthcoming about its decisions. Still, better to ask and be rebuffed than to miss some obvious reason. Plus, some people might be able to speculate.

This must be in some alternate universe. But you can certainly try, as you point out. What would you do with the information in the unlikely case that you receive a response from NVIDIA?

I am curious: What was the success ratio when you asked vendors for their reasoning behind design decisions made for other products (hardware or software) you are using?

1 Like

What would you do with the information in the unlikely case that you receive a response from NVIDIA?

It might have made me realize it is unwise/unrealistic to expect this to be implemented in the first place

What was the success ratio when you asked vendors…

I (mostly) don’t ask vendors, I ask people. And while I don’t keep track, the ratio is low, but not incredibly low.