On Portability and Scalability Issues in Heterogeneous Computing