Finish cuda arithm module refactoring