MCPcopy Create free account
hub / github.com/blender/cycles / string_human_readable_number

Function string_human_readable_number

src/util/string.cpp:294–319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292}
293
294string string_human_readable_number(size_t num)
295{
296 if (num == 0) {
297 return "0";
298 }
299
300 /* Add thousands separators. */
301 char buf[32];
302
303 char *p = buf + 31;
304 *p = '\0';
305
306 int i = -1;
307 while (num) {
308 i++;
309 if (i && i % 3 == 0) {
310 *(--p) = ',';
311 }
312
313 *(--p) = '0' + (num % 10);
314
315 num /= 10;
316 }
317
318 return p;
319}
320
321CCL_NAMESPACE_END

Callers 15

full_reportMethod · 0.85
device_updateMethod · 0.85
finish_write_tilesMethod · 0.85
runMethod · 0.85
init_host_memoryMethod · 0.85
generic_allocMethod · 0.85
mem_allocMethod · 0.85
mem_copy_toMethod · 0.85
mem_move_to_hostMethod · 0.85
mem_copy_fromMethod · 0.85
mem_zeroMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected