CCodeGenerator`
CCodeGenerator`

CCodeStringGenerate

CCodeStringGenerate[cfun,name]

generates C code from the compiled function cfun using the name as the exported function name.

更多信息和选项

  • To use CCodeStringGenerate, you first need to load it using Needs["CCodeGenerator`"].
  • CCodeStringGenerate can make standalone code or a Wolfram Library.
  • The Wolfram Language contains the necessary headers and libraries for standalone code.
  • You can generate a header for the generated code by setting "CodeTarget" to "WolframRTLHeader".
  • The following option can be given:
  • "CodeTarget""WolframRTL"the type of code to generate

范例

基本范例  (1)

First, load the package:

Generate a string of C code:

Generate code from two compiled functions:

Wolfram Research (2010),CCodeStringGenerate,Wolfram 语言函数,https://reference.wolfram.com/language/CCodeGenerator/ref/CCodeStringGenerate.html.

文本

Wolfram Research (2010),CCodeStringGenerate,Wolfram 语言函数,https://reference.wolfram.com/language/CCodeGenerator/ref/CCodeStringGenerate.html.

CMS

Wolfram 语言. 2010. "CCodeStringGenerate." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/CCodeGenerator/ref/CCodeStringGenerate.html.

APA

Wolfram 语言. (2010). CCodeStringGenerate. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/CCodeGenerator/ref/CCodeStringGenerate.html 年

BibTeX

@misc{reference.wolfram_2024_ccodestringgenerate, author="Wolfram Research", title="{CCodeStringGenerate}", year="2010", howpublished="\url{https://reference.wolfram.com/language/CCodeGenerator/ref/CCodeStringGenerate.html}", note=[Accessed: 21-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_ccodestringgenerate, organization={Wolfram Research}, title={CCodeStringGenerate}, year={2010}, url={https://reference.wolfram.com/language/CCodeGenerator/ref/CCodeStringGenerate.html}, note=[Accessed: 21-November-2024 ]}