- MATLAB script for reproduction with input, codegen command or GPU Coder project file
- MATLAB version
- Operating system, Windows or Linux? Which version?
- GPU device
Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
gpu coder get wrong results in multiple functions with coder.varsize
조회 수: 6 (최근 30일)
이전 댓글 표시
The following code is an example, when I use gpu coder to compile to mex file, the result is only output = 0, rather than a required vector array, I do not know how to modify and find other related samples.
function output=main_test(input)
%#codegen
% Map computation to GPU.
coder.gpu.kernelfun;
output=0;
coder.varsize('output');
output = varfun(input, output);
end
function out_var = varfun(in_var, out_var)
for i=1:10
out_var = [out_var, in_var +2];
end
end
댓글 수: 2
Chao Luo
2023년 2월 21일
Hi Jibao,
Thanks for reporting the issue. Can you provide us more information list here to reproduce the issue?
Thanks,
Chao
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!