add numel

This commit is contained in:
Dun Liang 2020-06-15 16:42:07 +08:00
parent 17d38e723a
commit 0c57b4e44b
1 changed files with 1 additions and 0 deletions

View File

@ -75,6 +75,7 @@ struct VarHolder {
return var->shape[dim];
}
// @pyjt(numel)
inline int64 numel() {
if (var->num<0) sync();
return var->num;