Optimized GPU versions of TVAL3 algorithm