fix bug for non-pointer reutrn types
fix bug for non-pointer reutrn types

hughperkins/coriander,hughperkins/cuda-on-cl,hughperkins/cuda-on-cl,hughperkins/coriander,hughperkins/coriander,hughperkins/coriander,hughperkins/cuda-on-cl,hughperkins/cuda-on-cl