how to add "large arrays" (64 bits) to codegen generated function?
이전 댓글 표시
Hi all, is there some flag to tell codegen function to use 64 bits indexes? (Something similar to the -largeArrayDims for the mex compilation) Thanks!
답변 (2개)
Fangjun Jiang
2017년 6월 30일
0 개 추천
I would assume that, if you specify the data type of your index variable as uint64, it will generate the code correctly using 64 bits indexing.
codegen creates C code, as far as I understand. The C code itself is not limited to 32 or 64 bit. 32 bit compilers can work with 64 bit variables also. But the addressing depends on the compiler. But as long as the created code contains e.g. size_t for the addressing, this is adjusted during the compilation.
During the mex compilation it matters, which libraries are used. Hm. I stop poking around in the dark. I think a kind of -largeArrayDims would not make sense for codegen.
[EDITED] See http://www.mathworks.com/help/coder/ug/array-size-restrictions-for-code-generation.html: My assumption was wrong. The code supports 32 bit addressing in arrays only.
댓글 수: 2
Sergio Zlotnik
2017년 6월 30일
카테고리
도움말 센터 및 File Exchange에서 MATLAB Algorithm Acceleration에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!