Lines Matching refs:num_buffers
173 uint8_t *getColdBuffer(int num_buffers, size_t incr, int alignment, int or_mask) {
174 uint8_t *buffers = reinterpret_cast<uint8_t*>(malloc(num_buffers * incr + 3 * alignment));
181 static inline double computeColdAverage(uint64_t time_ns, size_t size, size_t copies, size_t num_buffers) {
182 return ((size/1024.0) * copies * num_buffers) / ((double)time_ns/NS_PER_SEC);
185 static void inline printColdIter(uint64_t time_ns, const char *name, size_t size, size_t copies, size_t num_buffers, double avg) {
187 name, copies, num_buffers, size, (double)time_ns/NS_PER_SEC, avg/1024.0);
191 uint64_t /*time_ns*/, const char *name, size_t size, size_t copies, size_t num_buffers,
194 name, copies, num_buffers, size, running_avg/1024.0,
242 size_t num_strides = num_buffers / num_incrs; \
243 if ((num_buffers % num_incrs) != 0) { \
247 num_buffers = num_incrs * num_strides; \
248 if (num_buffers * size < static_cast<size_t>(cmd_data.data_size)) { \
249 copies = cmd_data.data_size / (num_buffers * size); \
262 computeColdAverage(time_ns, size, copies, num_buffers), \
263 printColdIter(time_ns, name, size, copies, num_buffers, avg), \
264 printColdSummary(time_ns, name, size, copies, num_buffers, \
317 size_t num_buffers = cmd_data.cold_data_size / incr; \
318 size_t buffer_size = num_buffers * incr; \
319 uint8_t *buffer = getColdBuffer(num_buffers, incr, cmd_data.dst_align, cmd_data.dst_or_mask); \
355 size_t num_buffers = cmd_data.cold_data_size / max_incr; \
356 size_t buffer1_size = num_buffers * buf1_incr; \
357 size_t buffer2_size = num_buffers * buf2_incr; \
358 uint8_t *buffer1 = getColdBuffer(num_buffers, buf1_incr, cmd_data.src_align, cmd_data.src_or_mask); \
361 uint8_t *buffer2 = getColdBuffer(num_buffers, buf2_incr, cmd_data.dst_align, cmd_data.dst_or_mask); \
483 for (size_t i =0; i < num_buffers; i++) { \
512 for (size_t i = 0; i < num_buffers; i++) { \
552 for (size_t i = 0; i < num_buffers; i++) { \
578 for (size_t i = 0; i < num_buffers; i++) { \