提交 8c50c99e 编写于 作者: L liuruilong

format files

上级 0a80ddfe
...@@ -31,8 +31,7 @@ struct PaddleMobileException : public std::exception { ...@@ -31,8 +31,7 @@ struct PaddleMobileException : public std::exception {
PaddleMobileException(const char *header, const char *detail, PaddleMobileException(const char *header, const char *detail,
const char *file, const int line) { const char *file, const int line) {
char buffer[1500]; char buffer[1500];
snprintf(buffer, snprintf(buffer, sizeof(buffer),
sizeof(buffer),
"%s| %s \n| [in file] : %s\n| [on line] : %d\n| [detail] : %s\n", "%s| %s \n| [in file] : %s\n| [on line] : %d\n| [detail] : %s\n",
exception_prefix.c_str(), header, file, line, detail); exception_prefix.c_str(), header, file, line, detail);
message = std::string(buffer); message = std::string(buffer);
......
...@@ -39,7 +39,6 @@ using OpCreator = std::function<framework::OperatorBase<Dtype> *( ...@@ -39,7 +39,6 @@ using OpCreator = std::function<framework::OperatorBase<Dtype> *(
const framework::AttributeMap & /*attrs*/, const framework::AttributeMap & /*attrs*/,
std::shared_ptr<framework::Scope> /*scope*/)>; std::shared_ptr<framework::Scope> /*scope*/)>;
using InferVarTypeFN = std::function<void(const framework::OpDesc & /*op_desc*/, using InferVarTypeFN = std::function<void(const framework::OpDesc & /*op_desc*/,
framework::BlockDesc * /*block*/)>; framework::BlockDesc * /*block*/)>;
......
...@@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "common/log.h" #include "common/log.h"
#pragma once #pragma once
......
...@@ -15,8 +15,8 @@ limitations under the License. */ ...@@ -15,8 +15,8 @@ limitations under the License. */
#pragma once #pragma once
#include <string> #include <string>
#include <vector>
#include <unordered_map> #include <unordered_map>
#include <vector>
#include "common/enforce.h" #include "common/enforce.h"
#include "common/log.h" #include "common/log.h"
......
...@@ -17,8 +17,8 @@ limitations under the License. */ ...@@ -17,8 +17,8 @@ limitations under the License. */
#include <map> #include <map>
#include <string> #include <string>
#include "node.h"
#include "framework/operator.h" #include "framework/operator.h"
#include "node.h"
namespace paddle_mobile { namespace paddle_mobile {
namespace framework { namespace framework {
......
...@@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ...@@ -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 See the License for the specific language governing permissions and
limitations under the License. */ limitations under the License. */
#include "framework/operator.h"
#include "framework/program/program-optimize/node.h" #include "framework/program/program-optimize/node.h"
#include "framework/operator.h"
namespace paddle_mobile { namespace paddle_mobile {
......
...@@ -19,8 +19,8 @@ limitations under the License. */ ...@@ -19,8 +19,8 @@ limitations under the License. */
#include <string> #include <string>
#include "framework/operator.h" #include "framework/operator.h"
#include "operators/op_param.h"
#include "operators/kernel/pool_kernel.h" #include "operators/kernel/pool_kernel.h"
#include "operators/op_param.h"
namespace paddle_mobile { namespace paddle_mobile {
namespace operators { namespace operators {
......
...@@ -19,8 +19,8 @@ limitations under the License. */ ...@@ -19,8 +19,8 @@ limitations under the License. */
#include <string> #include <string>
#include "framework/operator.h" #include "framework/operator.h"
#include "operators/op_param.h"
#include "operators/kernel/sigmoid_kernel.h" #include "operators/kernel/sigmoid_kernel.h"
#include "operators/op_param.h"
namespace paddle_mobile { namespace paddle_mobile {
namespace operators { namespace operators {
......
...@@ -19,8 +19,8 @@ limitations under the License. */ ...@@ -19,8 +19,8 @@ limitations under the License. */
#include <string> #include <string>
#include "framework/operator.h" #include "framework/operator.h"
#include "operators/op_param.h"
#include "operators/kernel/softmax_kernel.h" #include "operators/kernel/softmax_kernel.h"
#include "operators/op_param.h"
namespace paddle_mobile { namespace paddle_mobile {
namespace operators { namespace operators {
......
/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
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. */
// //
// Created by liuRuiLong on 2018/6/6. // Created by liuRuiLong on 2018/6/6.
// //
#include "test_lib_size.h" #include "test_lib_size.h"
static test_lib_size t; static test_lib_size t;
/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
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. */
// //
// Created by liuRuiLong on 2018/6/6. // Created by liuRuiLong on 2018/6/6.
// //
...@@ -23,72 +37,57 @@ ...@@ -23,72 +37,57 @@
//#include <stdio.h> //#include <stdio.h>
//#include <cstring> //#include <cstring>
void foo(){ void foo() {
// char *str = "1234";
// char *str = "1234"; // char dst[10];
// char dst[10]; // strcpy(dst, str);
// strcpy(dst, str);
// std::cout << "12345" << std::endl;
// std::cout << "12345" << std::endl;
std::vector<int> vec = {1, 2, 3, 4, 5}; std::vector<int> vec = {1, 2, 3, 4, 5};
// std::find(vec.begin(), vec.end(), 1); // std::find(vec.begin(), vec.end(), 1);
// std::find(vec.begin(), vec.end(), 1); // std::find(vec.begin(), vec.end(), 1);
// std::list<int> l;
// std::mutex mutex_;
// std::list<int> l; // std::map<int, float> m;
// std::mutex mutex_; // std::unordered_map<int, float> u_m;
// std::unordered_set<int> u_s;
// std::string ss = "12345";
// printf("%f", ss.c_str());
// std::map<int, float> m; // std::initializer_list<int> init_list = {1, 2};
// std::unordered_map<int, float> u_m; // std::tuple<int, int> t = {1, 2};
// std::unordered_set<int> u_s;
// std::string ss = "12345";
// printf("%f", ss.c_str());
// std::initializer_list<int> init_list = {1, 2};
// std::tuple<int, int> t = {1, 2};
// std::tuple_element<I, std::tuple<ARGS...>>::type // std::tuple_element<I, std::tuple<ARGS...>>::type
// std::tuple<> // std::tuple<>
// int i;
// int j;
// if (typeid(i) == typeid(j)){
// int z = 10;
// }
// int i;
// int j;
// if (typeid(i) == typeid(j)){
// int z = 10;
// }
std::shared_ptr<int> s1 = std::make_shared<int>(); std::shared_ptr<int> s1 = std::make_shared<int>();
// std::stringstream ss;
// std::stringstream ss; // ss << "12345";
// ss << "12345";
} }
class test_lib_size { class test_lib_size {
public: public:
test_lib_size(){ test_lib_size() {}
// std::shared_ptr<int> Test(){
} // std::vector<int> vec = {1, 2, 3};
// std::shared_ptr<int> Test(){ // std::shared_ptr<int> si = std::make_shared<int>();
// std::vector<int> vec = {1, 2, 3}; // return si;
// std::shared_ptr<int> si = std::make_shared<int>(); // }
// return si;
// } // void test(){
// int i = 9;
// }
// void test(){
// int i = 9;
// }
}; };
#endif // PADDLE_MOBILE_TEST_LIB_SIZE_H
#endif //PADDLE_MOBILE_TEST_LIB_SIZE_H
...@@ -18,9 +18,10 @@ limitations under the License. */ ...@@ -18,9 +18,10 @@ limitations under the License. */
int main(void) { int main(void) {
#pragma omp parallel num_threads(2) #pragma omp parallel num_threads(2)
{ {
// int thread_id = omp_get_thread_num(); // int thread_id = omp_get_thread_num();
// int nthreads = omp_get_num_threads(); // int nthreads = omp_get_num_threads();
// std::cout << "Hello, OMP " << thread_id << "/" << nthreads << "\n"; // std::cout << "Hello, OMP " << thread_id << "/" << nthreads <<
// "\n";
} }
return 0; return 0;
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册