Working on the integration of fmincg with cuda