diff --git a/paddle/capi/Arguments.cpp b/paddle/capi/Arguments.cpp index d9b207af705fac930fe0af1b34e931a30ab3c0aa..2954f522c95fa87141e3082eb059af80351fe86f 100644 --- a/paddle/capi/Arguments.cpp +++ b/paddle/capi/Arguments.cpp @@ -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; diff --git a/paddle/capi/CMakeLists.txt b/paddle/capi/CMakeLists.txt index a2b1929e4b747d002d309cea559257e73842c557..1b52a79cebb1210b09fc9f30282bfd799a35dcf9 100644 --- a/paddle/capi/CMakeLists.txt +++ b/paddle/capi/CMakeLists.txt @@ -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 PaddleCAPIPrivate.h) +set(CAPI_PRIVATE_HEADER capi_private.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_HEADERS} DESTINATION include/paddle) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h DESTINATION include/paddle) install(TARGETS paddle_capi_shared DESTINATION lib) diff --git a/paddle/capi/Main.cpp b/paddle/capi/Main.cpp index 7604945de7df62857cc2a405d7fb979aaeefb7df..7f24561e9aafc1e900f6371ad3c7e5a45033a9ef 100644 --- a/paddle/capi/Main.cpp +++ b/paddle/capi/Main.cpp @@ -16,8 +16,8 @@ limitations under the License. */ #include #include #include -#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" diff --git a/paddle/capi/Matrix.cpp b/paddle/capi/Matrix.cpp index fe60832d70a48aa759d9c4e4acc197309fa45d43..85269e188546707850626e5982b6f1b391f95892 100644 --- a/paddle/capi/Matrix.cpp +++ b/paddle/capi/Matrix.cpp @@ -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(v) extern "C" { diff --git a/paddle/capi/Vector.cpp b/paddle/capi/Vector.cpp index 4ccb167fec21ba046ae6cfd4f1961d45f24640a0..564708e963b4068da074c1fcc9aac0fade0f65b9 100644 --- a/paddle/capi/Vector.cpp +++ b/paddle/capi/Vector.cpp @@ -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; diff --git a/paddle/capi/PaddleCAPI.h b/paddle/capi/capi.h similarity index 94% rename from paddle/capi/PaddleCAPI.h rename to paddle/capi/capi.h index 1e275c5c1fab5b6b254b4b806a54b5fb2b6c6a15..4097a1a35a64347f0d79b004371df26551e51bbe 100644 --- a/paddle/capi/PaddleCAPI.h +++ b/paddle/capi/capi.h @@ -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 diff --git a/paddle/capi/PaddleCAPIPrivate.h b/paddle/capi/capi_private.h similarity index 98% rename from paddle/capi/PaddleCAPIPrivate.h rename to paddle/capi/capi_private.h index 072e9a37a631001853d7578b237fd8d6f714e483..c7cdbd5f6f347150c02764a86f8ffb0c068e872e 100644 --- a/paddle/capi/PaddleCAPIPrivate.h +++ b/paddle/capi/capi_private.h @@ -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" diff --git a/paddle/capi/gradient_machine.cpp b/paddle/capi/gradient_machine.cpp index ab8e747ae9544075116043aa876212e1e19bffd2..6e7740a455b5d20f8cbae17ee501306833eceb46 100644 --- a/paddle/capi/gradient_machine.cpp +++ b/paddle/capi/gradient_machine.cpp @@ -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 "gradient_machine.h" +#include "capi_private.h" #include "paddle/gserver/gradientmachines/NeuralNetwork.h" #define cast(v) paddle::capi::cast(v) diff --git a/paddle/capi/tests/test_Arguments.cpp b/paddle/capi/tests/test_Arguments.cpp index 60fa57517fbb7abefcdb4a3dbadfccb643415d81..e6e4ac9937e5ed450672529d97a4ae567b700aed 100644 --- a/paddle/capi/tests/test_Arguments.cpp +++ b/paddle/capi/tests/test_Arguments.cpp @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ #include -#include "PaddleCAPI.h" +#include "capi.h" #include "gtest/gtest.h" #include "paddle/utils/ThreadLocal.h" diff --git a/paddle/capi/tests/test_GradientMachine.cpp b/paddle/capi/tests/test_GradientMachine.cpp index 3e8ba8e9d8f54f38a354e2364fca3474649ef630..b37fe83a30bd1d4fe0a0298da9b915781c65e33d 100644 --- a/paddle/capi/tests/test_GradientMachine.cpp +++ b/paddle/capi/tests/test_GradientMachine.cpp @@ -18,7 +18,7 @@ limitations under the License. */ #include #include #include -#include "PaddleCAPI.h" +#include "capi.h" #include "paddle/utils/ThreadLocal.h" static std::vector randomBuffer(size_t bufSize) { diff --git a/paddle/capi/tests/test_Matrix.cpp b/paddle/capi/tests/test_Matrix.cpp index 1b3b881caee55d742590bbc9bee8b0422443b733..162df448d2b27c7f41934e924fa769d31a8889d6 100644 --- a/paddle/capi/tests/test_Matrix.cpp +++ b/paddle/capi/tests/test_Matrix.cpp @@ -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) { diff --git a/paddle/capi/tests/test_Vector.cpp b/paddle/capi/tests/test_Vector.cpp index 64c19265e3d05eb9cac0bd8eb3dd5b26fb9ad509..c5c57b7288d24b25abaabb57f9c369782f6be338 100644 --- a/paddle/capi/tests/test_Vector.cpp +++ b/paddle/capi/tests/test_Vector.cpp @@ -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) {