set algorithm on thread instead of gpu