mirror of https://github.com/Jittor/Jittor
add numel
This commit is contained in:
parent
17d38e723a
commit
0c57b4e44b
|
@ -75,6 +75,7 @@ struct VarHolder {
|
|||
return var->shape[dim];
|
||||
}
|
||||
|
||||
// @pyjt(numel)
|
||||
inline int64 numel() {
|
||||
if (var->num<0) sync();
|
||||
return var->num;
|
||||
|
|
Loading…
Reference in New Issue