フィルターのクリア

ambiguous code generation

4 ビュー (過去 30 日間)
Andrew Grusha
Andrew Grusha 2011 年 7 月 12 日
I have a project, written on matlab. When I try to translate it into C/C++ by MATLAB Coder, some functions get their copies named name_of_functon1.c in addition to name_of_functon.c. Some other functions have only name_of_functon.c, and third kind of functions have only name_of_functon1.c files.
Is there some rule: whether create copy of file or not, and what does "1" means, if there is only one file?

回答 (1 件)

John Elliott
John Elliott 2011 年 7 月 12 日
Numeric suffixes are added to file names to ensure uniqueness. If you have a function that is called once with, say, a double array and a second time with a single array, there may be two C files generated for that function, one suffixed with '1' and the other with no suffix. Can you give an example of a case where a single file has the suffix '1'?
  3 件のコメント
Andrew Grusha
Andrew Grusha 2011 年 7 月 12 日
By the way, sometimes in file function_name.c one can see
void b_function_name(input_parameters1) {
...
}
void c_function_name(input_parameters2) {
...
}
void d_function_name(input_parameters3) {
...
}
Is it not the same situation, as You have described?
John Elliott
John Elliott 2011 年 7 月 12 日
This is a similar situation. In this case, uniqueness is maintained for each function *within* a file (rather than the file name itself). The reason for the multiple C functions is again because the same MATLAB function is called with different types of arguments.
With respect to your original question concerning the single file with the '1' suffix, can you also provide the MATLAB commands that you used to compile your example?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMATLAB Coder についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by