Adds the cuda mex code