필터 지우기
필터 지우기

How to use GPU Coder and how to better write the main function

조회 수: 2 (최근 30일)
HUA
HUA 2024년 5월 24일
댓글: HUA 2024년 5월 26일
I was recently studying GPU coder to generate executables. I wrote a simple code photo.m, after generate, I did not send any valid code after the MATLAB conversion in photo.cu. Although I haven't changed the main function,such ashttps://ww2.mathworks.cn/help/coder/nvidia/ug/build-run-on-nvidia-hardware.html, this seems to have no effect on the photo.cu file.
So was my code converted successfully? Or not?

채택된 답변

Justin Hontz
Justin Hontz 2024년 5월 24일
The functions that you are using (e.g. plot) are not supported for code generation. This isn't a limitation for GPU Coder specifically, but MATLAB Coder in general. Since these function calls do not have any effect on the output(s) computed by your application, they are omitted when generating standalone code. However, when generating a MEX instead, you can still generate extrinsic calls to these functions. Please see the link below for more information:
  댓글 수: 1
HUA
HUA 2024년 5월 26일
Thank you for your answer, it is very useful to me and I will continue to learn it

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with GPU Coder에 대해 자세히 알아보기

태그

제품


릴리스

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by