Home
last modified time | relevance | path

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

12345678910>>...27

/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.cpp22 SkRandom rand; in show_text() local
29 paint.setColor((SK_A32_MASK << SK_A32_SHIFT) | rand.nextU()); in show_text()
31 rand.nextSScalar1() * W, rand.nextSScalar1() * H + 20, in show_text()
37 SkRandom rand; in show_fill() local
45 r.setXYWH(rand.nextSScalar1() * W, rand.nextSScalar1() * H, in show_fill()
46 rand.nextUScalar1() * W, rand.nextUScalar1() * H); in show_fill()
47 paint.setColor(rand.nextU()); in show_fill()
50 r.setXYWH(rand.nextSScalar1() * W, rand.nextSScalar1() * H, in show_fill()
51 rand.nextUScalar1() * W, rand.nextUScalar1() * H); in show_fill()
52 paint.setColor(rand.nextU()); in show_fill()
[all …]
DSampleHairCurves.cpp36 SkRandom rand; in onDrawContent() local
43 rand.nextUScalar1(), rand.nextUScalar1(), in onDrawContent()
44 rand.nextUScalar1(), rand.nextUScalar1(), in onDrawContent()
45 rand.nextUScalar1(), rand.nextUScalar1(), in onDrawContent()
46 rand.nextUScalar1(), rand.nextUScalar1() in onDrawContent()
65 rand.nextUScalar1(), rand.nextUScalar1(), in onDrawContent()
66 rand.nextUScalar1(), rand.nextUScalar1(), in onDrawContent()
67 rand.nextUScalar1(), rand.nextUScalar1(), in onDrawContent()
83 rand.nextUScalar1(), rand.nextUScalar1(), in onDrawContent()
84 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()
132 SkRandom rand; in HTView() local
137 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 auto a = rand.nextRangeScalar(0,W), in rnd_quad()
20 b = rand.nextRangeScalar(0,H); in rnd_quad()
23 auto c = rand.nextRangeScalar(W/4, W), in rnd_quad()
24 d = rand.nextRangeScalar( 0, H), in rnd_quad()
25 e = rand.nextRangeScalar( 0, W), in rnd_quad()
26 f = rand.nextRangeScalar(H/4, H); in rnd_quad()
29 paint->setColor(rand.nextU()); in rnd_quad()
30 SkScalar width = rand.nextRangeScalar(1, 5); in rnd_quad()
36 static void rnd_cubic(SkPath* p, SkPaint* paint, SkRandom& rand) { in rnd_cubic() argument
[all …]
Dmanypaths.cpp16 static SkColor gen_color(SkRandom* rand) { in gen_color() argument
18 hsv[0] = rand->nextRangeF(0.0f, 360.0f); in gen_color()
19 hsv[1] = rand->nextRangeF(0.5f, 1.0f); in gen_color()
20 hsv[2] = rand->nextRangeF(0.5f, 1.0f); in gen_color()
46 SkRandom rand(1); in onDraw() local
51 SkScalar x = rand.nextF() * kWidth - 100; in onDraw()
52 SkScalar y = rand.nextF() * kHeight - 100; in onDraw()
53 SkScalar w = rand.nextF() * 200; in onDraw()
55 paint.setColor(gen_color(&rand)); in onDraw()
85 SkRandom rand(1); in onDraw() local
Dstrokerects.cpp36 static void rnd_rect(SkRect* r, SkRandom& rand) { in rnd_rect() argument
37 SkScalar x = rand.nextUScalar1() * W; in rnd_rect()
38 SkScalar y = rand.nextUScalar1() * H; in rnd_rect()
39 SkScalar w = rand.nextUScalar1() * (W >> 2); in rnd_rect()
40 SkScalar h = rand.nextUScalar1() * (H >> 2); in rnd_rect()
41 SkScalar hoffset = rand.nextSScalar1(); in rnd_rect()
42 SkScalar woffset = rand.nextSScalar1(); in rnd_rect()
64 SkRandom rand; in onDraw() local
67 rnd_rect(&r, rand); in onDraw()
Dbeziereffects.cpp119 SkRandom rand; in onDraw() local
132 {rand.nextRangeF(0.f, w), rand.nextRangeF(0.f, h)}, in onDraw()
133 {rand.nextRangeF(0.f, w), rand.nextRangeF(0.f, h)}, in onDraw()
134 {rand.nextRangeF(0.f, w), rand.nextRangeF(0.f, h)}, in onDraw()
135 {rand.nextRangeF(0.f, w), rand.nextRangeF(0.f, h)} in onDraw()
161 ctrlPtPaint.setColor(rand.nextU() | 0xFF000000); in onDraw()
259 SkRandom rand; in onDraw() local
272 {rand.nextRangeF(0.f, w), rand.nextRangeF(0.f, h)}, in onDraw()
273 {rand.nextRangeF(0.f, w), rand.nextRangeF(0.f, h)}, in onDraw()
274 {rand.nextRangeF(0.f, w), rand.nextRangeF(0.f, h)} in onDraw()
[all …]
Dsimplerect.cpp36 SkRandom rand; in onDraw() local
39 paint.setColor(sk_tool_utils::color_to_565(rand.nextU() | (0xFF << 24))); in onDraw()
40 SkScalar x = rand.nextRangeScalar(min, max); in onDraw()
41 SkScalar y = rand.nextRangeScalar(min, max); in onDraw()
42 SkScalar w = rand.nextRangeScalar(0, size); in onDraw()
43 SkScalar h = rand.nextRangeScalar(0, size); in onDraw()
/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 …]
DPathBench.cpp272 SkRandom rand (12); in makePath() local
275 path->quadTo(rand.nextUScalar1() * 640, rand.nextUScalar1() * 480, in makePath()
276 rand.nextUScalar1() * 640, rand.nextUScalar1() * 480); in makePath()
293 SkRandom rand; in makePath() local
294 path->moveTo(rand.nextUScalar1() * 640, rand.nextUScalar1() * 480); in makePath()
296 path->lineTo(rand.nextUScalar1() * 640, rand.nextUScalar1() * 480); in makePath()
681 SkRandom rand; in onDraw() local
686 SkScalar radius = rand.nextUScalar1() * 3; in onDraw()
687 r.fLeft = rand.nextUScalar1() * 300; in onDraw()
688 r.fTop = rand.nextUScalar1() * 300; in onDraw()
[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/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 …]
/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.h237 static inline uint16_t makeNaN16(uint16_t rand) in makeNaN16() argument
239 return fromRep16(0x7c00U | (rand & 0x7fffU)); in makeNaN16()
242 static inline float makeNaN32(uint32_t rand) in makeNaN32() argument
244 return fromRep32(0x7f800000U | (rand & 0x7fffffU)); in makeNaN32()
247 static inline double makeNaN64(uint64_t rand) in makeNaN64() argument
249 return fromRep64(0x7ff0000000000000UL | (rand & 0xfffffffffffffUL)); in makeNaN64()
253 static inline long double makeNaN128(uint64_t rand) in makeNaN128() argument
255 return fromRep128(0x7fff000000000000UL | (rand & 0xffffffffffffUL), 0x0UL); in makeNaN128()
/external/compiler-rt/test/builtins/timing/
Dmoddi3.c27 input1[i] = (((int64_t)rand() << 36) | (uint64_t)rand()) >> (rand() & 63); in main()
28 input2[i] = ((((int64_t)rand() << 36) | (uint64_t)rand()) >> (rand() & 63)) + 1LL; in main()
Dudivdi3.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>>...27