Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
d49c6274
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2299
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d49c6274
编写于
3月 24, 2017
作者:
Y
Yu Yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
GNU Style API
上级
58e5b878
变更
12
显示空白变更内容
内联
并排
Showing
12 changed file
with
18 addition
and
18 deletion
+18
-18
paddle/capi/Arguments.cpp
paddle/capi/Arguments.cpp
+1
-1
paddle/capi/CMakeLists.txt
paddle/capi/CMakeLists.txt
+2
-2
paddle/capi/Main.cpp
paddle/capi/Main.cpp
+2
-2
paddle/capi/Matrix.cpp
paddle/capi/Matrix.cpp
+2
-2
paddle/capi/Vector.cpp
paddle/capi/Vector.cpp
+2
-2
paddle/capi/capi.h
paddle/capi/capi.h
+2
-2
paddle/capi/capi_private.h
paddle/capi/capi_private.h
+1
-1
paddle/capi/gradient_machine.cpp
paddle/capi/gradient_machine.cpp
+2
-2
paddle/capi/tests/test_Arguments.cpp
paddle/capi/tests/test_Arguments.cpp
+1
-1
paddle/capi/tests/test_GradientMachine.cpp
paddle/capi/tests/test_GradientMachine.cpp
+1
-1
paddle/capi/tests/test_Matrix.cpp
paddle/capi/tests/test_Matrix.cpp
+1
-1
paddle/capi/tests/test_Vector.cpp
paddle/capi/tests/test_Vector.cpp
+1
-1
未找到文件。
paddle/capi/Arguments.cpp
浏览文件 @
d49c6274
...
...
@@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include "PaddleCAPIPrivate.h"
#include "arguments.h"
#include "capi_private.h"
using
paddle
::
capi
::
cast
;
...
...
paddle/capi/CMakeLists.txt
浏览文件 @
d49c6274
...
...
@@ -13,7 +13,7 @@ configure_file(config.h.in config.h @ONLY)
# PaddleCAPI.h is the only header we exposed. It currently only used for model
# inference.
file
(
GLOB CAPI_HEADERS *.h
)
set
(
CAPI_PRIVATE_HEADER
PaddleCAPIP
rivate.h
)
set
(
CAPI_PRIVATE_HEADER
capi_p
rivate.h
)
list
(
REMOVE_ITEM CAPI_HEADERS
${
CAPI_PRIVATE_HEADER
}
)
file
(
GLOB CAPI_SOURCES *.cpp
)
...
...
@@ -59,7 +59,7 @@ link_paddle_exe(paddle_capi_shared)
# install library & headers.
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
capi_whole_library
}
DESTINATION lib
)
install
(
FILES
${
CAPI_HEADER
}
DESTINATION include/paddle
)
install
(
FILES
${
CAPI_HEADER
S
}
DESTINATION include/paddle
)
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/config.h DESTINATION include/paddle
)
install
(
TARGETS paddle_capi_shared DESTINATION lib
)
...
...
paddle/capi/Main.cpp
浏览文件 @
d49c6274
...
...
@@ -16,8 +16,8 @@ limitations under the License. */
#include <stdlib.h>
#include <string.h>
#include <vector>
#include "
PaddleCAPI
.h"
#include "
PaddleCAPIPrivate
.h"
#include "
capi_private
.h"
#include "
main
.h"
#include "paddle/trainer/TrainerConfigHelper.h"
#include "paddle/utils/Excepts.h"
#include "paddle/utils/PythonUtil.h"
...
...
paddle/capi/Matrix.cpp
浏览文件 @
d49c6274
...
...
@@ -12,9 +12,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include "PaddleCAPI.h"
#include "PaddleCAPIPrivate.h"
#include "capi_private.h"
#include "hl_cuda.h"
#include "matrix.h"
#define cast(v) paddle::capi::cast<paddle::capi::CMatrix>(v)
extern
"C"
{
...
...
paddle/capi/Vector.cpp
浏览文件 @
d49c6274
...
...
@@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include "
PaddleCAPI
.h"
#include "
PaddleCAPIPrivate
.h"
#include "
capi_private
.h"
#include "
vector
.h"
using
paddle
::
capi
::
cast
;
...
...
paddle/capi/
PaddleCAPI
.h
→
paddle/capi/
capi
.h
浏览文件 @
d49c6274
...
...
@@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#ifndef
PADDLECAPI_H
_
#define
PADDLECAPI_H
_
#ifndef
__PADDLE_CAPI_H_
_
#define
__PADDLE_CAPI_H_
_
/**
* Paddle C API. It will replace SWIG as Multiple Language API for model
...
...
paddle/capi/
PaddleCAPIP
rivate.h
→
paddle/capi/
capi_p
rivate.h
浏览文件 @
d49c6274
...
...
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include "
PaddleCAPI
.h"
#include "
capi
.h"
#include "paddle/gserver/gradientmachines/GradientMachine.h"
#include "paddle/math/Matrix.h"
#include "paddle/math/Vector.h"
...
...
paddle/capi/gradient_machine.cpp
浏览文件 @
d49c6274
...
...
@@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include "
PaddleCAPI
.h"
#include "
PaddleCAPIP
rivate.h"
#include "
gradient_machine
.h"
#include "
capi_p
rivate.h"
#include "paddle/gserver/gradientmachines/NeuralNetwork.h"
#define cast(v) paddle::capi::cast<paddle::capi::CGradientMachine>(v)
...
...
paddle/capi/tests/test_Arguments.cpp
浏览文件 @
d49c6274
...
...
@@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License. */
#include <functional>
#include "
PaddleCAPI
.h"
#include "
capi
.h"
#include "gtest/gtest.h"
#include "paddle/utils/ThreadLocal.h"
...
...
paddle/capi/tests/test_GradientMachine.cpp
浏览文件 @
d49c6274
...
...
@@ -18,7 +18,7 @@ limitations under the License. */
#include <stdlib.h>
#include <string.h>
#include <type_traits>
#include "
PaddleCAPI
.h"
#include "
capi
.h"
#include "paddle/utils/ThreadLocal.h"
static
std
::
vector
<
pd_real
>
randomBuffer
(
size_t
bufSize
)
{
...
...
paddle/capi/tests/test_Matrix.cpp
浏览文件 @
d49c6274
...
...
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include "
PaddleCAPI
.h"
#include "
capi
.h"
#include "gtest/gtest.h"
TEST
(
CAPIMatrix
,
create
)
{
...
...
paddle/capi/tests/test_Vector.cpp
浏览文件 @
d49c6274
...
...
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include "
PaddleCAPI
.h"
#include "
capi
.h"
#include "gtest/gtest.h"
TEST
(
CAPIVector
,
create
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录