• Home
  • Raw
  • Download

Lines Matching refs:nbytes

44   const size_t nbytes = state.range(0);  in BM_string_memcmp()  local
50 char* src_aligned = GetAlignedPtrFilled(&src, src_alignment, nbytes, 'x'); in BM_string_memcmp()
51 char* dst_aligned = GetAlignedPtrFilled(&dst, dst_alignment, nbytes, 'x'); in BM_string_memcmp()
55 c += memcmp(dst_aligned, src_aligned, nbytes); in BM_string_memcmp()
58 state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes)); in BM_string_memcmp()
63 const size_t nbytes = state.range(0); in BM_string_memcpy() local
69 char* src_aligned = GetAlignedPtrFilled(&src, src_alignment, nbytes, 'x'); in BM_string_memcpy()
70 char* dst_aligned = GetAlignedPtr(&dst, dst_alignment, nbytes); in BM_string_memcpy()
73 memcpy(dst_aligned, src_aligned, nbytes); in BM_string_memcpy()
76 state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes)); in BM_string_memcpy()
81 const size_t nbytes = state.range(0); in BM_string_memmove_non_overlapping() local
87 char* src_aligned = GetAlignedPtrFilled(&src, src_alignment, nbytes, 'x'); in BM_string_memmove_non_overlapping()
88 char* dst_aligned = GetAlignedPtrFilled(&dst, dst_alignment, nbytes, 'y'); in BM_string_memmove_non_overlapping()
91 memmove(dst_aligned, src_aligned, nbytes); in BM_string_memmove_non_overlapping()
94 state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes)); in BM_string_memmove_non_overlapping()
99 const size_t nbytes = state.range(0); in BM_string_memmove_overlap_dst_before_src() local
102 std::vector<char> buf(3 * alignment + nbytes + 1, 'x'); in BM_string_memmove_overlap_dst_before_src()
103 char* buf_aligned = GetAlignedPtrFilled(&buf, alignment, nbytes + 1, 'x'); in BM_string_memmove_overlap_dst_before_src()
106 memmove(buf_aligned, buf_aligned + 1, nbytes); // Worst-case overlap. in BM_string_memmove_overlap_dst_before_src()
109 state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes)); in BM_string_memmove_overlap_dst_before_src()
114 const size_t nbytes = state.range(0); in BM_string_memmove_overlap_src_before_dst() local
118 char* buf_aligned = GetAlignedPtrFilled(&buf, alignment, nbytes + 1, 'x'); in BM_string_memmove_overlap_src_before_dst()
121 memmove(buf_aligned + 1, buf_aligned, nbytes); // Worst-case overlap. in BM_string_memmove_overlap_src_before_dst()
124 state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes)); in BM_string_memmove_overlap_src_before_dst()
129 const size_t nbytes = state.range(0); in BM_string_memset() local
133 char* buf_aligned = GetAlignedPtr(&buf, alignment, nbytes + 1); in BM_string_memset()
136 memset(buf_aligned, 0, nbytes); in BM_string_memset()
139 state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes)); in BM_string_memset()
144 const size_t nbytes = state.range(0); in BM_string_strlen() local
148 char* buf_aligned = GetAlignedPtrFilled(&buf, alignment, nbytes + 1, 'x'); in BM_string_strlen()
149 buf_aligned[nbytes - 1] = '\0'; in BM_string_strlen()
156 state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes)); in BM_string_strlen()
161 const size_t nbytes = state.range(0); in BM_string_strcat_copy_only() local
167 char* src_aligned = GetAlignedPtrFilled(&src, src_alignment, nbytes, 'x'); in BM_string_strcat_copy_only()
168 char* dst_aligned = GetAlignedPtr(&dst, dst_alignment, nbytes + 2); in BM_string_strcat_copy_only()
169 src_aligned[nbytes - 1] = '\0'; in BM_string_strcat_copy_only()
179 state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes)); in BM_string_strcat_copy_only()
184 const size_t nbytes = state.range(0); in BM_string_strcat_seek_only() local
191 char* dst_aligned = GetAlignedPtrFilled(&dst, dst_alignment, nbytes + 2, 'y'); in BM_string_strcat_seek_only()
193 dst_aligned[nbytes - 1] = '\0'; in BM_string_strcat_seek_only()
197 dst_aligned[nbytes - 1] = '\0'; in BM_string_strcat_seek_only()
200 state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes)); in BM_string_strcat_seek_only()
205 const size_t nbytes = state.range(0); in BM_string_strcat_half_copy_half_seek() local
211 char* src_aligned = GetAlignedPtrFilled(&src, src_alignment, nbytes / 2, 'x'); in BM_string_strcat_half_copy_half_seek()
212 char* dst_aligned = GetAlignedPtrFilled(&dst, dst_alignment, nbytes, 'y'); in BM_string_strcat_half_copy_half_seek()
213 src_aligned[nbytes / 2 - 1] = '\0'; in BM_string_strcat_half_copy_half_seek()
214 dst_aligned[nbytes / 2 - 1] = '\0'; in BM_string_strcat_half_copy_half_seek()
218 dst_aligned[nbytes / 2 - 1] = '\0'; in BM_string_strcat_half_copy_half_seek()
221 state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes)); in BM_string_strcat_half_copy_half_seek()
226 const size_t nbytes = state.range(0); in BM_string_strcpy() local
232 char* src_aligned = GetAlignedPtrFilled(&src, src_alignment, nbytes, 'x'); in BM_string_strcpy()
233 char* dst_aligned = GetAlignedPtr(&dst, dst_alignment, nbytes); in BM_string_strcpy()
234 src_aligned[nbytes - 1] = '\0'; in BM_string_strcpy()
240 state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes)); in BM_string_strcpy()
245 const size_t nbytes = state.range(0); in BM_string_strcmp() local
251 char* s1_aligned = GetAlignedPtrFilled(&s1, s1_alignment, nbytes, 'x'); in BM_string_strcmp()
252 char* s2_aligned = GetAlignedPtrFilled(&s2, s2_alignment, nbytes, 'x'); in BM_string_strcmp()
253 s1_aligned[nbytes - 1] = '\0'; in BM_string_strcmp()
254 s2_aligned[nbytes - 1] = '\0'; in BM_string_strcmp()
261 state.SetBytesProcessed(uint64_t(state.iterations()) * uint64_t(nbytes)); in BM_string_strcmp()