convert external pointer to different more specific pointer classes
updates to work with RCUDA, etc.