Switching the code to AMD programming