inplace_

버전 1.0.0.0 (8.66 KB) 작성자: Luca Citi
Matlab versions of the c/c++ operators +=, *= (plus circshift) working in-place and avoiding unneces
다운로드 수: 657
업데이트 날짜: 2006/10/13

라이선스 보기

To date I implemented a few functions I needed, i.e. some C-like operators and circshift:
inplace(x, y, '+=');
inplace(x, y, '.*=');
inplace(x, ns, 'circshift');
that do not allocate memory and compared to the matlab equivalent
x = x + y;
x = x .* y;
x = circshift(x, ns);
are (when working with arrays above 300-400 MB) much faster (tenths of second instead of a few minutes) because the pc does not start swapping to the disk.
The matlab equivalents are currently optimized (performed in-place) only in M-code, but not at the command line.
See http://blogs.mathworks.com/loren/?p=36 for a discussion about it.
IMPORTANT: this piece of code infringes the recommendation that mex files should not overwrite input data.

인용 양식

Luca Citi (2024). inplace_ (https://www.mathworks.com/matlabcentral/fileexchange/12626-inplace_), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R14SP2
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Dates and Time에 대해 자세히 알아보기

Community Treasure Hunt

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

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