Lines Matching refs:rnndoff
163 struct rnndoff { struct
173 struct rnndoff *rnndoff = lua_newuserdata(L, sizeof(*rnndoff)); in push_rnndoff() local
174 rnndoff->rnn = rnn; in push_rnndoff()
175 rnndoff->elem = elem; in push_rnndoff()
176 rnndoff->offset = offset; in push_rnndoff()
251 struct rnndoff *rnndoff = lua_touserdata(L, 1); in l_rnn_struct_meta_index() local
253 struct rnndelem *elem = rnndoff->elem; in l_rnn_struct_meta_index()
259 return l_rnn_etype(L, rnndoff->rnn, subelem, in l_rnn_struct_meta_index()
260 rnndoff->offset + subelem->offset); in l_rnn_struct_meta_index()
293 struct rnndoff *rnndoff = lua_touserdata(L, 1); in l_rnn_array_meta_index() local
295 struct rnndelem *elem = rnndoff->elem; in l_rnn_array_meta_index()
296 uint64_t offset = rnndoff->offset + (elem->stride * idx); in l_rnn_array_meta_index()
298 DBG("rnndoff=%p, idx=%d, numsubelems=%d", rnndoff, idx, in l_rnn_array_meta_index()
299 rnndoff->elem->subelemsnum); in l_rnn_array_meta_index()
306 return l_rnn_etype(L, rnndoff->rnn, elem->subelems[0], offset); in l_rnn_array_meta_index()
308 return l_rnn_etype_struct(L, rnndoff->rnn, elem, offset); in l_rnn_array_meta_index()
340 struct rnndoff *rnndoff = lua_touserdata(L, 1); in l_rnn_reg_meta_index() local
342 struct rnndelem *elem = rnndoff->elem; in l_rnn_reg_meta_index()
365 uint32_t regval = rnn_val(rnndoff->rnn, rnndoff->offset); in l_rnn_reg_meta_index()
372 rnndoff->elem->subelemsnum, bf->typeinfo.type, regval); in l_rnn_reg_meta_index()
374 return pushdecval(L, rnndoff->rnn, regval, &bf->typeinfo); in l_rnn_reg_meta_index()
385 struct rnndoff *rnndoff = lua_touserdata(L, 1); in l_rnn_reg_meta_tostring() local
386 uint32_t regval = rnn_val(rnndoff->rnn, rnndoff->offset); in l_rnn_reg_meta_tostring()
387 struct rnndecaddrinfo *info = rnn_reginfo(rnndoff->rnn, rnndoff->offset); in l_rnn_reg_meta_tostring()
390 decoded = rnndec_decodeval(rnndoff->rnn->vc, info->typeinfo, regval); in l_rnn_reg_meta_tostring()
406 struct rnndoff *rnndoff = lua_touserdata(L, 1); in l_rnn_reg_meta_tonumber() local
407 uint32_t regval = rnn_val(rnndoff->rnn, rnndoff->offset); in l_rnn_reg_meta_tonumber()
409 regval <<= rnndoff->elem->typeinfo.shr; in l_rnn_reg_meta_tonumber()