Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Side by Side Diff: bench/SortBench.cpp

Issue 1313203003: Remove include of stdlib.h from SkTypes.h. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Clean up qsort conversion. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | bench/nanobench.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "Benchmark.h" 8 #include "Benchmark.h"
9 #include "SkRandom.h" 9 #include "SkRandom.h"
10 #include "SkString.h" 10 #include "SkString.h"
11 #include "SkTSort.h" 11 #include "SkTSort.h"
12 12
13 #include <stdlib.h>
14
13 static const int N = 1000; 15 static const int N = 1000;
14 16
15 static void rand_proc(int array[N]) { 17 static void rand_proc(int array[N]) {
16 SkRandom rand; 18 SkRandom rand;
17 for (int i = 0; i < N; ++i) { 19 for (int i = 0; i < N; ++i) {
18 array[i] = rand.nextS(); 20 array[i] = rand.nextS();
19 } 21 }
20 } 22 }
21 23
22 static void randN_proc(int array[N]) { 24 static void randN_proc(int array[N]) {
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 DEF_BENCH( return NewSkHeap(kFore); ) 165 DEF_BENCH( return NewSkHeap(kFore); )
164 DEF_BENCH( return NewQSort(kFore); ) 166 DEF_BENCH( return NewQSort(kFore); )
165 167
166 DEF_BENCH( return NewSkQSort(kBack); ) 168 DEF_BENCH( return NewSkQSort(kBack); )
167 DEF_BENCH( return NewSkHeap(kBack); ) 169 DEF_BENCH( return NewSkHeap(kBack); )
168 DEF_BENCH( return NewQSort(kBack); ) 170 DEF_BENCH( return NewQSort(kBack); )
169 171
170 DEF_BENCH( return NewSkQSort(kSame); ) 172 DEF_BENCH( return NewSkQSort(kSame); )
171 DEF_BENCH( return NewSkHeap(kSame); ) 173 DEF_BENCH( return NewSkHeap(kSame); )
172 DEF_BENCH( return NewQSort(kSame); ) 174 DEF_BENCH( return NewQSort(kSame); )
OLDNEW
« no previous file with comments | « no previous file | bench/nanobench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698