Lines Matching refs:rnndoff
162 struct rnndoff { struct
172 struct rnndoff *rnndoff = lua_newuserdata(L, sizeof(*rnndoff)); in push_rnndoff() argument
173 rnndoff->rnn = rnn; in push_rnndoff()
174 rnndoff->elem = elem; in push_rnndoff()
175 rnndoff->offset = offset; in push_rnndoff()
248 struct rnndoff *rnndoff = lua_touserdata(L, 1); in l_rnn_struct_meta_index() local
250 struct rnndelem *elem = rnndoff->elem; in l_rnn_struct_meta_index()
256 return l_rnn_etype(L, rnndoff->rnn, subelem, in l_rnn_struct_meta_index()
257 rnndoff->offset + subelem->offset); in l_rnn_struct_meta_index()
290 struct rnndoff *rnndoff = lua_touserdata(L, 1); in l_rnn_array_meta_index() local
292 struct rnndelem *elem = rnndoff->elem; in l_rnn_array_meta_index()
293 uint64_t offset = rnndoff->offset + (elem->stride * idx); in l_rnn_array_meta_index()
295 DBG("rnndoff=%p, idx=%d, numsubelems=%d", rnndoff, idx, in l_rnn_array_meta_index()
296 rnndoff->elem->subelemsnum); in l_rnn_array_meta_index()
303 return l_rnn_etype(L, rnndoff->rnn, elem->subelems[0], offset); in l_rnn_array_meta_index()
305 return l_rnn_etype_struct(L, rnndoff->rnn, elem, offset); in l_rnn_array_meta_index()
337 struct rnndoff *rnndoff = lua_touserdata(L, 1); in l_rnn_reg_meta_index() local
339 struct rnndelem *elem = rnndoff->elem; in l_rnn_reg_meta_index()
362 uint32_t regval = rnn_val(rnndoff->rnn, rnndoff->offset); in l_rnn_reg_meta_index()
369 rnndoff->elem->subelemsnum, bf->typeinfo.type, regval); in l_rnn_reg_meta_index()
371 return pushdecval(L, rnndoff->rnn, regval, &bf->typeinfo); in l_rnn_reg_meta_index()
382 struct rnndoff *rnndoff = lua_touserdata(L, 1); in l_rnn_reg_meta_tostring() local
383 uint32_t regval = rnn_val(rnndoff->rnn, rnndoff->offset); in l_rnn_reg_meta_tostring()
384 struct rnndecaddrinfo *info = rnn_reginfo(rnndoff->rnn, rnndoff->offset); in l_rnn_reg_meta_tostring()
387 decoded = rnndec_decodeval(rnndoff->rnn->vc, info->typeinfo, regval); in l_rnn_reg_meta_tostring()
403 struct rnndoff *rnndoff = lua_touserdata(L, 1); in l_rnn_reg_meta_tonumber() local
404 uint32_t regval = rnn_val(rnndoff->rnn, rnndoff->offset); in l_rnn_reg_meta_tonumber()
406 regval <<= rnndoff->elem->typeinfo.shr; in l_rnn_reg_meta_tonumber()