Lines Matching refs:elem

164    struct rnndelem *elem;
169 push_rnndoff(lua_State *L, struct rnn *rnn, struct rnndelem *elem,
174 rnndoff->elem = elem;
179 struct rnndelem *elem, uint64_t offset);
180 static int l_rnn_etype_reg(lua_State *L, struct rnn *rnn, struct rnndelem *elem,
213 l_rnn_etype(lua_State *L, struct rnn *rnn, struct rnndelem *elem,
218 DBG("elem=%p (%d), offset=%lu", elem, elem->type, offset);
219 switch (elem->type) {
225 regval <<= elem->typeinfo.shr;
226 ret = pushdecval(L, rnn, regval, &elem->typeinfo);
229 return l_rnn_etype_reg(L, rnn, elem, offset);
231 return l_rnn_etype_array(L, rnn, elem, offset);
234 printf("unhandled type: %d\n", elem->type);
250 struct rnndelem *elem = rnndoff->elem;
253 for (i = 0; i < elem->subelemsnum; i++) {
254 struct rnndelem *subelem = elem->subelems[i];
269 l_rnn_etype_struct(lua_State *L, struct rnn *rnn, struct rnndelem *elem,
272 push_rnndoff(L, rnn, elem, offset);
292 struct rnndelem *elem = rnndoff->elem;
293 uint64_t offset = rnndoff->offset + (elem->stride * idx);
296 rnndoff->elem->subelemsnum);
302 if (elem->subelemsnum == 1) {
303 return l_rnn_etype(L, rnndoff->rnn, elem->subelems[0], offset);
305 return l_rnn_etype_struct(L, rnndoff->rnn, elem, offset);
316 l_rnn_etype_array(lua_State *L, struct rnn *rnn, struct rnndelem *elem,
319 push_rnndoff(L, rnn, elem, offset);
339 struct rnndelem *elem = rnndoff->elem;
340 struct rnntypeinfo *info = &elem->typeinfo;
369 rnndoff->elem->subelemsnum, bf->typeinfo.type, regval);
406 regval <<= rnndoff->elem->typeinfo.shr;
420 l_rnn_etype_reg(lua_State *L, struct rnn *rnn, struct rnndelem *elem,
423 push_rnndoff(L, rnn, elem, offset);
443 struct rnndelem *elem;
445 elem = rnn_regelem(rnn, name);
446 if (!elem)
449 return l_rnn_etype(L, rnn, elem, elem->offset);
681 struct rnndelem *elem;
689 elem = rnn_regoff(rnn, offset);
690 if (!elem)
693 return l_rnn_etype(L, rnn, elem, elem->offset);