mexPutVariableShare​dDataCopy

버전 1.0.0.0 (7.92 KB) 작성자: James Tursa
This C routine puts a shared data copy of a variable into a workspace from a mex routine
다운로드 수: 286
업데이트 날짜: 2013/6/13

라이선스 보기

This submission is intended for C mex programmers who have a familiarity with the copy-on-write & shared data copy mechanism of MATLAB.

The official mex routine mexPutVariable puts a deep data copy of a variable into a workspace directly from a mex function (without using the plhs return facility). If you are working with very large variables this deep copy can be undesirable. The enclosed function mexPutVariableSharedDataCopy acts like mexPutVariable, but it puts a shared data copy of the variable instead of a deep data copy.

Enclosed is the function file itself, a header file for the function, and a test routine (with associated m-file for self-building).

DISCLAIMER:
This function uses unofficial techniques to hack into the mxArray variable header values directly. As such, it is not guaranteed to work on all platforms or with all MATLAB versions. It has only been tested on a few 32-bit Windows platforms.

인용 양식

James Tursa (2024). mexPutVariableSharedDataCopy (https://www.mathworks.com/matlabcentral/fileexchange/42212-mexputvariableshareddatacopy), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2006b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Write C Functions Callable from MATLAB (MEX Files)에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0