forked from PaddlePaddle/Paddle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request PaddlePaddle#128 from winter-wang/add_c_api_doc
rectify the c api docs and demo
- Loading branch information
Showing
17 changed files
with
1,077 additions
and
775 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# 创建 Config | ||
|
||
`Config` 对象相关方法用于创建预测相关配置,构建 `Predictor` 对象的配置信息,如模型路径、是否开启gpu等等。 | ||
|
||
相关方法定义如下: | ||
|
||
```c | ||
// 创建 Config 对象 | ||
// 参数:None | ||
// 返回:PD_Config* - Config 对象指针 | ||
PD_Config* PD_ConfigCreate(); | ||
|
||
// 销毁 Config 对象 | ||
// 参数:pd_config - Config 对象指针 | ||
// 返回:None | ||
void PD_ConfigDestroy(PD_Config* pd_config); | ||
``` | ||
代码示例: | ||
```c | ||
// 创建 Config 对象 | ||
PD_Config* config = PD_ConfigCreate(); | ||
// 销毁 Config 对象 | ||
PD_ConfigDestroy(config); | ||
``` |
Oops, something went wrong.