Add tensor calculation