From e5d8fe50719f61138a21a568da9b06532a42dd5b Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 7 Feb 2017 13:17:45 +0800 Subject: Handle #pragma omp warning when not give -fopenmp --- methods/powell/powell_method.hpp | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) (limited to 'methods/powell') diff --git a/methods/powell/powell_method.hpp b/methods/powell/powell_method.hpp index 381ffe1..228a526 100644 --- a/methods/powell/powell_method.hpp +++ b/methods/powell/powell_method.hpp @@ -35,7 +35,7 @@ namespace opt_utilities optimizer* p_optimizer; volatile bool bstop; //typedef blitz::Array array2d_type; - + const char* do_get_type_name()const { return "powell method"; @@ -43,7 +43,7 @@ namespace opt_utilities private: array1d_type start_point; array1d_type end_point; - + private: int ncom; array1d_type pcom_p; @@ -58,7 +58,7 @@ namespace opt_utilities return p_fo->eval(x); } - + private: void clear_xi() { @@ -117,7 +117,9 @@ namespace opt_utilities del=0.0; for(i=0;i* do_clone()const { return new powell_method(*this); } - + void do_set_start_point(const array1d_type& p) { resize(start_point,get_size(p)); @@ -241,9 +247,9 @@ namespace opt_utilities p_optimizer=&o; p_fo=p_optimizer->ptr_func_obj(); } - - - + + + pT do_optimize() { bstop=false; @@ -257,14 +263,14 @@ namespace opt_utilities xi[i][j]=(i==j)?1:0; } } - + int iter=100; opt_eq(end_point,start_point); rT fret; powell(end_point,threshold,iter,fret); return end_point; } - + void do_stop() { bstop=true; -- cgit v1.2.2