Home
last modified time | relevance | path

Searched refs:n (Results 1 – 25 of 217) sorted by relevance

123456789

/device/linaro/hikey/hifi/xaf/hifi-dpf/core/util/
Dtinyvprintf.c72 unsigned n; in tiny_vsprintf() local
100 case 'd': n = va_arg(ap, int); in tiny_vsprintf()
101 if ((int)n < 0) { in tiny_vsprintf()
103 n = -(int)n; in tiny_vsprintf()
115 case 'u': n = va_arg(ap, int); in tiny_vsprintf()
120 for (digit = 0; n >= 1000000000; digit++) in tiny_vsprintf()
121 n -= 1000000000; in tiny_vsprintf()
127 for (digit = 0; n >= 100000000; digit++) in tiny_vsprintf()
128 n -= 100000000; in tiny_vsprintf()
135 n = ((n << 1) + (n << 3)); in tiny_vsprintf()
[all …]
Drbtree.c64 #define RB_SET_P(t, n, p) \ argument
65 ({ (n)->parent = (p); })
67 #define RB_SET_L(t, n, l) \ argument
68 ({ (n)->left = (l); })
70 #define RB_SET_R(t, n, r) \ argument
71 ({ (n)->right = (r); })
73 #define RB_SET_C(t, n, c) \ argument
74 RB_SET_C_##c((t), (n))
76 #define RB_SET_C_RB_BLK(t, n) \ argument
77 ({ (n)->color &= ~1; })
[all …]
/device/google/contexthub/firmware/lib/builtins/
Dudivmoddi4.c28 udwords n; in __udivmoddi4() local
29 n.all = a; in __udivmoddi4()
36 if (n.s.high == 0) in __udivmoddi4()
45 *rem = n.s.low % d.s.low; in __udivmoddi4()
46 return n.s.low / d.s.low; in __udivmoddi4()
53 *rem = n.s.low; in __udivmoddi4()
66 *rem = n.s.high % d.s.low; in __udivmoddi4()
67 return n.s.high / d.s.low; in __udivmoddi4()
70 if (n.s.low == 0) in __udivmoddi4()
78 r.s.high = n.s.high % d.s.high; in __udivmoddi4()
[all …]
/device/generic/opengl-transport/host/commands/emugen/
DParser_unittest.cpp32 for (size_t n = 0; n < kDataSize; ++n) { in TEST() local
35 text += kData[n].input; in TEST()
38 result = normalizeTypeDeclaration(kData[n].input); in TEST()
39 EXPECT_STREQ(kData[n].expected, result.c_str()) << text; in TEST()
63 for (size_t n = 0; n < kDataSize; ++n) { in TEST() local
66 text += kData[n].input; in TEST()
69 EXPECT_EQ(kData[n].expected, in TEST()
70 parseTypeDeclaration(kData[n].input, in TEST()
73 if (kData[n].expected) { in TEST()
74 EXPECT_STREQ(kData[n].expectedType, vartype.c_str()) << text; in TEST()
[all …]
DParser.cpp79 for (size_t n = 0; n < out->size(); ++n) { in parseTypeTokens() local
80 std::string& token = (*out)[n]; in parseTypeTokens()
99 for (size_t n = 0; n < count; ++n) { in buildTypeString() local
100 const std::string& token = tokens[n]; in buildTypeString()
101 if (n > 0 && token != "*") { in buildTypeString()
132 for (size_t n = 0; n < tokens.size(); ++n) { in parseTypeDeclaration() local
133 if (tokens[n] != "*" && tokens[n] != "const") { in parseTypeDeclaration()
159 for (size_t n = 0; n < tokens.size(); ++n) { in parseParameterDeclaration() local
160 if (tokens[n] != "*" && tokens[n] != "const") { in parseParameterDeclaration()
/device/google/cuttlefish/host/frontend/gcastv2/https/
DBaseConnection.cpp42 ssize_t n; in onClientRequest() local
44 n = mSocket->recv(&mInBuffer[mInBufferLen], kMaxChunkSize); in onClientRequest()
45 } while (n < 0 && errno == EINTR); in onClientRequest()
47 if (n <= 0) { in onClientRequest()
48 onDisconnect((n < 0) ? -errno : 0); in onClientRequest()
52 mInBufferLen += static_cast<size_t>(n); in onClientRequest()
55 n = processClientRequest(mInBuffer.data(), mInBufferLen); in onClientRequest()
57 if (n <= 0) { in onClientRequest()
61 mInBuffer.erase(mInBuffer.begin(), mInBuffer.begin() + n); in onClientRequest()
62 mInBufferLen -= n; in onClientRequest()
[all …]
DSSLSocket.cpp119 int n = SSL_peek(mSSL.get(), tmp, sizeof(tmp)); in postRecv() local
121 if (n > 0) { in postRecv()
156 int n = BIO_write(mBioR, &buffer[offset], len); in handleIncomingData() local
157 CHECK_GT(n, 0); in handleIncomingData()
159 offset += n; in handleIncomingData()
160 len -= n; in handleIncomingData()
164 n = SSL_accept(mSSL.get()); in handleIncomingData()
166 n = SSL_connect(mSSL.get()); in handleIncomingData()
169 auto err = SSL_get_error(mSSL.get(), n); in handleIncomingData()
229 int n = SSL_peek(mSSL.get(), buffer, sizeof(buffer)); in handleIncomingData() local
[all …]
DClientSocket.cpp69 ssize_t n; in handleIncomingData() local
71 n = getImpl()->recv(mInBuffer.data() + mInBufferLen, 1024); in handleIncomingData()
72 } while (n < 0 && errno == EINTR); in handleIncomingData()
74 if (n == 0) { in handleIncomingData()
84 } else if (n < 0) { in handleIncomingData()
96 mInBufferLen += static_cast<size_t>(n); in handleIncomingData()
131 ssize_t n = mWebSocketHandler->handleRequest( in handleRequest() local
136 << n in handleRequest()
142 if (n > 0) { in handleRequest()
143 mInBuffer.erase(mInBuffer.begin(), mInBuffer.begin() + n); in handleRequest()
[all …]
DHTTPClientConnection.cpp131 ssize_t n; in receiveResponse() local
133 n = mImpl->recv(mInBuffer.data() + mInBufferLen, 1024); in receiveResponse()
134 } while (n < 0 && errno == EINTR); in receiveResponse()
136 if (n == 0) { in receiveResponse()
139 } else if (n < 0) { in receiveResponse()
144 mInBufferLen += static_cast<size_t>(n); in receiveResponse()
154 ssize_t n = mWebSocketHandler->handleRequest( in handleResponse() local
157 if (n > 0) { in handleResponse()
158 mInBuffer.erase(mInBuffer.begin(), mInBuffer.begin() + n); in handleResponse()
159 mInBufferLen -= n; in handleResponse()
[all …]
/device/linaro/hikey/hifi/xaf/hifi-dpf/ipc/xt-shmem/hikey/
Ddsp_debug.c35 static int hex2asc(int n) in hex2asc() argument
37 n &= 15; in hex2asc()
38 if(n > 9){ in hex2asc()
39 return ('a' - 10) + n; in hex2asc()
41 return '0' + n; in hex2asc()
45 static void xputs(const char *s, void (*xputc)(unsigned n, void *cookie), void *cookie) in xputs() argument
52 void __xprintf(const char *fmt, va_list ap,void (*xputc)(unsigned n, void *cookie), void *cookie) in __xprintf() argument
63 unsigned n = va_arg(ap, unsigned); in __xprintf() local
64 xputc(n, cookie); in __xprintf()
69 unsigned n = va_arg(ap, unsigned); in __xprintf() local
[all …]
/device/generic/goldfish-opengl/shared/qemupipe/
Dqemu_pipe_common.cpp21 int n = QEMU_PIPE_RETRY(qemu_pipe_read(pipe, p, size)); in qemu_pipe_read_fully() local
22 if (n < 0) return n; in qemu_pipe_read_fully()
24 p += n; in qemu_pipe_read_fully()
25 size -= n; in qemu_pipe_read_fully()
35 int n = QEMU_PIPE_RETRY(qemu_pipe_write(pipe, p, size)); in qemu_pipe_write_fully() local
36 if (n < 0) return n; in qemu_pipe_write_fully()
38 p += n; in qemu_pipe_write_fully()
39 size -= n; in qemu_pipe_write_fully()
/device/google/contexthub/firmware/os/algos/
Dtime_sync.c22 sync->n = 0; in time_sync_reset()
37 sync->n = (window_size < sync->n) ? window_size : sync->n; in time_sync_truncate()
41 size_t bidx = (sync->i >= sync->n) ? (sync->i - sync->n) in time_sync_truncate()
42 : (sync->i + NUM_TIME_SYNC_DATAPOINTS - sync->n); in time_sync_truncate()
57 sync->i = (sync->n < NUM_TIME_SYNC_DATAPOINTS) ? sync->n : 0; in time_sync_truncate()
72 size_t prev_n = sync->n; in time_sync_add()
73 if (sync->n < NUM_TIME_SYNC_DATAPOINTS) { in time_sync_add()
74 ++sync->n; in time_sync_add()
91 if (sync->n < 2) in time_sync_estimate_time1()
97 size_t n = sync->n; in time_sync_estimate_time1() local
[all …]
/device/google/contexthub/firmware/os/inc/
Dutil.h47 static inline bool IS_POWER_OF_TWO(unsigned int n) in IS_POWER_OF_TWO() argument
49 return !(n & (n - 1)); in IS_POWER_OF_TWO()
52 static inline int LOG2_FLOOR(unsigned int n) in LOG2_FLOOR() argument
54 if (UNLIKELY(n == 0)) in LOG2_FLOOR()
58 return 8 * sizeof(n) - CLZ(n) - 1; in LOG2_FLOOR()
61 static inline int LOG2_CEIL(unsigned int n) in LOG2_CEIL() argument
63 return IS_POWER_OF_TWO(n) ? LOG2_FLOOR(n) : LOG2_FLOOR(n) + 1; in LOG2_CEIL()
/device/google/contexthub/firmware/lib/libm/
Dsf_scalbn.c37 float scalbnf (float x, int n) in scalbnf() argument
39 float scalbnf (x,n) in scalbnf()
40 float x; int n; in scalbnf()
57 if (n< -50000) return tiny*x; /*underflow*/
59 k = k+n;
64 if (n > OVERFLOW_INT) /* in case integer overflow in n+k */
76 double scalbn(double x, int n) in scalbn() argument
78 double scalbn(x,n) in scalbn()
80 int n;
83 return (double) scalbnf((float) x, n);
Def_fmod.c37 __int32_t n,hx,hy,hz,ix,iy,sx,i; local
70 n = -126-ix;
71 hx = hx<<n;
76 n = -126-iy;
77 hy = hy<<n;
81 n = ix - iy;
82 while(n--) {
107 n = -126 - iy;
108 hx >>= n;
Def_rem_pio2.c107 __int32_t i,j,n,ix,hx; local
141 n = (__int32_t) (t*invpio2+half);
142 fn = (float)n;
145 if(n<32&&(ix&0xffffff00)!=npio2_hw[n-1]) {
171 if(hx<0) {y[0] = -y[0]; y[1] = -y[1]; return -n;}
172 else return n;
190 n = __kernel_rem_pio2f(tx,y,e0,nx,2,two_over_pi);
191 if(hx<0) {y[0] = -y[0]; y[1] = -y[1]; return -n;}
192 return n;
Def_pow.c68 __int32_t i,j,k,yisint,n; local
152 n = 0;
155 {ax *= two24; n -= 24; GET_FLOAT_WORD(ix,ax); }
156 n += ((ix)>>23)-0x7f;
162 else {k=0;n+=1;ix -= 0x00800000;}
196 t = (float)n;
230 n = 0;
232 n = j+(0x00800000>>(k+1));
233 k = ((n&0x7fffffff)>>23)-0x7f; /* new k for n */
234 SET_FLOAT_WORD(t,n&~(0x007fffff>>k));
[all …]
/device/google/crosshatch/json-c/
Dlinkhash.c110 #define hashsize(n) ((uint32_t)1<<(n)) argument
111 #define hashmask(n) (hashsize(n)-1) argument
495 unsigned long h, n; in lh_table_insert() local
501 n = h % t->size; in lh_table_insert()
504 if(t->table[n].k == LH_EMPTY || t->table[n].k == LH_FREED) break; in lh_table_insert()
506 if ((int)++n == t->size) n = 0; in lh_table_insert()
509 t->table[n].k = k; in lh_table_insert()
510 t->table[n].v = v; in lh_table_insert()
514 t->head = t->tail = &t->table[n]; in lh_table_insert()
515 t->table[n].next = t->table[n].prev = NULL; in lh_table_insert()
[all …]
/device/google/bonito/json-c/
Dlinkhash.c110 #define hashsize(n) ((uint32_t)1<<(n)) argument
111 #define hashmask(n) (hashsize(n)-1) argument
495 unsigned long h, n; in lh_table_insert() local
501 n = h % t->size; in lh_table_insert()
504 if(t->table[n].k == LH_EMPTY || t->table[n].k == LH_FREED) break; in lh_table_insert()
506 if ((int)++n == t->size) n = 0; in lh_table_insert()
509 t->table[n].k = k; in lh_table_insert()
510 t->table[n].v = v; in lh_table_insert()
514 t->head = t->tail = &t->table[n]; in lh_table_insert()
515 t->table[n].next = t->table[n].prev = NULL; in lh_table_insert()
[all …]
/device/google/coral/json-c/
Dlinkhash.c110 #define hashsize(n) ((uint32_t)1<<(n)) argument
111 #define hashmask(n) (hashsize(n)-1) argument
495 unsigned long h, n; in lh_table_insert() local
501 n = h % t->size; in lh_table_insert()
504 if(t->table[n].k == LH_EMPTY || t->table[n].k == LH_FREED) break; in lh_table_insert()
506 if ((int)++n == t->size) n = 0; in lh_table_insert()
509 t->table[n].k = k; in lh_table_insert()
510 t->table[n].v = v; in lh_table_insert()
514 t->head = t->tail = &t->table[n]; in lh_table_insert()
515 t->table[n].next = t->table[n].prev = NULL; in lh_table_insert()
[all …]
/device/linaro/hikey/hifi/xaf/hifi-dpf/core/
Dxf-mem.c135 static void xf_mm_find_by_addr(xf_mm_pool_t *pool, void *addr, xf_mm_block_t **n) in xf_mm_find_by_addr() argument
163 n[0] = (l_idx ? container_of(l_idx, xf_mm_block_t, a_node) : NULL); in xf_mm_find_by_addr()
164 n[1] = (r_idx ? container_of(r_idx, xf_mm_block_t, a_node) : NULL); in xf_mm_find_by_addr()
277 xf_mm_block_t *n[2]; in xf_mm_free() local
280 xf_mm_find_by_addr(pool, addr, n); in xf_mm_free()
283 if (n[0]) in xf_mm_free()
285 if ((void *)n[0] + xf_mm_block_length(n[0]) == addr) in xf_mm_free()
288 rb_delete(&pool->l_map, &n[0]->l_node); in xf_mm_free()
291 addr = (void *)(b = n[0]), size = xf_mm_block_length_add(b, size); in xf_mm_free()
296 n[0] = NULL; in xf_mm_free()
[all …]
/device/generic/opengl-transport/host/libs/virglrenderer/GLESv1_dec/
Dgles1.attrib55 len buffers (n * sizeof(GLuint))
56 param_check n if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
59 len textures (n * sizeof(GLuint))
60 param_check n if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
73 len buffers (n * sizeof(GLuint))
75 param_check n if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
78 len textures (n * sizeof(GLuint))
80 param_check n if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
290 len renderbuffers (n * sizeof(GLuint))
291 param_check n if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
[all …]
/device/google/contexthub/firmware/external/arm/
Darm_sin_cos_f32.c215 int32_t n; in arm_sin_f32() local
223 n = (int32_t) in; in arm_sin_f32()
228 n--; in arm_sin_f32()
232 in = in - (float32_t) n; in arm_sin_f32()
304 int32_t n; in arm_cos_f32() local
312 n = (int32_t) in; in arm_cos_f32()
317 n--; in arm_cos_f32()
321 in = in - (float32_t) n; in arm_cos_f32()
/device/generic/opengl-transport/host/libs/virglrenderer/GLESv3_dec/
Dgles3.attrib28 len buffers (n * sizeof(GLuint))
29 param_check n if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
32 len framebuffers (n * sizeof(GLuint))
33 param_check n if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
36 len renderbuffers (n * sizeof(GLuint))
37 param_check n if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
40 len textures (n * sizeof(GLuint))
41 param_check n if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
47 len buffers (n * sizeof(GLuint))
49 param_check n if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
[all …]
/device/google/contexthub/firmware/os/platform/stm32/
Dexti.c135 static inline struct ExtiInterrupt *extiForIrq(IRQn_Type n) in extiForIrq() argument
137 if (n >= EXTI0_IRQn && n <= EXTI4_IRQn) in extiForIrq()
138 return &mInterrupts[n - EXTI0_IRQn]; in extiForIrq()
139 if (n == EXTI9_5_IRQn) in extiForIrq()
141 if (n == EXTI15_10_IRQn) in extiForIrq()
146 static void extiIrqHandler(IRQn_Type n) in extiIrqHandler() argument
148 struct ExtiInterrupt *exti = extiForIrq(n); in extiIrqHandler()
184 int extiChainIsr(IRQn_Type n, struct ChainedIsr *isr) in extiChainIsr() argument
186 struct ExtiInterrupt *exti = extiForIrq(n); in extiChainIsr()
199 int extiUnchainIsr(IRQn_Type n, struct ChainedIsr *isr) in extiUnchainIsr() argument
[all …]

123456789