gpu coder get wrong results in multiple functions with coder.varsize
Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Ältere Kommentare anzeigen
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 Kommentare
Chao Luo
am 21 Feb. 2023
Hi Jibao,
Thanks for reporting the issue. Can you provide us more information list here to reproduce the issue?
- MATLAB script for reproduction with input, codegen command or GPU Coder project file
- MATLAB version
- Operating system, Windows or Linux? Which version?
- GPU device
Thanks,
Chao
liu jibao
am 3 Mär. 2023
Antworten (0)
Diese Frage ist geschlossen.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!