@@ -514,21 +514,21 @@ class State {
514514 //
515515 // REQUIRES: a benchmark has exited its benchmarking loop.
516516 BENCHMARK_ALWAYS_INLINE
517- void SetBytesProcessed (size_t bytes) { bytes_processed_ = bytes; }
517+ void SetBytesProcessed (int64_t bytes) { bytes_processed_ = bytes; }
518518
519519 BENCHMARK_ALWAYS_INLINE
520- size_t bytes_processed () const { return bytes_processed_; }
520+ int64_t bytes_processed () const { return bytes_processed_; }
521521
522522 // If this routine is called with complexity_n > 0 and complexity report is
523523 // requested for the
524524 // family benchmark, then current benchmark will be part of the computation
525525 // and complexity_n will
526526 // represent the length of N.
527527 BENCHMARK_ALWAYS_INLINE
528- void SetComplexityN (int complexity_n) { complexity_n_ = complexity_n; }
528+ void SetComplexityN (int64_t complexity_n) { complexity_n_ = complexity_n; }
529529
530530 BENCHMARK_ALWAYS_INLINE
531- int complexity_length_n () { return complexity_n_; }
531+ int64_t complexity_length_n () { return complexity_n_; }
532532
533533 // If this routine is called with items > 0, then an items/s
534534 // label is printed on the benchmark report line for the currently
@@ -537,10 +537,10 @@ class State {
537537 //
538538 // REQUIRES: a benchmark has exited its benchmarking loop.
539539 BENCHMARK_ALWAYS_INLINE
540- void SetItemsProcessed (size_t items) { items_processed_ = items; }
540+ void SetItemsProcessed (int64_t items) { items_processed_ = items; }
541541
542542 BENCHMARK_ALWAYS_INLINE
543- size_t items_processed () const { return items_processed_; }
543+ int64_t items_processed () const { return items_processed_; }
544544
545545 // If this routine is called, the specified label is printed at the
546546 // end of the benchmark report line for the currently executing
@@ -562,16 +562,16 @@ class State {
562562
563563 // Range arguments for this run. CHECKs if the argument has been set.
564564 BENCHMARK_ALWAYS_INLINE
565- int range (std::size_t pos = 0 ) const {
565+ int64_t range (std::size_t pos = 0 ) const {
566566 assert (range_.size () > pos);
567567 return range_[pos];
568568 }
569569
570570 BENCHMARK_DEPRECATED_MSG (" use 'range(0)' instead" )
571- int range_x () const { return range (0 ); }
571+ int64_t range_x () const { return range (0 ); }
572572
573573 BENCHMARK_DEPRECATED_MSG (" use 'range(1)' instead" )
574- int range_y () const { return range (1 ); }
574+ int64_t range_y () const { return range (1 ); }
575575
576576 BENCHMARK_ALWAYS_INLINE
577577 size_t iterations () const {
@@ -598,12 +598,12 @@ class State {
598598 bool error_occurred_;
599599
600600private: // items we don't need on the first cache line
601- std::vector<int > range_;
601+ std::vector<int64_t > range_;
602602
603- size_t bytes_processed_;
604- size_t items_processed_;
603+ int64_t bytes_processed_;
604+ int64_t items_processed_;
605605
606- int complexity_n_;
606+ int64_t complexity_n_;
607607
608608 public:
609609 // Container for user-defined counters.
@@ -615,7 +615,7 @@ class State {
615615
616616
617617 // TODO(EricWF) make me private
618- State (size_t max_iters, const std::vector<int >& ranges, int thread_i,
618+ State (size_t max_iters, const std::vector<int64_t >& ranges, int thread_i,
619619 int n_threads, internal::ThreadTimer* timer,
620620 internal::ThreadManager* manager);
621621
@@ -736,31 +736,31 @@ class Benchmark {
736736 // Run this benchmark once with "x" as the extra argument passed
737737 // to the function.
738738 // REQUIRES: The function passed to the constructor must accept an arg1.
739- Benchmark* Arg (int x);
739+ Benchmark* Arg (int64_t x);
740740
741741 // Run this benchmark with the given time unit for the generated output report
742742 Benchmark* Unit (TimeUnit unit);
743743
744744 // Run this benchmark once for a number of values picked from the
745745 // range [start..limit]. (start and limit are always picked.)
746746 // REQUIRES: The function passed to the constructor must accept an arg1.
747- Benchmark* Range (int start, int limit);
747+ Benchmark* Range (int64_t start, int64_t limit);
748748
749749 // Run this benchmark once for all values in the range [start..limit] with
750750 // specific step
751751 // REQUIRES: The function passed to the constructor must accept an arg1.
752- Benchmark* DenseRange (int start, int limit, int step = 1 );
752+ Benchmark* DenseRange (int64_t start, int64_t limit, int step = 1 );
753753
754754 // Run this benchmark once with "args" as the extra arguments passed
755755 // to the function.
756756 // REQUIRES: The function passed to the constructor must accept arg1, arg2 ...
757- Benchmark* Args (const std::vector<int >& args);
757+ Benchmark* Args (const std::vector<int64_t >& args);
758758
759759 // Equivalent to Args({x, y})
760760 // NOTE: This is a legacy C++03 interface provided for compatibility only.
761761 // New code should use 'Args'.
762- Benchmark* ArgPair (int x, int y) {
763- std::vector<int > args;
762+ Benchmark* ArgPair (int64_t x, int64_t y) {
763+ std::vector<int64_t > args;
764764 args.push_back (x);
765765 args.push_back (y);
766766 return Args (args);
@@ -769,7 +769,7 @@ class Benchmark {
769769 // Run this benchmark once for a number of values picked from the
770770 // ranges [start..limit]. (starts and limits are always picked.)
771771 // REQUIRES: The function passed to the constructor must accept arg1, arg2 ...
772- Benchmark* Ranges (const std::vector<std::pair<int , int > >& ranges);
772+ Benchmark* Ranges (const std::vector<std::pair<int64_t , int64_t > >& ranges);
773773
774774 // Equivalent to ArgNames({name})
775775 Benchmark* ArgName (const std::string& name);
@@ -781,8 +781,8 @@ class Benchmark {
781781 // Equivalent to Ranges({{lo1, hi1}, {lo2, hi2}}).
782782 // NOTE: This is a legacy C++03 interface provided for compatibility only.
783783 // New code should use 'Ranges'.
784- Benchmark* RangePair (int lo1, int hi1, int lo2, int hi2) {
785- std::vector<std::pair<int , int > > ranges;
784+ Benchmark* RangePair (int64_t lo1, int64_t hi1, int64_t lo2, int64_t hi2) {
785+ std::vector<std::pair<int64_t , int64_t > > ranges;
786786 ranges.push_back (std::make_pair (lo1, hi1));
787787 ranges.push_back (std::make_pair (lo2, hi2));
788788 return Ranges (ranges);
@@ -889,15 +889,13 @@ class Benchmark {
889889
890890 int ArgsCnt () const ;
891891
892- static void AddRange (std::vector<int >* dst, int lo, int hi, int mult);
893-
894892 private:
895893 friend class BenchmarkFamilies ;
896894
897895 std::string name_;
898896 ReportMode report_mode_;
899897 std::vector<std::string> arg_names_; // Args for all benchmark runs
900- std::vector<std::vector<int > > args_; // Args for all benchmark runs
898+ std::vector<std::vector<int64_t > > args_; // Args for all benchmark runs
901899 TimeUnit time_unit_;
902900 int range_multiplier_;
903901 double min_time_;
0 commit comments