gpu version works,but it's very slow