Lines Matching refs:nbytes
29 static void BM_string_memcmp(int iters, int nbytes) { in BM_string_memcmp() argument
31 char* src = new char[nbytes]; char* dst = new char[nbytes]; in BM_string_memcmp()
32 memset(src, 'x', nbytes); in BM_string_memcmp()
33 memset(dst, 'x', nbytes); in BM_string_memcmp()
38 c += memcmp(dst, src, nbytes); in BM_string_memcmp()
42 SetBenchmarkBytesProcessed(int64_t(iters) * int64_t(nbytes)); in BM_string_memcmp()
48 static void BM_string_memcpy(int iters, int nbytes) { in BM_string_memcpy() argument
50 char* src = new char[nbytes]; char* dst = new char[nbytes]; in BM_string_memcpy()
51 memset(src, 'x', nbytes); in BM_string_memcpy()
55 memcpy(dst, src, nbytes); in BM_string_memcpy()
59 SetBenchmarkBytesProcessed(int64_t(iters) * int64_t(nbytes)); in BM_string_memcpy()
65 static void BM_string_memmove(int iters, int nbytes) { in BM_string_memmove() argument
67 char* buf = new char[nbytes + 64]; in BM_string_memmove()
68 memset(buf, 'x', nbytes + 64); in BM_string_memmove()
72 memmove(buf, buf + 1, nbytes); // Worst-case overlap. in BM_string_memmove()
76 SetBenchmarkBytesProcessed(int64_t(iters) * int64_t(nbytes)); in BM_string_memmove()
81 static void BM_string_memset(int iters, int nbytes) { in BM_string_memset() argument
83 char* dst = new char[nbytes]; in BM_string_memset()
87 memset(dst, 0, nbytes); in BM_string_memset()
91 SetBenchmarkBytesProcessed(int64_t(iters) * int64_t(nbytes)); in BM_string_memset()
96 static void BM_string_strlen(int iters, int nbytes) { in BM_string_strlen() argument
98 char* s = new char[nbytes]; in BM_string_strlen()
99 memset(s, 'x', nbytes); in BM_string_strlen()
100 s[nbytes - 1] = 0; in BM_string_strlen()
109 SetBenchmarkBytesProcessed(int64_t(iters) * int64_t(nbytes)); in BM_string_strlen()