Home
last modified time | relevance | path

Searched refs:x (Results 1 – 25 of 29) sorted by relevance

12

/littlefs-latest/scripts/
Dplotmpl.py97 def si(x): argument
98 if x == 0:
101 p = 3*int(m.log(abs(x), 10**3))
104 s = '%.3f' % (abs(x) / (10.0**p))
110 return '%s%s%s' % ('-' if x < 0 else '', s, SI_PREFIXES[p])
113 def si2(x): argument
114 if x == 0:
117 p = 10*int(m.log(abs(x), 2**10))
120 s = '%.3f' % (abs(x) / (2.0**p))
126 return '%s%s%s' % ('-' if x < 0 else '', s, SI2_PREFIXES[p])
[all …]
Dplot.py91 def si(x, w=4): argument
92 if x == 0:
98 p = 3*int(m.log(abs(x)*10, 10**3))
101 s = '%.*f' % (w, abs(x) / (10.0**p))
105 s = s[:max(s.find('.'), w-(2 if x < 0 else 1))]
108 return '%s%s%s' % ('-' if x < 0 else '', s, SI_PREFIXES[p])
110 def si2(x, w=5): argument
111 if x == 0:
117 p = 10*int(m.log(abs(x)*10, 2**10))
120 s = '%.*f' % (w, abs(x) / (2.0**p))
[all …]
Dsummary.py33 'mean': lambda xs: Float(sum(float(x) for x in xs) / len(xs)),
36 m.sqrt(sum((float(x) - mean)**2 for x in xs) / len(xs)))
37 )(sum(float(x) for x in xs) / len(xs)),
38 'gmean': lambda xs: Float(m.prod(float(x) for x in xs)**(1/len(xs))),
41 m.exp(m.sqrt(sum(m.log(float(x)/gmean)**2 for x in xs) / len(xs)))
43 )(m.prod(float(x) for x in xs)**(1/len(xs))),
50 def __new__(cls, x=0): argument
51 if isinstance(x, Int):
52 return x
53 if isinstance(x, str):
[all …]
Dperfbd.py34 def __new__(cls, x=0): argument
35 if isinstance(x, Int):
36 return x
37 if isinstance(x, str):
39 x = int(x, 0)
42 if re.match('^\s*\+?\s*(?:∞|inf)\s*$', x):
43 x = m.inf
44 elif re.match('^\s*-\s*(?:∞|inf)\s*$', x):
45 x = -m.inf
48 assert isinstance(x, int) or m.isinf(x), x
[all …]
Dcov.py34 def __new__(cls, x=0): argument
35 if isinstance(x, Int):
36 return x
37 if isinstance(x, str):
39 x = int(x, 0)
42 if re.match('^\s*\+?\s*(?:∞|inf)\s*$', x):
43 x = m.inf
44 elif re.match('^\s*-\s*(?:∞|inf)\s*$', x):
45 x = -m.inf
48 assert isinstance(x, int) or m.isinf(x), x
[all …]
Dtracebd.py132 def hilbert_(x, y, a_x, a_y, b_x, b_y): argument
143 yield (x,y)
144 x, y = x+a_dx, y+a_dy
150 yield (x,y)
151 x, y = x+b_dx, y+b_dy
165 yield from hilbert_(x, y, a_x_, a_y_, b_x, b_y)
166 yield from hilbert_(x+a_x_, y+a_y_, a_x-a_x_, a_y-a_y_, b_x, b_y)
173 yield from hilbert_(x, y, b_x_, b_y_, a_x_, a_y_)
174 yield from hilbert_(x+b_x_, y+b_y_, a_x, a_y, b_x-b_x_, b_y-b_y_)
176 x+(a_x-a_dx)+(b_x_-b_dx), y+(a_y-a_dy)+(b_y_-b_dy),
[all …]
Dperf.py43 def __new__(cls, x=0): argument
44 if isinstance(x, Int):
45 return x
46 if isinstance(x, str):
48 x = int(x, 0)
51 if re.match('^\s*\+?\s*(?:∞|inf)\s*$', x):
52 x = m.inf
53 elif re.match('^\s*-\s*(?:∞|inf)\s*$', x):
54 x = -m.inf
57 assert isinstance(x, int) or m.isinf(x), x
[all …]
Ddata.py34 def __new__(cls, x=0): argument
35 if isinstance(x, Int):
36 return x
37 if isinstance(x, str):
39 x = int(x, 0)
42 if re.match('^\s*\+?\s*(?:∞|inf)\s*$', x):
43 x = m.inf
44 elif re.match('^\s*-\s*(?:∞|inf)\s*$', x):
45 x = -m.inf
48 assert isinstance(x, int) or m.isinf(x), x
[all …]
Dcode.py34 def __new__(cls, x=0): argument
35 if isinstance(x, Int):
36 return x
37 if isinstance(x, str):
39 x = int(x, 0)
42 if re.match('^\s*\+?\s*(?:∞|inf)\s*$', x):
43 x = m.inf
44 elif re.match('^\s*-\s*(?:∞|inf)\s*$', x):
45 x = -m.inf
48 assert isinstance(x, int) or m.isinf(x), x
[all …]
Dstack.py25 def __new__(cls, x=0): argument
26 if isinstance(x, Int):
27 return x
28 if isinstance(x, str):
30 x = int(x, 0)
33 if re.match('^\s*\+?\s*(?:∞|inf)\s*$', x):
34 x = m.inf
35 elif re.match('^\s*-\s*(?:∞|inf)\s*$', x):
36 x = -m.inf
39 assert isinstance(x, int) or m.isinf(x), x
[all …]
Dstructs.py30 def __new__(cls, x=0): argument
31 if isinstance(x, Int):
32 return x
33 if isinstance(x, str):
35 x = int(x, 0)
38 if re.match('^\s*\+?\s*(?:∞|inf)\s*$', x):
39 x = m.inf
40 elif re.match('^\s*-\s*(?:∞|inf)\s*$', x):
41 x = -m.inf
44 assert isinstance(x, int) or m.isinf(x), x
[all …]
Dreadtree.py169 parser.add_argument('block_size', type=lambda x: int(x, 0),
172 type=lambda x: int(x, 0),
175 type=lambda x: int(x, 0),
Dtest.py118 for x in range(start, stop, step):
120 v_[:m.start()], x, v_[m.end():]))
1265 type=lambda x: x.split(),
1355 type=lambda x: int(x, 0),
1376 type=lambda x: int(x, 0),
1396 type=lambda x: int(x, 0),
1408 type=lambda x: x.split(),
1423 type=lambda x: x.split(),
1445 type=lambda x: x.split(),
1450 type=lambda x: x.split(),
Dreadblock.py22 parser.add_argument('block_size', type=lambda x: int(x, 0),
24 parser.add_argument('block', type=lambda x: int(x, 0),
Dbench.py115 for x in range(start, stop, step):
117 v_[:m.start()], x, v_[m.end():]))
1230 type=lambda x: x.split(),
1313 type=lambda x: int(x, 0),
1334 type=lambda x: int(x, 0),
1354 type=lambda x: x.split(),
1369 type=lambda x: x.split(),
1391 type=lambda x: x.split(),
1396 type=lambda x: x.split(),
Dreadmdir.py387 parser.add_argument('block_size', type=lambda x: int(x, 0),
389 parser.add_argument('block1', type=lambda x: int(x, 0),
391 parser.add_argument('block2', nargs='?', type=lambda x: int(x, 0),
Dchangeprefix.py175 type=lambda x: x.split(),
Dtailpipe.py158 type=lambda x: int(x, 0),
Dwatch.py238 type=lambda x: int(x, 0),
/littlefs-latest/benches/
Dbench_dir.toml18 sprintf(name, "file%08x", i);
42 sprintf(name, "file%08x", i_);
83 sprintf(name, "file%08x", i_);
120 sprintf(name, "file%08x", i);
144 sprintf(name, "file%08x", i_);
166 sprintf(name, "file%08x", i);
194 sprintf(name, "file%08x", i);
226 sprintf(name, "dir%08x", i_);
249 sprintf(name, "dir%08x", i);
261 sprintf(name, "dir%08x", i_);
/littlefs-latest/runners/
Dbench_runner.c54 static void leb16_print(uintmax_t x) { in leb16_print() argument
56 if ((intmax_t)x < 0) { in leb16_print()
58 x = -x; in leb16_print()
62 char nibble = (x & 0xf) | (x > 0xf ? 0x10 : 0); in leb16_print()
64 if (x <= 0xf) { in leb16_print()
67 x >>= 4; in leb16_print()
73 uintmax_t x = 0; in leb16_parse() local
95 x |= (nibble & 0xf) << (4*i); in leb16_parse()
106 return neg ? -x : x; in leb16_parse()
149 #define BENCH_CONST(x) {bench_define_lit, (void*)(uintptr_t)(x)} argument
[all …]
Dtest_runner.c54 static void leb16_print(uintmax_t x) { in leb16_print() argument
56 if ((intmax_t)x < 0) { in leb16_print()
58 x = -x; in leb16_print()
62 char nibble = (x & 0xf) | (x > 0xf ? 0x10 : 0); in leb16_print()
64 if (x <= 0xf) { in leb16_print()
67 x >>= 4; in leb16_print()
73 uintmax_t x = 0; in leb16_parse() local
95 x |= (nibble & 0xf) << (4*i); in leb16_parse()
106 return neg ? -x : x; in leb16_parse()
162 #define TEST_CONST(x) {test_define_lit, (void*)(uintptr_t)(x)} argument
[all …]
/littlefs-latest/
Dlfs_util.h11 #define LFS_STRINGIZE(x) LFS_STRINGIZE2(x) argument
12 #define LFS_STRINGIZE2(x) #x argument
DDESIGN.md293 storage, in the worst case a small log costs 4x the size of the original data.
531 So at 50% usage, we're seeing an average of 2x cost per update, and at 75%
532 usage, we're already at an average of 4x cost per update.
537 limit. This limits the overhead of garbage collection to 2x the runtime cost,
552 of 4x the original size. I imagine users would not be happy if they found
741 1. ctz(![x]) = the number of trailing bits that are 0 in ![x]
742 2. popcount(![x]) = the number of bits that are 1 in ![x]
1339 with 4 KiB blocks, this is 12 KiB of overhead. A ridiculous 3072x increase.
1426 have a ~4x storage cost, so if our file is smaller than 1/4 the block size,
1471 means that our files never use more than 4x storage overhead, decreasing as
[all …]
/littlefs-latest/tests/
Dtest_exhaustion.toml284 // check we increased the lifetime by 2x with ~10% error
381 // check we increased the lifetime by 2x with ~10% error
478 printf("%08x: wear %d\n", b, wear);

12