Revision 752 branches/threaded2/src/nh99/xmodelm3.cpp

xmodelm3.cpp (revision 752)
44 44
  {
45 45
    return inner_opt_flag;
46 46
  }
47

  
48
  int function_minimizer::inner_opt_flag=0;
47
__thread int function_minimizer::inner_opt_flag = 0;
49 48
#endif
50 49

  
50
__thread int function_minimizer::bad_step_flag = 0;  
51
__thread named_dvar_vector* function_minimizer::ph = nullptr;
52
__thread named_dvar_vector* function_minimizer::pg = nullptr;
51 53

  
52
  int function_minimizer::bad_step_flag=0;  
53

  
54 54
  void function_minimizer::minimize(void)
55 55
  {
56 56
    int nopt=0;
......
543 543
  }
544 544
#endif
545 545

  
546
  function_minimizer::function_minimizer(long int sz)
547
  {
548
#  if defined(USE_LAPLACE)
549
    lapprox=0;
550
    multinomial_weights=0;
551
    //cout << lapprox << endl;
552
#  endif
553
    maxfn  = 1000;
554
    iprint = 1;
555
    crit   = 0.0001;
556
    imax   = 30;
557
    dfn    = 0.01;
558
    iexit  = 0;
559
    ihflag = 0;
560
    ihang  = 0;
561
    scroll_flag = 1;
562
    maxfn_flag=0;
563
    quit_flag=0;
564
    min_improve=.0;
565
    negdirections=0;
566
    spminflag=0;
567
    repeatminflag=0;
546
function_minimizer::function_minimizer(long int sz)
547
{
548
#if defined(USE_LAPLACE)
549
  lapprox=0;
550
  multinomial_weights=0;
551
#endif
552
  maxfn  = 1000;
553
  iprint = 1;
554
  crit   = 0.0001;
555
  imax   = 30;
556
  dfn    = 0.01;
557
  iexit  = 0;
558
  ihflag = 0;
559
  ihang  = 0;
560
  scroll_flag = 1;
561
  maxfn_flag=0;
562
  quit_flag=0;
563
  min_improve=.0;
564
  negdirections = nullptr;
565
  spminflag=0;
566
  repeatminflag=0;
568 567

  
569
    int ssz;
570

  
571
    int nopt=get_option_number("-ams",
568
  int ssz;
569
  int nopt=get_option_number("-ams",
572 570
      "-ams option needs positive integer -- ignored",ssz);
573
    if (nopt>-1 && ssz>0) {
571
  if (nopt > -1 && ssz > 0) 
572
  {
574 573
      sz=ssz;
575
    }
574
  }
576 575
    
577 576
#ifdef __BORLANDC__
578
    long int lssz;
577
  long int lssz;
579 578
#else
580
    long long int lssz;
579
  long long int lssz;
581 580
#endif
582
    nopt=get_option_number("-cbs",
581
  nopt=get_option_number("-cbs",
583 582
      "-cbs option needs positive integer -- ignored",lssz);
584
    if (nopt>-1 && lssz>0) {
585
      gradient_structure::set_CMPDIF_BUFFER_SIZE(lssz);
586
    }
587

  
588
    
589
    nopt=get_option_number("-gbs",
583
  if (nopt > -1 && lssz > 0)
584
  {
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff