Updating refactored cuda cods