Revision 752 branches/threaded2/src/linad99/gradstrc.cpp

gradstrc.cpp (revision 752)
8 8
 * \file
9 9
 * Description not yet available.
10 10
 */
11
#include <sstream>
12
#include <thread>
11 13
#include "fvar.hpp"
12 14

  
13 15
//#define THREAD_SAFE
......
67 69
//char * MY_BUF=NULL;
68 70
// *************************************************************
69 71
// *************************************************************
70
int ctlc_flag = 0;
71
__ADMBTHREAD__ int gradient_structure::Hybrid_bounded_flag=0;
72
__ADMBTHREAD__ DF_FILE * gradient_structure::fp=NULL;
73
__ADMBTHREAD__ char gradient_structure::cmpdif_file_name[101];
74
//char gradient_structure::var_store_file_name[101];
75
int gradient_structure::NUM_RETURN_ARRAYS = 25;
76
__ADMBTHREAD__ double * gradient_structure::hessian_ptr=NULL;
77
int gradient_structure::NUM_DEPENDENT_VARIABLES = 2000;
78
#if (defined(NO_DERIVS))
79
  int gradient_structure::no_derivatives = 0;
80
#endif
81
__ADMBTHREAD__ long int gradient_structure::max_last_offset = 0;
82
__ADMBTHREAD__ long int gradient_structure::NVAR = 0;
83
__ADMBTHREAD__ long int gradient_structure::TOTAL_BYTES = 0;
84
__ADMBTHREAD__ long int gradient_structure::PREVIOUS_TOTAL_BYTES = 0;
85
long int gradient_structure::USE_FOR_HESSIAN = 0;
86
__ADMBTHREAD__ dvariable** gradient_structure::RETURN_ARRAYS = NULL;
87
__ADMBTHREAD__ int gradient_structure::RETURN_ARRAYS_PTR;
88
__ADMBTHREAD__ dvariable ** gradient_structure::RETURN_PTR_CONTAINER = NULL;
89
__ADMBTHREAD__ int gradient_structure::RETURN_ARRAYS_SIZE = 70;
90
__ADMBTHREAD__ int gradient_structure::instances = 0;
91
//int gradient_structure::RETURN_INDEX = 0;
92
//dvariable * gradient_structure::FRETURN = NULL;
93
__ADMBTHREAD__ dvariable * gradient_structure::MAX_RETURN = NULL;
94
__ADMBTHREAD__ dvariable * gradient_structure::MIN_RETURN = NULL;
95
__ADMBTHREAD__ dvariable * gradient_structure::RETURN_PTR = NULL;
96 72
#ifdef __BORLANDC__
97 73
long int gradient_structure::GRADSTACK_BUFFER_SIZE = 4000000L;
98 74
long int gradient_structure::CMPDIF_BUFFER_SIZE=140000000L;
99 75
#else
100
long long int gradient_structure::GRADSTACK_BUFFER_SIZE = 4000000L;
101
long long int gradient_structure::CMPDIF_BUFFER_SIZE=140000000L;
76
__thread long long int gradient_structure::GRADSTACK_BUFFER_SIZE = 4000000L;
77
__thread long long int gradient_structure::CMPDIF_BUFFER_SIZE = 140000000L;
102 78
#endif
79
__thread DF_FILE* gradient_structure::fp = nullptr;
80
__thread int gradient_structure::instances = 0;
81
__thread dlist* gradient_structure::GRAD_LIST = nullptr;
82
__thread int gradient_structure::save_var_flag = 0;
83
__thread int gradient_structure::save_var_file_flag = 0;
84
__thread int gradient_structure::MAX_DLINKS = 5000;
85
__thread int gradient_structure::NUM_DEPENDENT_VARIABLES = 2000;
86
__thread long int gradient_structure::NVAR = 0;
87
__thread long int gradient_structure::TOTAL_BYTES = 0;
88
__thread long int gradient_structure::PREVIOUS_TOTAL_BYTES = 0;
89
__thread long int gradient_structure::USE_FOR_HESSIAN = 0;
90
__thread int gradient_structure::NUM_RETURN_ARRAYS = 25;
91
__thread unsigned long gradient_structure::ARRAY_MEMBLOCK_SIZE = 0L;
92
__thread unsigned int gradient_structure::MAX_NVAR_OFFSET = 5000;
103 93

  
104
__ADMBTHREAD__ dependent_variables_information * gradient_structure::DEPVARS_INFO=NULL;
94
__thread int gradient_structure::RETURN_ARRAYS_SIZE = 70;
95
__thread long int gradient_structure::max_last_offset = 0;
96
__thread int gradient_structure::Hybrid_bounded_flag = 0;
105 97

  
106
int gradient_structure::save_var_flag=0;
107
int gradient_structure::save_var_file_flag=0;
108
//int gradient_structure::_GRADFILE_PTR = NULL; // should be int gradfile_handle;
109
//int gradient_structure::_GRADFILE_PTR1 = NULL; // should be int gradfile_handle;
110
//int gradient_structure::_GRADFILE_PTR2 = NULL; // should be int gradfile_handle;
111
//int gradient_structure::_VARSSAV_PTR = 0; // should be int gradfile_handle;
98
__thread dvariable** gradient_structure::RETURN_ARRAYS = nullptr;
99
__thread dvariable** gradient_structure::RETURN_PTR_CONTAINER = nullptr;
100
__thread char* gradient_structure::ARRAY_MEMBLOCK_BASE = nullptr;
101
__thread char* gradient_structure::ARRAY_MEMBLOCK_BASEA = nullptr;
102
__thread char* gradient_structure::ARRAY_MEMBLOCK_SAVE = nullptr;
103
__thread double* gradient_structure::variables_save = nullptr;
104
__thread indvar_offset_list* gradient_structure::INDVAR_LIST = nullptr;
105
__thread dependent_variables_information* gradient_structure::DEPVARS_INFO = nullptr; 
106
__thread double* gradient_structure::hessian_ptr = nullptr;
107
__thread grad_stack* gradient_structure::GRAD_STACK1 = nullptr;
108
__thread dvariable* gradient_structure::RETURN_PTR = nullptr;
109
__thread dvariable* gradient_structure::MIN_RETURN = nullptr;
110
__thread dvariable* gradient_structure::MAX_RETURN = nullptr;
111
__thread arr_list* gradient_structure::ARR_LIST1 = nullptr;
112
__thread arr_list* gradient_structure::ARR_FREE_LIST1 = nullptr;
113
#if (defined(NO_DERIVS))
114
__thread int gradient_structure::no_derivatives = 0;
115
#endif
116
//Is this storing a pointer to int? bad...
117
__thread int gradient_structure::RETURN_ARRAYS_PTR = 0;
118
__thread char gradient_structure::cmpdif_file_name[101];
112 119

  
113
__ADMBTHREAD__ unsigned int gradient_structure::MAX_NVAR_OFFSET = 5000;
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff