Porting code to c++

조회 수: 8 (최근 30일)
Andrea Agosti
Andrea Agosti 2020년 6월 24일
댓글: Sean de Wolski 2020년 6월 24일
Dear all,
I am running a MATLAB code employing a function optimisation using the pattern search algorithm (the poll method used is GSS positive basis 2N and I am using the parallel computing option). For a variety of reasons (including IP) we want to port the code into C++. Can you please suggest a numerical library, possibly MIT licence or similar, that allows me to perform the same task (pattern search with parallel computing) with decent performance?
Thanks!

답변 (2개)

Sean de Wolski
Sean de Wolski 2020년 6월 24일
Could you use the Compiler SDK to build a C++ library directly? This would reuse your exact implementation with patternsearch and parallel computing.
  댓글 수: 8
Andrea Agosti
Andrea Agosti 2020년 6월 24일
hi,
thanks for your clarification. It is a very useful solution but using the compiler i would not have any performance improvement. Am i correct?
Sean de Wolski
Sean de Wolski 2020년 6월 24일
It's running the same code against the same engine. The only change in performance will be if the compiled library is used on a more powerful machine.

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


Aditya Verma
Aditya Verma 2020년 6월 24일
Hello!
You can try the famous OpenCV library. It also has inbuilt constructs to parallelize your code. It uses the BSD 3-Clause licence.
You could also check out MATLAB Coder. It allows you to convert your MATLAB code to C/C++ code. However, not all MATLAB functionalities are supported for conversion. You can refer the following link to check for the same:
Thanks
  댓글 수: 6
Andrea Agosti
Andrea Agosti 2020년 6월 24일
hi,
that's great! very useful.
thanks
Aditya Verma
Aditya Verma 2020년 6월 24일
You're welcome!

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

카테고리

Help CenterFile Exchange에서 Code Generation, GPU, and Third-Party Support에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by