提交 3b897348 编写于 作者: L liuruilong

format files

上级 3a46cd77
......@@ -31,8 +31,7 @@ struct PaddleMobileException : public std::exception {
PaddleMobileException(const char *header, const char *detail,
const char *file, const int line) {
char buffer[1500];
snprintf(buffer,
sizeof(buffer),
snprintf(buffer, sizeof(buffer),
"%s| %s \n| [in file] : %s\n| [on line] : %d\n| [detail] : %s\n",
exception_prefix.c_str(), header, file, line, detail);
message = std::string(buffer);
......
......@@ -39,7 +39,6 @@ using OpCreator = std::function<framework::OperatorBase<Dtype> *(
const framework::AttributeMap & /*attrs*/,
std::shared_ptr<framework::Scope> /*scope*/)>;
using InferVarTypeFN = std::function<void(const framework::OpDesc & /*op_desc*/,
framework::BlockDesc * /*block*/)>;
......
......@@ -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
limitations under the License. */
#include "common/log.h"
#pragma once
......
......@@ -15,8 +15,8 @@ limitations under the License. */
#pragma once
#include <string>
#include <vector>
#include <unordered_map>
#include <vector>
#include "common/enforce.h"
#include "common/log.h"
......
......@@ -17,8 +17,8 @@ limitations under the License. */
#include <map>
#include <string>
#include "node.h"
#include "framework/operator.h"
#include "node.h"
namespace paddle_mobile {
namespace framework {
......
......@@ -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 "framework/operator.h"
#include "framework/program/program-optimize/node.h"
#include "framework/operator.h"
namespace paddle_mobile {
......
......@@ -19,8 +19,8 @@ limitations under the License. */
#include <string>
#include "framework/operator.h"
#include "operators/op_param.h"
#include "operators/kernel/pool_kernel.h"
#include "operators/op_param.h"
namespace paddle_mobile {
namespace operators {
......
......@@ -19,8 +19,8 @@ limitations under the License. */
#include <string>
#include "framework/operator.h"
#include "operators/op_param.h"
#include "operators/kernel/sigmoid_kernel.h"
#include "operators/op_param.h"
namespace paddle_mobile {
namespace operators {
......
......@@ -19,8 +19,8 @@ limitations under the License. */
#include <string>
#include "framework/operator.h"
#include "operators/op_param.h"
#include "operators/kernel/softmax_kernel.h"
#include "operators/op_param.h"
namespace paddle_mobile {
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.
//
#include "test_lib_size.h"
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.
//
......@@ -23,72 +37,57 @@
//#include <stdio.h>
//#include <cstring>
void foo(){
// char *str = "1234";
// char dst[10];
// strcpy(dst, str);
void foo() {
// char *str = "1234";
// char dst[10];
// strcpy(dst, str);
// std::cout << "12345" << std::endl;
// std::cout << "12345" << std::endl;
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::mutex mutex_;
// std::map<int, float> m;
// 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::unordered_map<int, float> u_m;
// 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::initializer_list<int> init_list = {1, 2};
// std::tuple<int, int> t = {1, 2};
// std::tuple_element<I, std::tuple<ARGS...>>::type
// std::tuple<>
// int i;
// int j;
// if (typeid(i) == typeid(j)){
// int z = 10;
// }
// std::tuple<>
// int i;
// int j;
// if (typeid(i) == typeid(j)){
// int z = 10;
// }
std::shared_ptr<int> s1 = std::make_shared<int>();
// std::stringstream ss;
// ss << "12345";
// std::stringstream ss;
// ss << "12345";
}
class test_lib_size {
public:
test_lib_size(){
}
// std::shared_ptr<int> Test(){
// std::vector<int> vec = {1, 2, 3};
// std::shared_ptr<int> si = std::make_shared<int>();
// return si;
// }
// void test(){
// int i = 9;
// }
test_lib_size() {}
// std::shared_ptr<int> Test(){
// std::vector<int> vec = {1, 2, 3};
// std::shared_ptr<int> si = std::make_shared<int>();
// return si;
// }
// 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. */
int main(void) {
#pragma omp parallel num_threads(2)
{
// int thread_id = omp_get_thread_num();
// int nthreads = omp_get_num_threads();
// std::cout << "Hello, OMP " << thread_id << "/" << nthreads << "\n";
// int thread_id = omp_get_thread_num();
// int nthreads = omp_get_num_threads();
// std::cout << "Hello, OMP " << thread_id << "/" << nthreads <<
// "\n";
}
return 0;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册