Skip to content

Commit d49c627

Browse files
committed
GNU Style API
1 parent 58e5b87 commit d49c627

12 files changed

+18
-18
lines changed

paddle/capi/Arguments.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License. */
1414

15-
#include "PaddleCAPIPrivate.h"
1615
#include "arguments.h"
16+
#include "capi_private.h"
1717

1818
using paddle::capi::cast;
1919

paddle/capi/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ configure_file(config.h.in config.h @ONLY)
1313
# PaddleCAPI.h is the only header we exposed. It currently only used for model
1414
# inference.
1515
file(GLOB CAPI_HEADERS *.h)
16-
set(CAPI_PRIVATE_HEADER PaddleCAPIPrivate.h)
16+
set(CAPI_PRIVATE_HEADER capi_private.h)
1717
list(REMOVE_ITEM CAPI_HEADERS ${CAPI_PRIVATE_HEADER})
1818
file(GLOB CAPI_SOURCES *.cpp)
1919

@@ -59,7 +59,7 @@ link_paddle_exe(paddle_capi_shared)
5959

6060
# install library & headers.
6161
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${capi_whole_library} DESTINATION lib)
62-
install(FILES ${CAPI_HEADER} DESTINATION include/paddle)
62+
install(FILES ${CAPI_HEADERS} DESTINATION include/paddle)
6363
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h DESTINATION include/paddle)
6464
install(TARGETS paddle_capi_shared DESTINATION lib)
6565

paddle/capi/Main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ limitations under the License. */
1616
#include <stdlib.h>
1717
#include <string.h>
1818
#include <vector>
19-
#include "PaddleCAPI.h"
20-
#include "PaddleCAPIPrivate.h"
19+
#include "capi_private.h"
20+
#include "main.h"
2121
#include "paddle/trainer/TrainerConfigHelper.h"
2222
#include "paddle/utils/Excepts.h"
2323
#include "paddle/utils/PythonUtil.h"

paddle/capi/Matrix.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License. */
1414

15-
#include "PaddleCAPI.h"
16-
#include "PaddleCAPIPrivate.h"
15+
#include "capi_private.h"
1716
#include "hl_cuda.h"
17+
#include "matrix.h"
1818

1919
#define cast(v) paddle::capi::cast<paddle::capi::CMatrix>(v)
2020
extern "C" {

paddle/capi/Vector.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License. */
1414

15-
#include "PaddleCAPI.h"
16-
#include "PaddleCAPIPrivate.h"
15+
#include "capi_private.h"
16+
#include "vector.h"
1717

1818
using paddle::capi::cast;
1919

paddle/capi/PaddleCAPI.h renamed to paddle/capi/capi.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License. */
1414

15-
#ifndef PADDLECAPI_H_
16-
#define PADDLECAPI_H_
15+
#ifndef __PADDLE_CAPI_H__
16+
#define __PADDLE_CAPI_H__
1717

1818
/**
1919
* Paddle C API. It will replace SWIG as Multiple Language API for model

paddle/capi/PaddleCAPIPrivate.h renamed to paddle/capi/capi_private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License. */
1414

15-
#include "PaddleCAPI.h"
15+
#include "capi.h"
1616
#include "paddle/gserver/gradientmachines/GradientMachine.h"
1717
#include "paddle/math/Matrix.h"
1818
#include "paddle/math/Vector.h"

paddle/capi/gradient_machine.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License. */
1414

15-
#include "PaddleCAPI.h"
16-
#include "PaddleCAPIPrivate.h"
15+
#include "gradient_machine.h"
16+
#include "capi_private.h"
1717
#include "paddle/gserver/gradientmachines/NeuralNetwork.h"
1818

1919
#define cast(v) paddle::capi::cast<paddle::capi::CGradientMachine>(v)

paddle/capi/tests/test_Arguments.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
1313
limitations under the License. */
1414

1515
#include <functional>
16-
#include "PaddleCAPI.h"
16+
#include "capi.h"
1717
#include "gtest/gtest.h"
1818
#include "paddle/utils/ThreadLocal.h"
1919

paddle/capi/tests/test_GradientMachine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ limitations under the License. */
1818
#include <stdlib.h>
1919
#include <string.h>
2020
#include <type_traits>
21-
#include "PaddleCAPI.h"
21+
#include "capi.h"
2222
#include "paddle/utils/ThreadLocal.h"
2323

2424
static std::vector<pd_real> randomBuffer(size_t bufSize) {

0 commit comments

Comments
 (0)