Permalink
Browse files

clang-format: allow multiple empty lines

  • Loading branch information...
giaf committed May 17, 2018
1 parent 9e90681 commit 7dcea368732dce75ce9cce1e1ba739c72522e19b
View
@@ -16,7 +16,7 @@ AlwaysBreakAfterDefinitionReturnType: false
AlwaysBreakTemplateDeclarations: true
AlwaysBreakBeforeMultilineStrings: true
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: true
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: false
BinPackParameters: true
BinPackArguments: true
@@ -28,7 +28,7 @@ ExperimentalAutoDetectBinPacking: false
IndentCaseLabels: true
IndentWrappedFunctionNames: false
IndentFunctionDeclarationAfterType: false
MaxEmptyLinesToKeep: 1
MaxEmptyLinesToKeep: 3
KeepEmptyLinesAtTheStartOfBlocks: false
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
@@ -140,7 +140,6 @@ void *dense_qp_hpipm_memory_assign(void *config_, void *dims_, void *opts_, void
}
int dense_qp_hpipm_workspace_calculate_size(void *config_, void *dims_, void *opts_) { return 0; }
int dense_qp_hpipm(void *config, void *qp_in_, void *qp_out_, void *opts_, void *mem_, void *work_)
{
dense_qp_in *qp_in = qp_in_;
@@ -170,8 +170,7 @@ int ocp_nlp_dims_calculate_size(void *config_)
size += config->dynamics[ii]->dims_calculate_size(config->dynamics[ii]);
// cost
for (ii = 0; ii <= N; ii++)
size += config->cost[ii]->dims_calculate_size(config->cost[ii]);
for (ii = 0; ii <= N; ii++) size += config->cost[ii]->dims_calculate_size(config->cost[ii]);
// constraints
for (ii = 0; ii <= N; ii++)
@@ -43,6 +43,8 @@ int ocp_nlp_constraints_config_calculate_size()
return size;
}
ocp_nlp_constraints_config *ocp_nlp_constraints_config_assign(void *raw_memory)
{
char *c_ptr = raw_memory;
@@ -53,6 +55,8 @@ ocp_nlp_constraints_config *ocp_nlp_constraints_config_assign(void *raw_memory)
return config;
}
/************************************************
* dims
************************************************/
@@ -318,7 +318,6 @@ void *ocp_nlp_dynamics_disc_model_assign(void *config_, void *dims_, void *raw_m
}
void ocp_nlp_dynamics_disc_model_set_T(double T, void *model_) { return; }
/************************************************
* functions
************************************************/
@@ -815,15 +815,15 @@ int ocp_nlp_sqp(void *config_, ocp_nlp_dims *dims, ocp_nlp_in *nlp_in, ocp_nlp_o
ocp_nlp_res_compute(dims, nlp_in, nlp_out, mem->nlp_res, mem->nlp_mem);
nlp_out->inf_norm_res = mem->nlp_res->inf_norm_res_g;
nlp_out->inf_norm_res = (mem->nlp_res->inf_norm_res_b > nlp_out->inf_norm_res)
? mem->nlp_res->inf_norm_res_b
: nlp_out->inf_norm_res;
nlp_out->inf_norm_res = (mem->nlp_res->inf_norm_res_d > nlp_out->inf_norm_res)
? mem->nlp_res->inf_norm_res_d
: nlp_out->inf_norm_res;
nlp_out->inf_norm_res = (mem->nlp_res->inf_norm_res_m > nlp_out->inf_norm_res)
? mem->nlp_res->inf_norm_res_m
: nlp_out->inf_norm_res;
nlp_out->inf_norm_res = (mem->nlp_res->inf_norm_res_b > nlp_out->inf_norm_res) ?
mem->nlp_res->inf_norm_res_b :
nlp_out->inf_norm_res;
nlp_out->inf_norm_res = (mem->nlp_res->inf_norm_res_d > nlp_out->inf_norm_res) ?
mem->nlp_res->inf_norm_res_d :
nlp_out->inf_norm_res;
nlp_out->inf_norm_res = (mem->nlp_res->inf_norm_res_m > nlp_out->inf_norm_res) ?
mem->nlp_res->inf_norm_res_m :
nlp_out->inf_norm_res;
// exit conditions on residuals
if ((mem->nlp_res->inf_norm_res_g < opts->min_res_g) &
@@ -96,7 +96,6 @@ void ocp_qp_full_condensing_opts_initialize_default(ocp_qp_dims *dims, void *opt
}
void ocp_qp_full_condensing_opts_update(ocp_qp_dims *dims, void *opts_) { return; }
/************************************************
* memory
************************************************/
@@ -137,7 +136,6 @@ void *ocp_qp_full_condensing_memory_assign(ocp_qp_dims *dims, void *opts_, void
}
int ocp_qp_full_condensing_workspace_calculate_size(ocp_qp_dims *dims, void *opts_) { return 0; }
void ocp_qp_full_condensing(ocp_qp_in *in, dense_qp_in *out, ocp_qp_full_condensing_opts *opts,
ocp_qp_full_condensing_memory *mem, void *work)
{
@@ -151,7 +151,6 @@ void *ocp_qp_hpipm_memory_assign(void *config_, void *dims_, void *opts_, void *
************************************************/
int ocp_qp_hpipm_workspace_calculate_size(void *config_, void *dims_, void *opts_) { return 0; }
/************************************************
* functions
************************************************/
@@ -176,7 +176,6 @@ void *ocp_qp_partial_condensing_memory_assign(ocp_qp_dims *dims, void *opts_, vo
************************************************/
int ocp_qp_partial_condensing_workspace_calculate_size(ocp_qp_dims *dims, void *opts_) { return 0; }
/************************************************
* functions
************************************************/
@@ -351,7 +351,6 @@ void sim_erk_opts_update(void *config_, void *dims, void *opts_)
************************************************/
int sim_erk_memory_calculate_size(void *config, void *dims, void *opts_) { return 0; }
void *sim_erk_memory_assign(void *config, void *dims, void *opts_, void *raw_memory)
{
return NULL;
@@ -237,7 +237,6 @@ void sim_irk_opts_update(void *config_, void *dims, void *opts_)
************************************************/
int sim_irk_memory_calculate_size(void *config, void *dims, void *opts_) { return 0; }
void *sim_irk_memory_assign(void *config, void *dims, void *opts_, void *raw_memory)
{
return NULL;
@@ -1404,8 +1404,7 @@ int sim_lifted_irk(void *config_, sim_in *in, sim_out *out, void *opts_, void *m
#else // TRIPLE_LOOP
// ---- BLASFEO: LU factorization ----
#if defined(LA_HIGH_PERFORMANCE)
blasfeo_pack_dmat(dim_sys, dim_sys, sys_mat, dim_sys, str_mat, 0,
0); // mat2strmat
blasfeo_pack_dmat(dim_sys, dim_sys, sys_mat, dim_sys, str_mat, 0, 0); // mat2strmat
#endif // LA_BLAS | LA_REFERENCE
blasfeo_dgetrf_rowpivot(dim_sys, dim_sys, str_mat, 0, 0, str_mat, 0, 0,
ipiv); // Gauss elimination
@@ -1582,18 +1581,16 @@ int sim_lifted_irk(void *config_, sim_in *in, sim_out *out, void *opts_, void *m
#else // TRIPLE_LOOP
#if defined(LA_HIGH_PERFORMANCE)
// ---- BLASFEO: row transformations + backsolve ----
blasfeo_pack_dmat(dim_sys, 1 + NF, sys_sol, dim_sys, str_sol, 0,
0); // mat2strmat
blasfeo_pack_dmat(dim_sys, 1 + NF, sys_sol, dim_sys, str_sol, 0, 0); // mat2strmat
blasfeo_drowpe(dim_sys, ipiv, str_sol); // row permutations
blasfeo_dtrsm_llnu(dim_sys, 1 + NF, 1.0, str_mat, 0, 0, str_sol, 0, 0, str_sol, 0,
0); // L backsolve
blasfeo_dtrsm_lunn(dim_sys, 1 + NF, 1.0, str_mat, 0, 0, str_sol, 0, 0, str_sol, 0,
0); // U backsolve
blasfeo_unpack_dmat(dim_sys, 1 + NF, str_sol, 0, 0, sys_sol,
dim_sys); // strmat2mat
// BLASFEO: row transformations + backsolve
0); // U backsolve
blasfeo_unpack_dmat(dim_sys, 1 + NF, str_sol, 0, 0, sys_sol, dim_sys); // strmat2mat
// BLASFEO: row transformations + backsolve
#else // LA_BLAS | LA_REFERENCE
// ---- BLASFEO: row transformations + backsolve ----
// ---- BLASFEO: row transformations + backsolve ----
blasfeo_drowpe(dim_sys, ipiv, str_sol); // row permutations
blasfeo_dtrsm_llnu(dim_sys, 1 + NF, 1.0, str_mat, 0, 0, str_sol, 0, 0, str_sol, 0,
0); // L backsolve
Oops, something went wrong.

0 comments on commit 7dcea36

Please sign in to comment.