The extrinsic function 'horzcat' is not available for standalone code generation. It must be eliminated for stand-alone code to be generated. It could not be eliminated becaus
Show older comments
Thanks Jan for your answer.
My mfile is now converted to MEX but can not generate a C/C++ sourse code using GPU Coder APP, giving the following error.
"The extrinsic function 'horzcat' is not available for standalone code generation. It must be eliminated for stand-alone code to be generated. It could not be eliminated because its outputs appear to influence the calling function. Fix this error by not using 'horzcat' or by ensuring that its outputs are unused."
I looked it up in myfile.cu and commmented out //horzcats but no success.
Any ideas?
3 Comments
Jan
on 10 Dec 2022
You are welcome. I assume, you mean an answer in another thread?
Can you post the code?
Ram Kokku
on 11 Dec 2022
@Fatemeh - horzcat is supported for code generation. here the doc for it https://www.mathworks.com/help//matlab/ref/double.horzcat.html.
Are you using coder.extrensic function anywhere? would you be able to share the problematic code snippet?
Fatemeh Kalantari
on 15 Dec 2022
Accepted Answer
More Answers (1)
Walter Roberson
on 10 Dec 2022
Moved: Image Analyst
on 10 Dec 2022
Does the same problem occur if you use [] notation?
horzcat(a,b)
[a,b]
should be the same. Maybe it only allows [] with constants?
You could also try
cat(2,a,b)
Categories
Find more on Get Started with GPU Coder in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!