MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / xsum_large_display

Function xsum_large_display

xs/sources/xsum.c:2493–2515  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2491/* DISPLAY A LARGE ACCUMULATOR. */
2492
2493void xsum_large_display (xsum_large_accumulator *restrict lacc)
2494{
2495 int i, dots;
2496 c_printf("Large accumulator:\n");
2497 dots = 0;
2498 for (i = XSUM_LCHUNKS-1; i >= 0; i--)
2499 { if (lacc->count[i] < 0)
2500 { if (!dots) c_printf(" ...\n");
2501 dots = 1;
2502 }
2503 else
2504 { c_printf ("%c%4d %5d ", i & 0x800 ? '-' : '+', i & 0x7ff, lacc->count[i]);
2505 pbinary_int64 ((int64_t) lacc->chunk[i] >> 32, XSUM_LCHUNK_BITS-32);
2506 c_printf(" ");
2507 pbinary_int64 ((int64_t) lacc->chunk[i] & 0xffffffff, 32);
2508 c_printf ("\n");
2509 dots = 0;
2510 }
2511 }
2512 c_printf("\nWithin large accumulator: ");
2513 xsum_small_display (&lacc->sacc);
2514
2515}
2516
2517
2518/* RETURN NUMBER OF CHUNKS IN USE IN LARGE ACCUMULATOR. */

Callers

nothing calls this directly

Calls 1

xsum_small_displayFunction · 0.85

Tested by

no test coverage detected