Design patterns for GPU computing