text: The MATLAB® Engine API for C++ comprises functions, classes, and typedefs in
  matlab::engine namespace. This API supports the MATLAB Data API, which provides a way for applications running outside of MATLAB to work with MATLAB data through a MATLAB-neutral interface. For more information on the MATLAB Data API, see MATLAB Data API.
  The
  matlab::engine::MATLABEngine class defines the following member functions.
  The size of data arrays passed between C++ and MATLAB is limited to 2 GB. This limit applies to the data plus supporting information passed between the processes.
  The MATLAB Engine for C++ is safe to use in a multiple-thread environment. You can make these connections to shared MATLAB sessions:
  Connect to different shared MATLAB sessions from separate threads of a C++ application.
  Connect to a single MATLAB session from multiple engine applications.
  You cannot use multiple threads of the same process to connect to a single shared MATLAB session.