Have abstraction and eat performance too : optimized heterogeneous computing with parallel patterns