blob: c2b600c2a60686381682da184bfea8d33c12af53 [file] [log] [blame]
reed@google.comddc518b2011-08-29 17:49:23 +00001#include "SkBenchmark.h"
reed@google.come05cc8e2011-10-10 14:19:40 +00002#include "SkColorPriv.h"
reed@google.comddc518b2011-08-29 17:49:23 +00003#include "SkMatrix.h"
4#include "SkRandom.h"
5#include "SkString.h"
reed@google.com16078632011-12-06 18:56:37 +00006#include "SkPaint.h"
reed@google.comddc518b2011-08-29 17:49:23 +00007
reed@google.com7f192412012-05-30 12:26:52 +00008static float sk_fsel(float pred, float result_ge, float result_lt) {
9 return pred >= 0 ? result_ge : result_lt;
10}
11
12static float fast_floor(float x) {
reed@google.comf3a8d8e2012-05-30 14:08:57 +000013// float big = sk_fsel(x, 0x1.0p+23, -0x1.0p+23);
14 float big = sk_fsel(x, (float)(1 << 23), -(float)(1 << 23));
reed@google.com7f192412012-05-30 12:26:52 +000015 return (x + big) - big;
16}
17
reed@google.comddc518b2011-08-29 17:49:23 +000018class MathBench : public SkBenchmark {
19 enum {
20 kBuffer = 100,
21 kLoop = 10000
22 };
23 SkString fName;
24 float fSrc[kBuffer], fDst[kBuffer];
25public:
26 MathBench(void* param, const char name[]) : INHERITED(param) {
27 fName.printf("math_%s", name);
28
29 SkRandom rand;
30 for (int i = 0; i < kBuffer; ++i) {
31 fSrc[i] = rand.nextSScalar1();
32 }
tomhudson@google.com9dc27132012-09-13 15:50:24 +000033
34 fIsRendering = false;
reed@google.comddc518b2011-08-29 17:49:23 +000035 }
36
rmistry@google.comfbfcd562012-08-23 18:09:54 +000037 virtual void performTest(float* SK_RESTRICT dst,
38 const float* SK_RESTRICT src,
robertphillips@google.com6853e802012-04-16 15:50:18 +000039 int count) = 0;
reed@google.comddc518b2011-08-29 17:49:23 +000040
41protected:
42 virtual int mulLoopCount() const { return 1; }
43
44 virtual const char* onGetName() {
45 return fName.c_str();
46 }
47
sugoi@google.com77472f02013-03-05 18:50:01 +000048 virtual void onDraw(SkCanvas*) {
tomhudson@google.comca529d32011-10-28 15:34:49 +000049 int n = SkBENCHLOOP(kLoop * this->mulLoopCount());
reed@google.comddc518b2011-08-29 17:49:23 +000050 for (int i = 0; i < n; i++) {
51 this->performTest(fDst, fSrc, kBuffer);
52 }
53 }
54
55private:
56 typedef SkBenchmark INHERITED;
57};
58
reed@google.come05cc8e2011-10-10 14:19:40 +000059class MathBenchU32 : public MathBench {
60public:
61 MathBenchU32(void* param, const char name[]) : INHERITED(param, name) {}
skia.committer@gmail.com81521132013-04-30 07:01:03 +000062
reed@google.come05cc8e2011-10-10 14:19:40 +000063protected:
rmistry@google.comfbfcd562012-08-23 18:09:54 +000064 virtual void performITest(uint32_t* SK_RESTRICT dst,
65 const uint32_t* SK_RESTRICT src,
robertphillips@google.com6853e802012-04-16 15:50:18 +000066 int count) = 0;
skia.committer@gmail.com81521132013-04-30 07:01:03 +000067
rmistry@google.comfbfcd562012-08-23 18:09:54 +000068 virtual void performTest(float* SK_RESTRICT dst,
reed@google.com0d7aac92013-04-29 13:55:11 +000069 const float* SK_RESTRICT src,
70 int count) SK_OVERRIDE {
reed@google.come05cc8e2011-10-10 14:19:40 +000071 uint32_t* d = SkTCast<uint32_t*>(dst);
72 const uint32_t* s = SkTCast<const uint32_t*>(src);
73 this->performITest(d, s, count);
74 }
75private:
76 typedef MathBench INHERITED;
77};
78
79///////////////////////////////////////////////////////////////////////////////
reed@google.comddc518b2011-08-29 17:49:23 +000080
81class NoOpMathBench : public MathBench {
82public:
bungeman@google.com9399cac2011-08-31 19:47:59 +000083 NoOpMathBench(void* param) : INHERITED(param, "noOp") {}
reed@google.comddc518b2011-08-29 17:49:23 +000084protected:
rmistry@google.comfbfcd562012-08-23 18:09:54 +000085 virtual void performTest(float* SK_RESTRICT dst,
86 const float* SK_RESTRICT src,
robertphillips@google.com6853e802012-04-16 15:50:18 +000087 int count) {
reed@google.comddc518b2011-08-29 17:49:23 +000088 for (int i = 0; i < count; ++i) {
89 dst[i] = src[i] + 1;
90 }
91 }
92private:
93 typedef MathBench INHERITED;
94};
95
commit-bot@chromium.orgb3ecdc42013-08-12 08:37:51 +000096class InvSqrtBench : public SkBenchmark {
97 enum {
98 ARRAY = SkBENCHLOOP(1000),
99 LOOP = SkBENCHLOOP(5000),
100 };
101 float fData[ARRAY];
102 const char *type;
reed@google.comddc518b2011-08-29 17:49:23 +0000103
reed@google.comddc518b2011-08-29 17:49:23 +0000104public:
commit-bot@chromium.orgb3ecdc42013-08-12 08:37:51 +0000105 InvSqrtBench(void* param, const char *type)
106 : INHERITED(param)
107 , type(type) {
reed@google.comddc518b2011-08-29 17:49:23 +0000108 }
commit-bot@chromium.orgb3ecdc42013-08-12 08:37:51 +0000109
110 // just so the compiler doesn't remove our loops
111 virtual void process(int) {}
112
113protected:
114 virtual void onPreDraw() SK_OVERRIDE {
115 SkRandom rand;
116 for (int i = 0; i < ARRAY; ++i) {
117 fData[i] = rand.nextRangeF(0, 10000);
118 }
119
120 fIsRendering = false;
121 }
122
123 virtual void onDraw(SkCanvas*) {
124 float accum = 0;
125
126 if (strcmp(type, "float_slow") == 0) {
127 for (int j = 0; j < LOOP; ++j)
128 for (int i = 0; i < ARRAY; ++i)
129 accum += 1.0f / sk_float_sqrt(fData[i]);
130 } else if (strcmp(type, "float_fast") == 0) {
131 for (int j = 0; j < LOOP; ++j)
132 for (int i = 0; i < ARRAY; ++i)
133 accum += SkFloatInvSqrt(fData[i]);
134 }
135
136 this->process(accum);
137 }
138
139 virtual const char* onGetName() {
140 fName.printf("math_inv_sqrt");
141 fName.appendf("_%s", type);
142 return fName.c_str();
143 }
144
reed@google.comddc518b2011-08-29 17:49:23 +0000145private:
commit-bot@chromium.orgb3ecdc42013-08-12 08:37:51 +0000146 SkString fName;
147 typedef SkBenchmark INHERITED;
reed@google.comddc518b2011-08-29 17:49:23 +0000148};
149
reed@google.come05cc8e2011-10-10 14:19:40 +0000150static inline uint32_t QMul64(uint32_t value, U8CPU alpha) {
151 SkASSERT((uint8_t)alpha == alpha);
152 const uint32_t mask = 0xFF00FF;
153
154 uint64_t tmp = value;
155 tmp = (tmp & mask) | ((tmp & ~mask) << 24);
156 tmp *= alpha;
caryclark@google.com19069a22012-06-06 12:11:45 +0000157 return (uint32_t) (((tmp >> 8) & mask) | ((tmp >> 32) & ~mask));
reed@google.come05cc8e2011-10-10 14:19:40 +0000158}
159
160class QMul64Bench : public MathBenchU32 {
161public:
162 QMul64Bench(void* param) : INHERITED(param, "qmul64") {}
163protected:
164 virtual void performITest(uint32_t* SK_RESTRICT dst,
165 const uint32_t* SK_RESTRICT src,
166 int count) SK_OVERRIDE {
167 for (int i = 0; i < count; ++i) {
168 dst[i] = QMul64(src[i], (uint8_t)i);
169 }
170 }
171private:
172 typedef MathBenchU32 INHERITED;
173};
174
175class QMul32Bench : public MathBenchU32 {
176public:
177 QMul32Bench(void* param) : INHERITED(param, "qmul32") {}
178protected:
179 virtual void performITest(uint32_t* SK_RESTRICT dst,
180 const uint32_t* SK_RESTRICT src,
181 int count) SK_OVERRIDE {
182 for (int i = 0; i < count; ++i) {
183 dst[i] = SkAlphaMulQ(src[i], (uint8_t)i);
184 }
185 }
186private:
187 typedef MathBenchU32 INHERITED;
188};
189
reed@google.comddc518b2011-08-29 17:49:23 +0000190///////////////////////////////////////////////////////////////////////////////
191
reed@google.com0be5eb72011-12-05 21:53:22 +0000192static bool isFinite_int(float x) {
193 uint32_t bits = SkFloat2Bits(x); // need unsigned for our shifts
194 int exponent = bits << 1 >> 24;
195 return exponent != 0xFF;
196}
197
198static bool isFinite_float(float x) {
robertphillips@google.com6853e802012-04-16 15:50:18 +0000199 return SkToBool(sk_float_isfinite(x));
reed@google.com0be5eb72011-12-05 21:53:22 +0000200}
201
202static bool isFinite_mulzero(float x) {
203 float y = x * 0;
204 return y == y;
205}
206
207static bool isfinite_and_int(const float data[4]) {
208 return isFinite_int(data[0]) && isFinite_int(data[1]) && isFinite_int(data[2]) && isFinite_int(data[3]);
209}
210
211static bool isfinite_and_float(const float data[4]) {
212 return isFinite_float(data[0]) && isFinite_float(data[1]) && isFinite_float(data[2]) && isFinite_float(data[3]);
213}
214
215static bool isfinite_and_mulzero(const float data[4]) {
216 return isFinite_mulzero(data[0]) && isFinite_mulzero(data[1]) && isFinite_mulzero(data[2]) && isFinite_mulzero(data[3]);
217}
218
219#define mulzeroadd(data) (data[0]*0 + data[1]*0 + data[2]*0 + data[3]*0)
220
221static bool isfinite_plus_int(const float data[4]) {
222 return isFinite_int(mulzeroadd(data));
223}
224
225static bool isfinite_plus_float(const float data[4]) {
reed@google.com5ae777d2011-12-06 20:18:05 +0000226 return !sk_float_isnan(mulzeroadd(data));
reed@google.com0be5eb72011-12-05 21:53:22 +0000227}
228
229static bool isfinite_plus_mulzero(const float data[4]) {
230 float x = mulzeroadd(data);
231 return x == x;
232}
233
234typedef bool (*IsFiniteProc)(const float[]);
235
236#define MAKEREC(name) { name, #name }
237
238static const struct {
239 IsFiniteProc fProc;
240 const char* fName;
241} gRec[] = {
242 MAKEREC(isfinite_and_int),
243 MAKEREC(isfinite_and_float),
244 MAKEREC(isfinite_and_mulzero),
245 MAKEREC(isfinite_plus_int),
246 MAKEREC(isfinite_plus_float),
247 MAKEREC(isfinite_plus_mulzero),
248};
249
250#undef MAKEREC
251
reed@google.com16078632011-12-06 18:56:37 +0000252static bool isFinite(const SkRect& r) {
253 // x * 0 will be NaN iff x is infinity or NaN.
254 // a + b will be NaN iff either a or b is NaN.
255 float value = r.fLeft * 0 + r.fTop * 0 + r.fRight * 0 + r.fBottom * 0;
rmistry@google.comfbfcd562012-08-23 18:09:54 +0000256
reed@google.com16078632011-12-06 18:56:37 +0000257 // value is either NaN or it is finite (zero).
258 // value==value will be true iff value is not NaN
259 return value == value;
260}
261
reed@google.com0be5eb72011-12-05 21:53:22 +0000262class IsFiniteBench : public SkBenchmark {
263 enum {
264 N = SkBENCHLOOP(1000),
265 NN = SkBENCHLOOP(1000),
266 };
267 float fData[N];
268public:
269
270 IsFiniteBench(void* param, int index) : INHERITED(param) {
271 SkRandom rand;
272
273 for (int i = 0; i < N; ++i) {
274 fData[i] = rand.nextSScalar1();
275 }
reed@google.com16078632011-12-06 18:56:37 +0000276
277 if (index < 0) {
278 fProc = NULL;
279 fName = "isfinite_rect";
280 } else {
281 fProc = gRec[index].fProc;
282 fName = gRec[index].fName;
283 }
tomhudson@google.com9dc27132012-09-13 15:50:24 +0000284 fIsRendering = false;
reed@google.com0be5eb72011-12-05 21:53:22 +0000285 }
286
287protected:
sugoi@google.com77472f02013-03-05 18:50:01 +0000288 virtual void onDraw(SkCanvas*) {
reed@google.com0be5eb72011-12-05 21:53:22 +0000289 IsFiniteProc proc = fProc;
290 const float* data = fData;
reed@google.com16078632011-12-06 18:56:37 +0000291 // do this so the compiler won't throw away the function call
292 int counter = 0;
reed@google.com0be5eb72011-12-05 21:53:22 +0000293
reed@google.com16078632011-12-06 18:56:37 +0000294 if (proc) {
295 for (int j = 0; j < NN; ++j) {
296 for (int i = 0; i < N - 4; ++i) {
297 counter += proc(&data[i]);
298 }
reed@google.com0be5eb72011-12-05 21:53:22 +0000299 }
reed@google.com16078632011-12-06 18:56:37 +0000300 } else {
301 for (int j = 0; j < NN; ++j) {
302 for (int i = 0; i < N - 4; ++i) {
303 const SkRect* r = reinterpret_cast<const SkRect*>(&data[i]);
caryclark@google.com19069a22012-06-06 12:11:45 +0000304 if (false) { // avoid bit rot, suppress warning
305 isFinite(*r);
306 }
reed@google.com16078632011-12-06 18:56:37 +0000307 counter += r->isFinite();
308 }
309 }
310 }
rmistry@google.comfbfcd562012-08-23 18:09:54 +0000311
reed@google.com16078632011-12-06 18:56:37 +0000312 SkPaint paint;
313 if (paint.getAlpha() == 0) {
314 SkDebugf("%d\n", counter);
reed@google.com0be5eb72011-12-05 21:53:22 +0000315 }
316 }
317
318 virtual const char* onGetName() {
319 return fName;
320 }
rmistry@google.comfbfcd562012-08-23 18:09:54 +0000321
reed@google.com0be5eb72011-12-05 21:53:22 +0000322private:
323 IsFiniteProc fProc;
324 const char* fName;
325
326 typedef SkBenchmark INHERITED;
327};
328
reed@google.com7f192412012-05-30 12:26:52 +0000329class FloorBench : public SkBenchmark {
330 enum {
331 ARRAY = SkBENCHLOOP(1000),
332 LOOP = SkBENCHLOOP(1000),
333 };
334 float fData[ARRAY];
335 bool fFast;
336public:
rmistry@google.comfbfcd562012-08-23 18:09:54 +0000337
reed@google.com7f192412012-05-30 12:26:52 +0000338 FloorBench(void* param, bool fast) : INHERITED(param), fFast(fast) {
339 SkRandom rand;
rmistry@google.comfbfcd562012-08-23 18:09:54 +0000340
reed@google.com7f192412012-05-30 12:26:52 +0000341 for (int i = 0; i < ARRAY; ++i) {
342 fData[i] = rand.nextSScalar1();
343 }
rmistry@google.comfbfcd562012-08-23 18:09:54 +0000344
reed@google.com7f192412012-05-30 12:26:52 +0000345 if (fast) {
346 fName = "floor_fast";
347 } else {
348 fName = "floor_std";
349 }
tomhudson@google.com9dc27132012-09-13 15:50:24 +0000350 fIsRendering = false;
reed@google.com7f192412012-05-30 12:26:52 +0000351 }
rmistry@google.comfbfcd562012-08-23 18:09:54 +0000352
reed@google.com7f192412012-05-30 12:26:52 +0000353 virtual void process(float) {}
354
355protected:
sugoi@google.com77472f02013-03-05 18:50:01 +0000356 virtual void onDraw(SkCanvas*) {
reed@google.com7f192412012-05-30 12:26:52 +0000357 SkRandom rand;
358 float accum = 0;
359 const float* data = fData;
rmistry@google.comfbfcd562012-08-23 18:09:54 +0000360
reed@google.com7f192412012-05-30 12:26:52 +0000361 if (fFast) {
362 for (int j = 0; j < LOOP; ++j) {
363 for (int i = 0; i < ARRAY; ++i) {
364 accum += fast_floor(data[i]);
365 }
366 this->process(accum);
367 }
368 } else {
369 for (int j = 0; j < LOOP; ++j) {
370 for (int i = 0; i < ARRAY; ++i) {
371 accum += sk_float_floor(data[i]);
372 }
373 this->process(accum);
374 }
375 }
376 }
rmistry@google.comfbfcd562012-08-23 18:09:54 +0000377
reed@google.com7f192412012-05-30 12:26:52 +0000378 virtual const char* onGetName() {
379 return fName;
380 }
rmistry@google.comfbfcd562012-08-23 18:09:54 +0000381
reed@google.com7f192412012-05-30 12:26:52 +0000382private:
383 const char* fName;
rmistry@google.comfbfcd562012-08-23 18:09:54 +0000384
reed@google.com7f192412012-05-30 12:26:52 +0000385 typedef SkBenchmark INHERITED;
386};
387
reed@google.com0d7aac92013-04-29 13:55:11 +0000388class CLZBench : public SkBenchmark {
389 enum {
390 ARRAY = SkBENCHLOOP(1000),
reed@google.comcb8dce22013-04-29 14:11:23 +0000391 LOOP = SkBENCHLOOP(5000),
reed@google.com0d7aac92013-04-29 13:55:11 +0000392 };
393 uint32_t fData[ARRAY];
394 bool fUsePortable;
395
skia.committer@gmail.com81521132013-04-30 07:01:03 +0000396public:
reed@google.com0d7aac92013-04-29 13:55:11 +0000397 CLZBench(void* param, bool usePortable)
398 : INHERITED(param)
399 , fUsePortable(usePortable) {
400
401 SkRandom rand;
402 for (int i = 0; i < ARRAY; ++i) {
403 fData[i] = rand.nextU();
404 }
skia.committer@gmail.com81521132013-04-30 07:01:03 +0000405
reed@google.com0d7aac92013-04-29 13:55:11 +0000406 if (fUsePortable) {
407 fName = "clz_portable";
408 } else {
409 fName = "clz_intrinsic";
410 }
411 fIsRendering = false;
412 }
skia.committer@gmail.com81521132013-04-30 07:01:03 +0000413
reed@google.com0d7aac92013-04-29 13:55:11 +0000414 // just so the compiler doesn't remove our loops
415 virtual void process(int) {}
skia.committer@gmail.com81521132013-04-30 07:01:03 +0000416
reed@google.com0d7aac92013-04-29 13:55:11 +0000417protected:
418 virtual void onDraw(SkCanvas*) {
419 int accum = 0;
skia.committer@gmail.com81521132013-04-30 07:01:03 +0000420
reed@google.com0d7aac92013-04-29 13:55:11 +0000421 if (fUsePortable) {
422 for (int j = 0; j < LOOP; ++j) {
423 for (int i = 0; i < ARRAY; ++i) {
424 accum += SkCLZ_portable(fData[i]);
425 }
426 this->process(accum);
427 }
428 } else {
429 for (int j = 0; j < LOOP; ++j) {
430 for (int i = 0; i < ARRAY; ++i) {
431 accum += SkCLZ(fData[i]);
432 }
433 this->process(accum);
434 }
435 }
436 }
skia.committer@gmail.com81521132013-04-30 07:01:03 +0000437
reed@google.com0d7aac92013-04-29 13:55:11 +0000438 virtual const char* onGetName() {
439 return fName;
440 }
skia.committer@gmail.com81521132013-04-30 07:01:03 +0000441
reed@google.com0d7aac92013-04-29 13:55:11 +0000442private:
443 const char* fName;
skia.committer@gmail.com81521132013-04-30 07:01:03 +0000444
reed@google.com0d7aac92013-04-29 13:55:11 +0000445 typedef SkBenchmark INHERITED;
446};
447
reed@google.com0be5eb72011-12-05 21:53:22 +0000448///////////////////////////////////////////////////////////////////////////////
449
reed@google.com0889f682013-05-03 12:56:39 +0000450class NormalizeBench : public SkBenchmark {
451 enum {
452 ARRAY = SkBENCHLOOP(1000),
453 LOOP = SkBENCHLOOP(1000),
454 };
455 SkVector fVec[ARRAY];
skia.committer@gmail.comecc9d282013-05-04 07:01:15 +0000456
reed@google.com0889f682013-05-03 12:56:39 +0000457public:
commit-bot@chromium.orgafb0e9c2013-06-19 13:28:44 +0000458 NormalizeBench(void* param)
459 : INHERITED(param) {
skia.committer@gmail.comecc9d282013-05-04 07:01:15 +0000460
reed@google.com0889f682013-05-03 12:56:39 +0000461 SkRandom rand;
462 for (int i = 0; i < ARRAY; ++i) {
463 fVec[i].set(rand.nextSScalar1(), rand.nextSScalar1());
464 }
skia.committer@gmail.comecc9d282013-05-04 07:01:15 +0000465
reed@google.com0889f682013-05-03 12:56:39 +0000466 fName = "point_normalize";
467 fIsRendering = false;
468 }
skia.committer@gmail.comecc9d282013-05-04 07:01:15 +0000469
reed@google.com0889f682013-05-03 12:56:39 +0000470 // just so the compiler doesn't remove our loops
471 virtual void process(int) {}
skia.committer@gmail.comecc9d282013-05-04 07:01:15 +0000472
reed@google.com0889f682013-05-03 12:56:39 +0000473protected:
474 virtual void onDraw(SkCanvas*) {
475 int accum = 0;
skia.committer@gmail.comecc9d282013-05-04 07:01:15 +0000476
reed@google.com0889f682013-05-03 12:56:39 +0000477 for (int j = 0; j < LOOP; ++j) {
478 for (int i = 0; i < ARRAY; ++i) {
479 accum += fVec[i].normalize();
480 }
481 this->process(accum);
482 }
483 }
skia.committer@gmail.comecc9d282013-05-04 07:01:15 +0000484
reed@google.com0889f682013-05-03 12:56:39 +0000485 virtual const char* onGetName() {
486 return fName;
487 }
skia.committer@gmail.comecc9d282013-05-04 07:01:15 +0000488
reed@google.com0889f682013-05-03 12:56:39 +0000489private:
490 const char* fName;
skia.committer@gmail.comecc9d282013-05-04 07:01:15 +0000491
reed@google.com0889f682013-05-03 12:56:39 +0000492 typedef SkBenchmark INHERITED;
493};
494
495///////////////////////////////////////////////////////////////////////////////
496
djsollen@google.com25a11e42013-07-18 19:11:30 +0000497class FixedMathBench : public SkBenchmark {
498 enum {
499 N = SkBENCHLOOP(1000),
500 NN = SkBENCHLOOP(1000),
501 };
502 float fData[N];
503 SkFixed fResult[N];
504public:
505
506 FixedMathBench(void* param) : INHERITED(param) {
507 SkRandom rand;
508 for (int i = 0; i < N; ++i) {
509 fData[i] = rand.nextSScalar1();
510 }
511
512 fIsRendering = false;
513 }
514
515protected:
516 virtual void onDraw(SkCanvas*) {
517 for (int j = 0; j < NN; ++j) {
518 for (int i = 0; i < N - 4; ++i) {
519 fResult[i] = SkFloatToFixed(fData[i]);
520 }
521 }
522
523 SkPaint paint;
524 if (paint.getAlpha() == 0) {
525 SkDebugf("%d\n", fResult[0]);
526 }
527 }
528
529 virtual const char* onGetName() {
530 return "float_to_fixed";
531 }
532
533private:
534 typedef SkBenchmark INHERITED;
535};
536
537///////////////////////////////////////////////////////////////////////////////
538
reed@google.com553ad652013-04-29 13:48:34 +0000539DEF_BENCH( return new NoOpMathBench(p); )
commit-bot@chromium.orgb3ecdc42013-08-12 08:37:51 +0000540DEF_BENCH( return new InvSqrtBench(p, "float_slow"); )
541DEF_BENCH( return new InvSqrtBench(p, "float_fast"); )
reed@google.com553ad652013-04-29 13:48:34 +0000542DEF_BENCH( return new QMul64Bench(p); )
543DEF_BENCH( return new QMul32Bench(p); )
reed@google.comddc518b2011-08-29 17:49:23 +0000544
reed@google.com553ad652013-04-29 13:48:34 +0000545DEF_BENCH( return new IsFiniteBench(p, -1); )
546DEF_BENCH( return new IsFiniteBench(p, 0); )
547DEF_BENCH( return new IsFiniteBench(p, 1); )
548DEF_BENCH( return new IsFiniteBench(p, 2); )
549DEF_BENCH( return new IsFiniteBench(p, 3); )
550DEF_BENCH( return new IsFiniteBench(p, 4); )
551DEF_BENCH( return new IsFiniteBench(p, 5); )
reed@google.com0be5eb72011-12-05 21:53:22 +0000552
reed@google.com553ad652013-04-29 13:48:34 +0000553DEF_BENCH( return new FloorBench(p, false); )
554DEF_BENCH( return new FloorBench(p, true); )
reed@google.com7f192412012-05-30 12:26:52 +0000555
reed@google.com0d7aac92013-04-29 13:55:11 +0000556DEF_BENCH( return new CLZBench(p, false); )
557DEF_BENCH( return new CLZBench(p, true); )
reed@google.com0889f682013-05-03 12:56:39 +0000558
commit-bot@chromium.orgafb0e9c2013-06-19 13:28:44 +0000559DEF_BENCH( return new NormalizeBench(p); )
djsollen@google.com25a11e42013-07-18 19:11:30 +0000560
561DEF_BENCH( return new FixedMathBench(p); )