Lines Matching refs:bytes
49 void printspeed(char *caption, unsigned long bytes, double time) { in printspeed() argument
50 if (bytes / 1073741824UL > 0) { in printspeed()
51 printf("%s %.4f sec (%.3f GBps)\n", caption, time, (double)bytes/1073741824UL/time); in printspeed()
52 } else if (bytes / 1048576 > 0) { in printspeed()
53 printf("%s %.4f (%.3f MBps)\n", caption, time, (double)bytes/1048576/time); in printspeed()
54 } else if (bytes / 1024 > 0) { in printspeed()
55 printf("%s %.4f (%.3f KBps)\n", caption, time, (double)bytes/1024/time); in printspeed()
57 printf("%s %.4f (%f Bps)\n", caption, time, (double)bytes/time); in printspeed()
68 int bytes, blocks, rep, i, j; in main() local
78 bytes = 1024 * 1024 * 16; in main()
82 blocks = bytes / BUFSIZE; in main()
108 if (bytes % BUFSIZE) { in main()
109 SHA256_Update(&c256, (unsigned char*)buf, bytes % BUFSIZE); in main()
124 if (bytes % BUFSIZE) { in main()
125 SHA384_Update(&c384, (unsigned char*)buf, bytes % BUFSIZE); in main()
140 if (bytes % BUFSIZE) { in main()
141 SHA512_Update(&c512, (unsigned char*)buf, bytes % BUFSIZE); in main()
156 if (bytes / 1073741824UL > 0) { in main()
157 printf("TEST SET SIZE: %.3f GB\n", (double)bytes/1073741824UL); in main()
158 } else if (bytes / 1048576 > 0) { in main()
159 printf("TEST SET SIZE: %.3f MB\n", (double)bytes/1048576); in main()
160 } else if (bytes /1024 > 0) { in main()
161 printf("TEST SET SIZE: %.3f KB\n", (double)bytes/1024); in main()
163 printf("TEST SET SIZE: %d B\n", bytes); in main()
165 printspeed("SHA-256 average:", bytes, ave256); in main()
166 printspeed("SHA-256 best: ", bytes, best256); in main()
167 printspeed("SHA-384 average:", bytes, ave384); in main()
168 printspeed("SHA-384 best: ", bytes, best384); in main()
169 printspeed("SHA-512 average:", bytes, ave512); in main()
170 printspeed("SHA-512 best: ", bytes, best512); in main()