Home
last modified time | relevance | path

Searched refs:np (Results 1 – 25 of 309) sorted by relevance

12345678910>>...13

/external/valgrind/none/tests/linux/
Dmremap.c31 char *np; in main() local
35 np = mremap(p, 1024*1024, 256*1024, 0); /* shrink, fixed */ in main()
36 if (np == (char *)-1) in main()
38 if (np != p) in main()
40 p, np); in main()
41 if (np != (char *)-1) in main()
42 munmap(np, 256*1024); in main()
45 np = mremap(p, 1024*1024, 256*1024, MREMAP_MAYMOVE); /* shrink, maymove */ in main()
46 if (np == (char *)-1) in main()
48 if (np != p) in main()
[all …]
/external/chromium-trace/catapult/telemetry/telemetry/internal/image_processing/
Dcv_util_unittest.py10 np = external_modules.ImportRequiredModule('numpy') variable
24 l1 = np.asfarray((0, 0, 1, 0))
25 l2 = np.asfarray((0, 0, 0, 1))
29 np.pi / 2 - 1e-10))
31 np.pi / 2 - 1e-10))
32 self.assertTrue(self.cv_util.AreLinesOrthogonal(l1, l1, np.pi / 2))
33 self.assertTrue(self.cv_util.AreLinesOrthogonal(l2, l2, np.pi / 2))
35 l3 = np.asfarray((0, 0, 1, 1))
36 l4 = np.asfarray((1, 1, 0, 0))
38 np.pi / 2 - 1e-10))
[all …]
Dcv_util.py10 np = external_modules.ImportRequiredModule('numpy') variable
16 theta1 = np.arctan2(np.float(line1[1] - line1[3]),
17 np.float(line1[0] - line1[2]))
18 theta2 = np.arctan2(np.float(line2[1] - line2[3]),
19 np.float(line2[0] - line2[2]))
21 if angle2 >= np.pi:
22 angle2 -= np.pi
25 return not abs(angle2 - (np.pi / 2.0)) > tolerance
39 E = np.subtract(line1p1, line1p0)
40 F = np.subtract(line2p1, line2p0)
[all …]
Dscreen_finder.py27 np = external_modules.ImportRequiredModule('numpy') variable
94 SMALL_ANGLE = 5 / 180 * np.pi # 5 degrees in radians
174 hlines = cv2.HoughLinesP(self._frame_edges, 1, np.pi / 180, 60,
180 lines = cv_util.ExtendLines(np.float32(hlines[0]), 10000) \
186 points = np.vstack(intersections[:, 0].flat)
196 corners = np.empty((4, 2), np.float32)
197 corners[:] = np.nan
242 intersections = np.empty((0, 3), np.float32)
247 if not cv_util.AreLinesOrthogonal(lines[i], lines[j], (np.pi / 4.0)):
250 point = np.float32(point)
[all …]
Dscreen_finder_unittest.py14 np = external_modules.ImportRequiredModule('numpy') variable
80 prev_corners = np.asfarray(([1000, 1000], [0, 1000], [0, 0], [1000, 0]))
95 line1 = np.asfarray(((0, 0, 1, 0)))
96 line2 = np.asfarray(((0, 0, 0, 1)))
97 point = np.asfarray((0, 0))
99 corners = np.asfarray(((1, 0), (0, 1)))
101 corners = np.append(corners, (100, 1))
102 corners = np.append(corners, (1, 100))
106 corners = np.append(corners, (100, 0))
107 corners = np.append(corners, (0, 100))
[all …]
Dimage_util_numpy_impl.py13 np = external_modules.ImportRequiredModule('numpy') variable
26 return bytearray(np.uint8(image[:, :, ::-1]).flat) # Convert from bgr to rgb.
46 img = np.array(pixels, order='F', dtype=np.uint8)
64 file_bytes = np.asarray(bytearray(png_data), dtype=np.uint8)
74 amax = np.maximum(image1, image2)
75 amin = np.minimum(image1, image2)
85 return np.amax(_SimpleDiff(image1, image2)) <= tolerance
88 if np.amax(_SimpleDiff(image1[row], image2[row])) > tolerance:
108 self_image = np.zeros((width, height, image1.shape[2]), np.uint8)
109 other_image = np.zeros((width, height, image1.shape[2]), np.uint8)
[all …]
/external/libcxx/test/std/localization/locale.stdcvt/
Dcodecvt_utf16_in.pass.cpp37 const char* np = nullptr; in main() local
38 std::codecvt_base::result r = c.in(m, n, n+4, np, &w, &w+1, wp); in main()
41 assert(np == n+4); in main()
46 r = c.in(m, n, n+2, np, &w, &w+1, wp); in main()
49 assert(np == n+2); in main()
54 r = c.in(m, n, n+2, np, &w, &w+1, wp); in main()
57 assert(np == n+2); in main()
63 r = c.in(m, n, n+2, np, &w, &w+1, wp); in main()
66 assert(np == n+2); in main()
76 const char* np = nullptr; in main() local
[all …]
Dcodecvt_utf8_utf16_in.pass.cpp37 const char* np = nullptr; in main() local
38 std::codecvt_base::result r = c.in(m, n, n+4, np, w, w+2, wp); in main()
41 assert(np == n+4); in main()
48 r = c.in(m, n, n+3, np, w, w+2, wp); in main()
51 assert(np == n+3); in main()
56 r = c.in(m, n, n+2, np, w, w+2, wp); in main()
59 assert(np == n+2); in main()
63 r = c.in(m, n, n+1, np, w, w+2, wp); in main()
66 assert(np == n+1); in main()
76 const char* np = nullptr; in main() local
[all …]
Dcodecvt_utf8_utf16_out.pass.cpp37 char* np = nullptr; in main() local
38 std::codecvt_base::result r = c.out(m, w, w+2, wp, n, n+4, np); in main()
41 assert(np == n+4); in main()
48 r = c.out(m, w, w+1, wp, n, n+4, np); in main()
51 assert(np == n+3); in main()
57 r = c.out(m, w, w+1, wp, n, n+4, np); in main()
60 assert(np == n+2); in main()
65 r = c.out(m, w, w+1, wp, n, n+4, np); in main()
68 assert(np == n+1); in main()
78 char* np = nullptr; in main() local
[all …]
Dcodecvt_utf8_in.pass.cpp37 const char* np = nullptr; in main() local
38 std::codecvt_base::result r = c.in(m, n, n+4, np, &w, &w+1, wp); in main()
41 assert(np == n+4); in main()
47 r = c.in(m, n, n+3, np, &w, &w+1, wp); in main()
50 assert(np == n+3); in main()
55 r = c.in(m, n, n+2, np, &w, &w+1, wp); in main()
58 assert(np == n+2); in main()
63 r = c.in(m, n, n+1, np, &w, &w+1, wp); in main()
66 assert(np == n+1); in main()
76 const char* np = nullptr; in main() local
[all …]
Dcodecvt_utf8_out.pass.cpp37 char* np = nullptr; in main() local
38 std::codecvt_base::result r = c.out(m, &w, &w+1, wp, n, n+4, np); in main()
41 assert(np == n+4); in main()
48 r = c.out(m, &w, &w+1, wp, n, n+4, np); in main()
51 assert(np == n+3); in main()
58 r = c.out(m, &w, &w+1, wp, n, n+4, np); in main()
61 assert(np == n+2); in main()
68 r = c.out(m, &w, &w+1, wp, n, n+4, np); in main()
71 assert(np == n+1); in main()
84 char* np = nullptr; in main() local
[all …]
Dcodecvt_utf16_out.pass.cpp37 char* np = nullptr; in main() local
38 std::codecvt_base::result r = c.out(m, &w, &w+1, wp, n, n+4, np); in main()
41 assert(np == n+4); in main()
48 r = c.out(m, &w, &w+1, wp, n, n+4, np); in main()
51 assert(np == n+2); in main()
58 r = c.out(m, &w, &w+1, wp, n, n+4, np); in main()
61 assert(np == n+2); in main()
68 r = c.out(m, &w, &w+1, wp, n, n+4, np); in main()
71 assert(np == n+2); in main()
84 char* np = nullptr; in main() local
[all …]
/external/e2fsprogs/intl/
Dprintf-parse.c137 const CHAR_T *np; in PRINTF_PARSE() local
139 for (np = cp; *np >= '0' && *np <= '9'; np++) in PRINTF_PARSE()
141 if (*np == '$') in PRINTF_PARSE()
145 for (np = cp; *np >= '0' && *np <= '9'; np++) in PRINTF_PARSE()
146 n = xsum (xtimes (n, 10), *np - '0'); in PRINTF_PARSE()
154 cp = np + 1; in PRINTF_PARSE()
207 const CHAR_T *np; in PRINTF_PARSE() local
209 for (np = cp; *np >= '0' && *np <= '9'; np++) in PRINTF_PARSE()
211 if (*np == '$') in PRINTF_PARSE()
215 for (np = cp; *np >= '0' && *np <= '9'; np++) in PRINTF_PARSE()
[all …]
/external/boringssl/src/crypto/bn/asm/
Drsaz-avx2.pl97 my $np="%rdx"; # const BN_ULONG *np,
139 $np="%r13"; # reassigned argument
173 mov %rdx, $np # reassigned argument
175 mov $np, $tmp
178 sub \$-128, $np
180 and \$4095, $tmp # see if $np crosses page
187 # cause >2x performance degradation here, so if $np does
191 vmovdqu 32*0-128($np), $ACC0
193 vmovdqu 32*1-128($np), $ACC1
194 vmovdqu 32*2-128($np), $ACC2
[all …]
/external/opencv3/samples/python2/
Dkalman.py16 import numpy as np namespace
29 state = 0.1 * np.random.randn(2, 1)
31 kalman.transitionMatrix = np.array([[1., 1.], [0., 1.]])
32 kalman.measurementMatrix = 1. * np.ones((1, 2))
33 kalman.processNoiseCov = 1e-5 * np.eye(2)
34 kalman.measurementNoiseCov = 1e-1 * np.ones((1, 1))
35 kalman.errorCovPost = 1. * np.ones((2, 2))
36 kalman.statePost = 0.1 * np.random.randn(2, 1)
40 return (np.around(img_width/2 + img_width/3*cos(angle), 0).astype(int),
41 np.around(img_height/2 - img_width/3*sin(angle), 1).astype(int))
[all …]
Ddeconvolution.py33 import numpy as np namespace
44 y, x = np.indices((h, w))
45 dist = np.dstack([x, w-x-1, y, h-y-1]).min(-1)
46 w = np.minimum(np.float32(dist)/d, 1.0)
50 kern = np.ones((1, d), np.float32)
51 c, s = np.cos(angle), np.sin(angle)
52 A = np.float32([[c, -s, 0], [s, c, 0]])
54 A[:,2] = (sz2, sz2) - np.dot(A[:,:2], ((d-1)*0.5, 0))
59 kern = np.zeros((sz, sz), np.uint8)
61 kern = np.float32(kern) / 255.0
[all …]
Dcommon.py7 import numpy as np namespace
31 return np.sqrt( anorm2(a) )
40 a = np.ravel(a)
43 return np.array(a, np.float64).reshape(2, 2)
49 M = np.float64([[ cx, 0, tx],
56 fwd = np.asarray(target, np.float64) - eye
58 right = np.cross(fwd, up)
60 down = np.cross(fwd, right)
61 R = np.float64([right, down, fwd])
62 tvec = -np.dot(R, eye)
[all …]
Dgrabcut.py30 import numpy as np namespace
111 mask = np.zeros(img.shape[:2],dtype = np.uint8) # mask initialized to PR_BG
112 output = np.zeros(img.shape,np.uint8) # output image to be shown
143 bar = np.zeros((img.shape[0],5,3),np.uint8)
144 res = np.hstack((img2,bar,img,bar,output))
156 mask = np.zeros(img.shape[:2],dtype = np.uint8) # mask initialized to PR_BG
157 output = np.zeros(img.shape,np.uint8) # output image to be shown
162 bgdmodel = np.zeros((1,65),np.float64)
163 fgdmodel = np.zeros((1,65),np.float64)
167 bgdmodel = np.zeros((1,65),np.float64)
[all …]
/external/antlr/antlr-3.4/runtime/ObjC/Framework/
DANTLRMap.m98 -(void)deleteANTLRMap:(ANTLRMapElement *)np
199 ANTLRMapElement *np;
201 for( np = self->ptrBuffer[[self hash:s]]; np != nil; np = [np getfNext] ) {
202 if ( [s isEqualToString:[np getName]] ) {
203 return( np ); /* found it */
225 ANTLRMapElement *np;
227 np = [self lookup:[sym getName]];
228 if ( np == nil ) {
251 ANTLRMapElement *np, *tmp;
255 for ( tmp = self->ptrBuffer[idx], np = self->ptrBuffer[idx]; np != nil; np = [np getfNext] ) {
[all …]
/external/bison/lib/
Dprintf-parse.c156 const CHAR_T *np; in PRINTF_PARSE() local
158 for (np = cp; *np >= '0' && *np <= '9'; np++) in PRINTF_PARSE()
160 if (*np == '$') in PRINTF_PARSE()
164 for (np = cp; *np >= '0' && *np <= '9'; np++) in PRINTF_PARSE()
165 n = xsum (xtimes (n, 10), *np - '0'); in PRINTF_PARSE()
173 cp = np + 1; in PRINTF_PARSE()
233 const CHAR_T *np; in PRINTF_PARSE() local
235 for (np = cp; *np >= '0' && *np <= '9'; np++) in PRINTF_PARSE()
237 if (*np == '$') in PRINTF_PARSE()
241 for (np = cp; *np >= '0' && *np <= '9'; np++) in PRINTF_PARSE()
[all …]
/external/tcpdump/
Dnameser.h239 #define DNS_QR(np) ((np)->flags1 & 0x80) /* response flag */ argument
240 #define DNS_OPCODE(np) ((((np)->flags1) >> 3) & 0xF) /* purpose of message */ argument
241 #define DNS_AA(np) ((np)->flags1 & 0x04) /* authoritative answer */ argument
242 #define DNS_TC(np) ((np)->flags1 & 0x02) /* truncated message */ argument
243 #define DNS_RD(np) ((np)->flags1 & 0x01) /* recursion desired */ argument
245 #define DNS_RA(np) ((np)->flags2 & 0x80) /* recursion available */ argument
246 #define DNS_AD(np) ((np)->flags2 & 0x20) /* authentic data from named */ argument
247 #define DNS_CD(np) ((np)->flags2 & 0x10) /* checking disabled by resolver */ argument
248 #define DNS_RCODE(np) ((np)->flags2 & 0xF) /* response code */ argument
/external/libcxx/test/std/localization/locale.categories/facet.numpunct/locale.numpunct.byname/
Ddecimal_point.pass.cpp30 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); in main() local
31 assert(np.decimal_point() == '.'); in main()
35 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); in main() local
36 assert(np.decimal_point() == L'.'); in main()
43 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); in main() local
44 assert(np.decimal_point() == '.'); in main()
48 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); in main() local
49 assert(np.decimal_point() == L'.'); in main()
56 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); in main() local
57 assert(np.decimal_point() == ','); in main()
[all …]
Dgrouping.pass.cpp33 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); in main() local
34 assert(np.grouping() == ""); in main()
38 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); in main() local
39 assert(np.grouping() == ""); in main()
46 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); in main() local
47 assert(np.grouping() == "\3\3"); in main()
51 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); in main() local
52 assert(np.grouping() == "\3\3"); in main()
59 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); in main() local
60 assert(np.grouping() == "\x7F"); in main()
[all …]
Dthousands_sep.pass.cpp33 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); in main() local
34 assert(np.thousands_sep() == ','); in main()
38 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); in main() local
39 assert(np.thousands_sep() == L','); in main()
46 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); in main() local
47 assert(np.thousands_sep() == ','); in main()
51 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); in main() local
52 assert(np.thousands_sep() == L','); in main()
59 const std::numpunct<C>& np = std::use_facet<std::numpunct<C> >(l); in main() local
60 assert(np.thousands_sep() == ','); in main()
[all …]
/external/toybox/lib/
Dportability.c34 ssize_t getdelim(char **linep, size_t *np, int delim, FILE *stream) in getdelim() argument
42 if (!linep || !np) { in getdelim()
47 if (*linep == NULL || *np == 0) { in getdelim()
48 *np = 1024; in getdelim()
49 *linep = calloc(1, *np); in getdelim()
55 if (i > *np) { in getdelim()
57 new_len = *np + 1024; in getdelim()
60 *np = new_len; in getdelim()
69 if (i > *np) { in getdelim()
74 *np = new_len; in getdelim()
[all …]

12345678910>>...13