Fix typo, change cpu to a shared_ptr