// Usage: caffe_('solver_step', hSolver, iters) static void solver_step(MEX_ARGS) { mxCHECK(nrhs == 2 && mxIsStruct(prhs[0]) && mxIsDouble(prhs[1]), "Usage: caffe_('solver_step', hSolver, iters)"); Solver<float>* solver = handle_to_ptr<Solver<float> >(prhs[0]); int iters = mxGetScalar(prhs[1]); solver->Step(iters); }
// Usage: caffe_('solver_step', hSolver, iters) static void solver_step(MEX_ARGS) { mxCHECK(nrhs == 2 && mxIsStruct(prhs[0]) && mxIsDouble(prhs[1]), "Usage: caffe_('solver_step', hSolver, iters)"); Solver<float>* solver = handle_to_ptr<Solver<float> >(prhs[0]); int iters = mxGetScalar(prhs[1]); try { solver->Step(iters); } catch (...) { mxERROR("CAFFE_mex: solver_step exploded..."); return; } }