Home
last modified time | relevance | path

Searched refs:rand (Results 1 – 25 of 596) sorted by relevance

12345678910>>...24

/external/skia/tools/
Drandom_parse_path.cpp32 static void add_white(SkRandom* rand, SkString* atom) { in add_white() argument
37 int reps = rand->nextRangeU(0, 2); in add_white()
39 int index = rand->nextRangeU(0, (int) SK_ARRAY_COUNT(gWhiteSpace) - 1); in add_white()
46 static void add_comma(SkRandom* rand, SkString* atom) { in add_comma() argument
52 add_white(rand, atom); in add_comma()
53 if (rand->nextBool()) { in add_comma()
57 add_white(rand, atom); in add_comma()
61 static void add_some_white(SkRandom* rand, SkString* atom) { in add_some_white() argument
64 add_white(rand, atom); in add_some_white()
68 SkString MakeRandomParsePathPiece(SkRandom* rand) { in MakeRandomParsePathPiece() argument
[all …]
/external/skia/samplecode/
DSampleClip.cpp21 SkRandom rand; in show_text() local
28 paint.setColor((SK_A32_MASK << SK_A32_SHIFT) | rand.nextU()); in show_text()
30 rand.nextSScalar1() * W, rand.nextSScalar1() * H + 20, in show_text()
36 SkRandom rand; in show_fill() local
44 r.setXYWH(rand.nextSScalar1() * W, rand.nextSScalar1() * H, in show_fill()
45 rand.nextUScalar1() * W, rand.nextUScalar1() * H); in show_fill()
46 paint.setColor(rand.nextU()); in show_fill()
49 r.setXYWH(rand.nextSScalar1() * W, rand.nextSScalar1() * H, in show_fill()
50 rand.nextUScalar1() * W, rand.nextUScalar1() * H); in show_fill()
51 paint.setColor(rand.nextU()); in show_fill()
[all …]
DSampleHairCurves.cpp37 SkRandom rand; in onDrawContent() local
44 rand.nextUScalar1(), rand.nextUScalar1(), in onDrawContent()
45 rand.nextUScalar1(), rand.nextUScalar1(), in onDrawContent()
46 rand.nextUScalar1(), rand.nextUScalar1(), in onDrawContent()
47 rand.nextUScalar1(), rand.nextUScalar1() in onDrawContent()
66 rand.nextUScalar1(), rand.nextUScalar1(), in onDrawContent()
67 rand.nextUScalar1(), rand.nextUScalar1(), in onDrawContent()
68 rand.nextUScalar1(), rand.nextUScalar1(), in onDrawContent()
84 rand.nextUScalar1(), rand.nextUScalar1(), in onDrawContent()
85 rand.nextUScalar1(), rand.nextUScalar1(), in onDrawContent()
[all …]
DSampleHT.cpp42 SkRandom rand(seed); in rand_opaque_color() local
43 return rand.nextU() | (0xFF << 24); in rand_opaque_color()
53 HTDrawable(SkRandom& rand) { in HTDrawable() argument
54 fR = SkRect::MakeXYWH(rand.nextRangeF(0, 640), rand.nextRangeF(0, 480), in HTDrawable()
55 rand.nextRangeF(20, 200), rand.nextRangeF(20, 200)); in HTDrawable()
56 fColor = rand_opaque_color(rand.nextU()); in HTDrawable()
134 SkRandom rand; in HTView() local
139 fArray[i].fDrawable = new HTDrawable(rand); in HTView()
/external/skia/gm/
Dbeziers.cpp18 static void rnd_quad(SkPath* p, SkPaint* paint, SkRandom& rand) { in rnd_quad() argument
19 p->moveTo(rand.nextRangeScalar(0, W), rand.nextRangeScalar(0, H)); in rnd_quad()
21 p->quadTo(rand.nextRangeScalar(W / 4, W), rand.nextRangeScalar(0, H), in rnd_quad()
22 rand.nextRangeScalar(0, W), rand.nextRangeScalar(H / 4, H)); in rnd_quad()
24 paint->setColor(rand.nextU()); in rnd_quad()
25 SkScalar width = rand.nextRangeScalar(1, 5); in rnd_quad()
31 static void rnd_cubic(SkPath* p, SkPaint* paint, SkRandom& rand) { in rnd_cubic() argument
32 p->moveTo(rand.nextRangeScalar(0, W), rand.nextRangeScalar(0, H)); in rnd_cubic()
34 p->cubicTo(rand.nextRangeScalar(W / 4, W), rand.nextRangeScalar(0, H), in rnd_cubic()
35 rand.nextRangeScalar(0, W), rand.nextRangeScalar(H / 4, H), in rnd_cubic()
[all …]
Dstrokerects.cpp37 static void rnd_rect(SkRect* r, SkRandom& rand) { in rnd_rect() argument
38 SkScalar x = rand.nextUScalar1() * W; in rnd_rect()
39 SkScalar y = rand.nextUScalar1() * H; in rnd_rect()
40 SkScalar w = rand.nextUScalar1() * (W >> 2); in rnd_rect()
41 SkScalar h = rand.nextUScalar1() * (H >> 2); in rnd_rect()
42 SkScalar hoffset = rand.nextSScalar1(); in rnd_rect()
43 SkScalar woffset = rand.nextSScalar1(); in rnd_rect()
65 SkRandom rand; in onDraw() local
68 rnd_rect(&r, rand); in onDraw()
Dbeziereffects.cpp144 SkRandom rand; in onDraw() local
157 {rand.nextRangeF(0.f, w), rand.nextRangeF(0.f, h)}, in onDraw()
158 {rand.nextRangeF(0.f, w), rand.nextRangeF(0.f, h)}, in onDraw()
159 {rand.nextRangeF(0.f, w), rand.nextRangeF(0.f, h)}, in onDraw()
160 {rand.nextRangeF(0.f, w), rand.nextRangeF(0.f, h)} in onDraw()
187 ctrlPtPaint.setColor(rand.nextU() | 0xFF000000); in onDraw()
287 SkRandom rand; in onDraw() local
300 {rand.nextRangeF(0.f, w), rand.nextRangeF(0.f, h)}, in onDraw()
301 {rand.nextRangeF(0.f, w), rand.nextRangeF(0.f, h)}, in onDraw()
302 {rand.nextRangeF(0.f, w), rand.nextRangeF(0.f, h)} in onDraw()
[all …]
/external/skia/bench/
DStrokeBench.cpp56 static SkPoint rand_pt(SkRandom& rand) { in rand_pt() argument
57 return SkPoint::Make(rand.nextSScalar1() * X, rand.nextSScalar1() * Y); in rand_pt()
62 SkRandom rand; in line_path_maker() local
63 path.moveTo(rand_pt(rand)); in line_path_maker()
65 path.lineTo(rand_pt(rand)); in line_path_maker()
71 SkRandom rand; in quad_path_maker() local
72 path.moveTo(rand_pt(rand)); in quad_path_maker()
74 path.quadTo(rand_pt(rand), rand_pt(rand)); in quad_path_maker()
80 SkRandom rand; in conic_path_maker() local
81 path.moveTo(rand_pt(rand)); in conic_path_maker()
[all …]
DRTreeBench.cpp38 SkRandom rand; in onDraw() local
41 rects[i] = fProc(rand, i, NUM_BUILD_RECTS); in onDraw()
71 SkRandom rand; in onDelayedSetup() local
74 rects[i] = fProc(rand, i, NUM_QUERY_RECTS); in onDelayedSetup()
80 SkRandom rand; in onDraw() local
84 query.fLeft = rand.nextRangeF(0, GENERATE_EXTENTS); in onDraw()
85 query.fTop = rand.nextRangeF(0, GENERATE_EXTENTS); in onDraw()
86 query.fRight = query.fLeft + 1 + rand.nextRangeF(0, GENERATE_EXTENTS/2); in onDraw()
87 query.fBottom = query.fTop + 1 + rand.nextRangeF(0, GENERATE_EXTENTS/2); in onDraw()
98 static inline SkRect make_XYordered_rects(SkRandom& rand, int index, int numRects) { in make_XYordered_rects() argument
[all …]
DHairlinePathBench.cpp89 SkRandom rand; in makePath() local
98 int base1 = 2 * rand.nextULessThan(hSize); in makePath()
99 int base2 = 2 * rand.nextULessThan(hSize); in makePath()
100 int base3 = 2 * rand.nextULessThan(hSize); in makePath()
121 SkRandom rand; in makePath() local
130 int base1 = 2 * rand.nextULessThan(hSize); in makePath()
131 int base2 = 2 * rand.nextULessThan(hSize); in makePath()
132 int base3 = 2 * rand.nextULessThan(hSize); in makePath()
153 SkRandom rand; in makePath() local
163 int base1 = 2 * rand.nextULessThan(hSize); in makePath()
[all …]
/external/autotest/client/tests/isic/
Disic-gcc41-fix.patch8 - (u_short) payload[cx] = rand() & 0xffff;
9 +// (u_short) payload[cx] = rand() & 0xffff;
10 + payload[cx] = rand() & 0xffff;
13 if ( rand() <= (RAND_MAX * ICMPCksm) )
21 - (u_int16_t) payload[cx] = rand() & 0xffff;
22 - (u_int16_t) payload[payload_s] = rand() & 0xffff;
23 +/* (u_int16_t) payload[cx] = rand() & 0xffff;
24 + (u_int16_t) payload[payload_s] = rand() & 0xffff;*/
25 + payload[cx] = rand() & 0xffff;
26 + payload[payload_s] = rand() & 0xffff;
[all …]
/external/v8/test/mjsunit/
Dunicodelctest.js58 function rand() { function
74 var c = rand();
77 if (rand() & 1) {
81 if (rand() & 31 == 0) c = 0xfff8 + (rand() & 7)
82 if (rand() & 31 == 0) c = (rand() & 7)
85 if (rand() & 1) c = last + (rand() & 15) - 8;
94 var len = rand() & 0x1f;
96 var last = rand();
107 if (j < len - 1 && rand() & 1) cc += '-';
Dunicodelctest-no-optimization.js59 function rand() { function
75 var c = rand();
78 if (rand() & 1) {
82 if (rand() & 31 == 0) c = 0xfff8 + (rand() & 7)
83 if (rand() & 31 == 0) c = (rand() & 7)
86 if (rand() & 1) c = last + (rand() & 15) - 8;
96 var len = rand() & 0x1f;
98 var last = rand();
109 if (j < len - 1 && rand() & 1) cc += '-';
/external/opencv3/3rdparty/openexr/Imath/
DImathRandom.h189 solidSphereRand (Rand &rand);
199 hollowSphereRand (Rand &rand);
209 gaussRand (Rand &rand);
220 gaussSphereRand (Rand &rand);
334 solidSphereRand (Rand &rand) in solidSphereRand() argument
341 v[i] = (typename Vec::BaseType) rand.nextf (-1, 1); in solidSphereRand()
351 hollowSphereRand (Rand &rand) in hollowSphereRand() argument
359 v[i] = (typename Vec::BaseType) rand.nextf (-1, 1); in hollowSphereRand()
371 gaussRand (Rand &rand) in gaussRand() argument
379 x = float (rand.nextf (-1, 1)); in gaussRand()
[all …]
/external/skia/tests/
DRTreeTest.cpp16 static SkRect random_rect(SkRandom& rand) { in random_rect() argument
19 rect.fLeft = rand.nextRangeF(0, 1000); in random_rect()
20 rect.fRight = rand.nextRangeF(0, 1000); in random_rect()
21 rect.fTop = rand.nextRangeF(0, 1000); in random_rect()
22 rect.fBottom = rand.nextRangeF(0, 1000); in random_rect()
46 static void run_queries(skiatest::Reporter* reporter, SkRandom& rand, SkRect rects[], in run_queries() argument
50 SkRect query = random_rect(rand); in run_queries()
73 SkRandom rand; in DEF_TEST() local
80 rects[j] = random_rect(rand); in DEF_TEST()
86 run_queries(reporter, rand, rects, rtree); in DEF_TEST()
DRandomTest.cpp63 SkRandom rand; in test_random_byte() local
65 bins[(rand.nextU() >> shift) & 0xff]++; in test_random_byte()
75 SkRandom rand; in test_random_float() local
77 float f = rand.nextF(); in test_random_float()
85 float f = rand.nextF(); in test_random_float()
110 SkRandom rand; in test_single_gorilla() local
116 unsigned int rnd = rand.nextU(); in test_single_gorilla()
123 unsigned int rnd = rand.nextU(); in test_single_gorilla()
163 SkRandom rand; in test_range() local
166 (void) rand.nextRangeU(0, 0xffffffff); in test_range()
[all …]
DDrawBitmapRectTest.cpp64 static void rand_matrix(SkMatrix* mat, SkRandom& rand, unsigned mask) { in rand_matrix() argument
67 mat->postTranslate(rand.nextSScalar1(), rand.nextSScalar1()); in rand_matrix()
70 mat->postScale(rand.nextSScalar1(), rand.nextSScalar1()); in rand_matrix()
73 mat->postRotate(rand.nextSScalar1() * 360); in rand_matrix()
76 mat->setPerspX(rand.nextSScalar1()); in rand_matrix()
77 mat->setPerspY(rand.nextSScalar1()); in rand_matrix()
81 static void rand_size(SkISize* size, SkRandom& rand) { in rand_size() argument
82 size->set(rand.nextU() & 0xFFFF, rand.nextU() & 0xFFFF); in rand_size()
89 SkRandom rand; in test_treatAsSprite() local
97 rand_matrix(&mat, rand, SkMatrix::kTranslate_Mask); in test_treatAsSprite()
[all …]
DRegionTest.cpp109 static SkIRect randRect(SkRandom& rand) { in randRect() argument
110 int x = rand.nextU() % W; in randRect()
111 int y = rand.nextU() % H; in randRect()
112 int w = rand.nextU() % W; in randRect()
113 int h = rand.nextU() % H; in randRect()
117 static void randRgn(SkRandom& rand, SkRegion* rgn, int n) { in randRgn() argument
120 rgn->op(randRect(rand), SkRegion::kUnion_Op); in randRgn()
194 SkRandom rand; in test_proc() local
197 randRgn(rand, &outer, 8); in test_proc()
199 randRgn(rand, &inner, 2); in test_proc()
[all …]
/external/llvm/test/tools/llvm-cov/Inputs/
Dtest.cpp42 on = rand() % 2; in main()
48 a += rand(); in main()
52 switch (rand() % 5) { in main()
54 a += rand(); in main()
58 a += rand() / rand(); in main()
61 a -= rand(); in main()
Dtest_no_gcda.cpp.gcov47 #####: 42: on = rand() % 2;
53 #####: 48: a += rand();
57 #####: 52: switch (rand() % 5) {
59 #####: 54: a += rand();
63 #####: 58: a += rand() / rand();
66 #####: 61: a -= rand();
Dtest_no_options.cpp.gcov47 2: 42: on = rand() % 2;
53 #####: 48: a += rand();
57 20: 52: switch (rand() % 5) {
59 4: 54: a += rand();
63 2: 58: a += rand() / rand();
66 6: 61: a -= rand();
Dtest_objdir.cpp.gcov47 2: 42: on = rand() % 2;
53 #####: 48: a += rand();
57 20: 52: switch (rand() % 5) {
59 4: 54: a += rand();
63 2: 58: a += rand() / rand();
66 6: 61: a -= rand();
Dtest_paths.cpp.gcov47 3: 42: on = rand() % 2;
53 #####: 48: a += rand();
57 30: 52: switch (rand() % 5) {
59 6: 54: a += rand();
63 3: 58: a += rand() / rand();
66 9: 61: a -= rand();
/external/compiler-rt/test/builtins/Unit/
Dfp_test.h260 static inline uint16_t makeNaN16(uint16_t rand) in makeNaN16() argument
262 return fromRep16(0x7c00U | (rand & 0x7fffU)); in makeNaN16()
265 static inline uint16_t makeNaN16(uint16_t rand) in makeNaN16() argument
267 return fromRep16(0x7c00U | (rand & 0x7fffU)); in makeNaN16()
270 static inline float makeNaN32(uint32_t rand) in makeNaN32() argument
272 return fromRep32(0x7f800000U | (rand & 0x7fffffU)); in makeNaN32()
275 static inline double makeNaN64(uint64_t rand) in makeNaN64() argument
277 return fromRep64(0x7ff0000000000000UL | (rand & 0xfffffffffffffUL)); in makeNaN64()
281 static inline long double makeNaN128(uint64_t rand) in makeNaN128() argument
283 return fromRep128(0x7fff000000000000UL | (rand & 0xffffffffffffUL), 0x0UL); in makeNaN128()
/external/compiler-rt/test/builtins/timing/
Dumoddi3.c27 input1[i] = (((uint64_t)rand() << 36) | (uint64_t)rand()) >> (rand() & 63); in main()
28 input2[i] = ((((uint64_t)rand() << 36) | (uint64_t)rand()) >> (rand() & 63)) + 1LL; in main()

12345678910>>...24