MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / mexFunction

Function mexFunction

rtpose_wrapper/matlab/+caffe/private/caffe_.cpp:561–581  ·  view source on GitHub ↗

----------------------------------------------------------------- ** matlab entry point. **/ Usage: caffe_(api_command, arg1, arg2, ...)

Source from the content-addressed store, hash-verified

559 **/
560// Usage: caffe_(api_command, arg1, arg2, ...)
561void mexFunction(MEX_ARGS) {
562 mexLock(); // Avoid clearing the mex file.
563 mxCHECK(nrhs > 0, "Usage: caffe_(api_command, arg1, arg2, ...)");
564 // Handle input command
565 char* cmd = mxArrayToString(prhs[0]);
566 bool dispatched = false;
567 // Dispatch to cmd handler
568 for (int i = 0; handlers[i].func != NULL; i++) {
569 if (handlers[i].cmd.compare(cmd) == 0) {
570 handlers[i].func(nlhs, plhs, nrhs-1, prhs+1);
571 dispatched = true;
572 break;
573 }
574 }
575 if (!dispatched) {
576 ostringstream error_msg;
577 error_msg << "Unknown command '" << cmd << "'";
578 mxERROR(error_msg.str().c_str());
579 }
580 mxFree(cmd);
581}

Callers

nothing calls this directly

Calls 2

mxCHECKFunction · 0.85
mxERRORFunction · 0.85

Tested by

no test coverage detected