lua based tensor calculator