Is there a way to sum the whole var?

Is there a way to sum the whole var?

No, but you can write a 4-line kernel for this purpose.