ADMB Documentation  Fournier-pthread.1088
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines
Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes | Static Private Attributes
adpthread_manager Class Reference

#include <adthread.h>

List of all members.

Public Member Functions

 adpthread_manager (int ns, int bs)
 ~adpthread_manager ()
 adpthread_manager (int ngroups, ivector &group_num, int bs)
void send_dvector_to_slave (const dvector &x, int sno)
void send_dvector (const dvector &x, int sno)
void send_dvector_to_master (const dvector &x, int sno)
dvector get_dvector_from_slave (int sno)
dvector get_dvector (int sno)
dvector get_dvector_from_master (int sno)
dvar_vector get_dvar_vector_from_slave (int sno)
dvar_vector get_dvar_vector (int sno)
dvar_vector get_dvar_vector_from_master (int sno)
void send_dvar_vector_to_slave (const dvar_vector &x, int sno)
void send_dvar_vector (const dvar_vector &x, int sno)
void send_dvar_vector_to_master (const dvar_vector &x, int sno)
double get_double_from_master_nl (int sno)
void writebuffer (const void *x, int nbytes, int sno)
void readbuffer (const void *x, int nbytes, int sno)
void pthread_join_all (void)
void create_all (pthreadfun pf, void *ptr)
void create_all (pthreadfun pf, new_thread_data *ptr)
void create_all (pthreadfun pf, thread_data *ptr)
void attach_code (pthreadfun pf)
void create_all (void *ptr)
void check_buffer_size (int, int)
void check_buffer_size (int, int, int)
void check_buffer_size_read (int, int)
void check_buffer_size_read (int, int, int)
void memcpy (const double &x, int sno)
void read_lock_buffer_slave (int sno)
void write_lock_buffer_slave (int sno)
void read_lock_buffer_master (int sno)
void write_lock_buffer_master (int sno)
void read_unlock_buffer_slave (int sno)
void write_unlock_buffer_slave (int sno)
void read_unlock_buffer_master (int sno)
void write_unlock_buffer_master (int sno)
void adjoint_slave_write_unlock (int sno)
void adjoint_slave_write_lock (int sno)
void adjoint_master_write_lock (int sno)
void verify_id_string_from_master (const char *s, int sno)
void send_id_string_to_slave (const char *s, int sno)
void verify_id_string_from_slave (const char *s, int sno)
void send_id_string_to_master (const char *s, int sno)
void adjoint_send_dvariable_to_master (void)
void adjoint_get_dvariable_from_slave (void)
void adjoint_get_dvar_vector_from_master (void)
void adjoint_send_dvar_vector_to_slave (void)
void adjoint_write_unlock_buffer_master (void)
void adjoint_read_lock_buffer_master (void)
void adjoint_read_lock_buffer_slave (void)
void adjoint_write_unlock_buffer_slave (void)
void adjoint_read_unlock_buffer_slave (void)
void adjoint_read_unlock_buffer_master (void)
void adjoint_write_lock_buffer_slave (void)
void adjoint_write_lock_buffer_master (void)
void send_dvar_matrix_to_slave (const dvar_matrix &x, int sno)
void adjoint_send_dvar_matrix_to_slave (void)
void adjoint_get_dvar_matrix_from_master (void)
dvar_matrix get_dvar_matrix_from_master (int sno)
dmatrix get_dmatrix_from_master (int sno)
dvar_matrix get_dvar_matrix (int sno)
dmatrix get_dmatrix (int sno)
imatrix get_imatrix (int sno)
ivector get_ivector (int sno)
dvar_matrix get_dvar_matrix_from_slave (int sno)
void adjoint_get_dvar_matrix_from_slave (void)
void send_dvar_matrix_to_master (const dvar_matrix &x, int sno)
void send_dvar_matrix (const dvar_matrix &x, int sno)
void send_dmatrix (const dmatrix &x, int sno)
void send_imatrix (const imatrix &x, int sno)
void send_ivector (const ivector &x, int sno)
void adjoint_send_dvar_matrix_to_master (void)
void send_int_to_slave (int, int)
void send_int (int, int)
void send_pointer (void *, int)
void send_int_to_master (int, int)
int get_int_from_master (int)
int get_int (int)
void * get_pointer (int)
int get_int_from_slave (int)
void send_dvariable_to_slave (const prevariable &x, int sno)
void send_dvariable (const prevariable &x, int sno)
void send_dvariable_to_master (const prevariable &x, int sno)
dvariable get_dvariable_from_slave (int sno)
dvariable get_dvariable (int sno)
dvariable get_dvariable_from_master (int sno)
void adjoint_send_dvariable_to_slave (void)
void send_double_to_master (const double &, int)
void send_double (const double &, int)
void send_double_to_slave (const double &x, int sno)
double get_double_from_slave (int sno)
double get_double (int sno)
double get_double_from_master (int sno)
void adjoint_send_dvar3_array_to_slave (void)
void send_dvar3_array_to_slave (const dvar3_array &x, int sno)
void send_dvar3_array (const dvar3_array &x, int sno)
void send_d3_array (const d3_array &x, int sno)
void send_i3_array (const i3_array &x, int sno)
void adjoint_get_dvar3_array_from_master (void)
dvar3_array get_dvar3_array_from_master (int sno)
dvar3_array get_dvar3_array (int sno)
d3_array get_d3_array (int sno)
i3_array get_i3_array (int sno)
dvar3_array get_dvar3_array_from_slave (int sno)
void adjoint_get_dvar3_array_from_slave (void)
void send_dvar3_array_to_master (const dvar3_array &x, int sno)
void adjoint_send_dvar3_array_to_master (void)
void adjoint_send_dvar4_array_to_slave (void)
void send_dvar4_array_to_slave (const dvar4_array &x, int sno)
void send_dvar4_array (const dvar4_array &x, int sno)
void send_d4_array (const d4_array &x, int sno)
void send_i4_array (const i4_array &x, int sno)
void adjoint_get_dvar4_array_from_master (void)
dvar4_array get_dvar4_array_from_master (int sno)
dvar4_array get_dvar4_array_from_slave (int sno)
dvar4_array get_dvar4_array (int sno)
d4_array get_d4_array (int sno)
i4_array get_i4_array (int sno)
void adjoint_get_dvar4_array_from_slave (void)
void send_dvar4_array_to_master (const dvar4_array &x, int sno)
void adjoint_send_dvar4_array_to_master (void)
void adjoint_send_dvar5_array_to_slave (void)
void send_dvar5_array_to_slave (const dvar5_array &x, int sno)
void send_d5_array (const d5_array &x, int sno)
void send_dvar5_array (const dvar5_array &x, int sno)
void adjoint_get_dvar5_array_from_master (void)
dvar5_array get_dvar5_array_from_master (int sno)
dvar5_array get_dvar5_array (int sno)
d5_array get_d5_array (int sno)
dvar5_array get_dvar5_array_from_slave (int sno)
void adjoint_get_dvar5_array_from_slave (void)
void send_dvar5_array_to_master (const dvar5_array &x, int sno)
void adjoint_send_dvar5_array_to_master (void)
void adjoint_adwrite_lock_buffer_1 (void)
void adjoint_adwrite_lock_buffer_2 (void)
void adjoint_adwrite_unlock_buffer_1 (void)
void adjoint_adwrite_unlock_buffer_2 (void)
void write_unlock_buffer (int sno)
void cwrite_unlock_buffer (int sno)
void write_lock_buffer (int sno)
void cwrite_lock_buffer (int sno)
void adjoint_adread_lock_buffer_1 (void)
void adjoint_adread_lock_buffer_2 (void)
void adjoint_adread_unlock_buffer_1 (void)
void adjoint_adread_unlock_buffer_2 (void)
void read_lock_buffer (int sno)
void cread_lock_buffer (int sno)
void read_unlock_buffer (int sno)
void cread_unlock_buffer (int sno)
long int get_offset (int sno)

Static Public Member Functions

static int is_slave (void)
static int is_master (void)
static int get_slave_number (void)
static void set_slave_number (int n)
static void set_old_buffer_flag (int n)

Public Attributes

char ** transfer_buffer
char ** current_bptr
char ** buffend
int nslaves
int initial_buffer_size
int ngroups
ivector gmin
ivector gmax
int nfun
ivector num_in_group
int bs
ivector mflag
ivector sflag
ivector buffer_size
pthread_mutex_t copy_mutex
pthread_mutex_t start_mutex
pthread_mutex_t * smutex
pthread_cond_t * scondition
pthread_cond_t * mcondition
imatrix sbuffer_size
char *** stransfer_buffer
char *** scurrent_bptr
char *** sbuffend
imatrix smflag
imatrix ssflag
pthread_mutex_t ** ssmutex
pthread_cond_t ** sscondition
pthread_cond_t ** smcondition
pthread_t * thread1

Private Attributes

int num_code
int logflag
adtimeradt
pofstreamlogfiles
ppthreadfun ppf

Static Private Attributes

static int old_buffer_flag = 0
static __ADMBTHREAD__ int slave_number

Detailed Description

Definition at line 50 of file adthread.h.


Constructor & Destructor Documentation

Definition at line 25 of file thread_stuff.cpp.

adpthread_manager::adpthread_manager ( int  ngroups,
ivector group_num,
int  bs 
)

Definition at line 151 of file thread_stuff.cpp.


Member Function Documentation

static int adpthread_manager::is_slave ( void  ) [inline, static]

Definition at line 60 of file adthread.h.

static int adpthread_manager::is_master ( void  ) [inline, static]

Definition at line 64 of file adthread.h.

static int adpthread_manager::get_slave_number ( void  ) [inline, static]
static void adpthread_manager::set_slave_number ( int  n) [inline, static]

Definition at line 69 of file adthread.h.

static void adpthread_manager::set_old_buffer_flag ( int  n) [inline, static]

Definition at line 70 of file adthread.h.

void adpthread_manager::send_dvector_to_slave ( const dvector &  x,
int  sno 
)

Definition at line 1398 of file thread_stuff.cpp.

void adpthread_manager::send_dvector ( const dvector &  x,
int  sno 
)

Definition at line 1410 of file thread_stuff.cpp.

void adpthread_manager::send_dvector_to_master ( const dvector &  x,
int  sno 
)

Definition at line 1422 of file thread_stuff.cpp.

Definition at line 1432 of file thread_stuff.cpp.

Definition at line 1457 of file thread_stuff.cpp.

Definition at line 1445 of file thread_stuff.cpp.

Definition at line 1152 of file thread_stuff.cpp.

Definition at line 1129 of file thread_stuff.cpp.

Definition at line 1357 of file thread_stuff.cpp.

void adpthread_manager::send_dvar_vector ( const dvar_vector x,
int  sno 
)

Definition at line 1377 of file thread_stuff.cpp.

void adpthread_manager::writebuffer ( const void *  x,
int  nbytes,
int  sno 
)
void adpthread_manager::readbuffer ( const void *  x,
int  nbytes,
int  sno 
)

Definition at line 873 of file thread_stuff.cpp.

void adpthread_manager::create_all ( pthreadfun  pf,
void *  ptr 
)

Definition at line 836 of file thread_stuff.cpp.

Definition at line 844 of file thread_stuff.cpp.

Definition at line 317 of file thread_stuff.cpp.

void adpthread_manager::create_all ( void *  ptr)

Definition at line 852 of file thread_stuff.cpp.

Referenced by writebuffer().

void adpthread_manager::check_buffer_size ( int  nbytes,
int  s1,
int  s2 
)

Definition at line 363 of file thread_stuff.cpp.

Definition at line 322 of file thread_stuff.cpp.

Referenced by readbuffer().

void adpthread_manager::check_buffer_size_read ( int  nbytes,
int  s1,
int  s2 
)

Definition at line 339 of file thread_stuff.cpp.

void adpthread_manager::memcpy ( const double &  x,
int  sno 
)

Definition at line 693 of file thread_stuff.cpp.

Definition at line 646 of file thread_stuff.cpp.

Definition at line 503 of file thread_stuff.cpp.

Definition at line 456 of file thread_stuff.cpp.

Definition at line 814 of file thread_stuff.cpp.

Definition at line 602 of file thread_stuff.cpp.

Definition at line 765 of file thread_stuff.cpp.

Definition at line 556 of file thread_stuff.cpp.

Definition at line 725 of file thread_stuff.cpp.

Referenced by adjoint_master_write_lock().

void adpthread_manager::verify_id_string_from_master ( const char *  s,
int  sno 
)
void adpthread_manager::send_id_string_to_slave ( const char *  s,
int  sno 
)
void adpthread_manager::verify_id_string_from_slave ( const char *  s,
int  sno 
)
void adpthread_manager::send_id_string_to_master ( const char *  s,
int  sno 
)

Definition at line 484 of file thread_stuff.cpp.

Referenced by adjoint_read_lock_buffer_master(), and read_lock_buffer_master().

Definition at line 672 of file thread_stuff.cpp.

Referenced by adjoint_read_lock_buffer_slave(), and read_lock_buffer_slave().

Definition at line 792 of file thread_stuff.cpp.

Referenced by adjoint_read_unlock_buffer_slave(), and read_unlock_buffer_slave().

Definition at line 630 of file thread_stuff.cpp.

Referenced by adjoint_write_lock_buffer_slave(), and write_lock_buffer_slave().

Definition at line 438 of file thread_stuff.cpp.

Referenced by adjoint_write_lock_buffer_master(), and write_lock_buffer_master().

Definition at line 1503 of file thread_stuff.cpp.

Definition at line 1605 of file thread_stuff.cpp.

Definition at line 1636 of file thread_stuff.cpp.

Definition at line 1668 of file thread_stuff.cpp.

Definition at line 1718 of file thread_stuff.cpp.

Definition at line 1756 of file thread_stuff.cpp.

Definition at line 100 of file thread_stuff2.cpp.

Definition at line 42 of file thread_stuff2.cpp.

void adpthread_manager::send_dvar_matrix ( const dvar_matrix x,
int  sno 
)

Definition at line 1531 of file thread_stuff.cpp.

void adpthread_manager::send_dmatrix ( const dmatrix x,
int  sno 
)

Definition at line 1558 of file thread_stuff.cpp.

void adpthread_manager::send_imatrix ( const imatrix x,
int  sno 
)

Definition at line 1739 of file thread_stuff.cpp.

void adpthread_manager::send_ivector ( const ivector x,
int  sno 
)

Definition at line 1768 of file thread_stuff.cpp.

Definition at line 1018 of file thread_stuff.cpp.

void adpthread_manager::send_int ( int  x,
int  sno 
)

Definition at line 1024 of file thread_stuff.cpp.

void adpthread_manager::send_pointer ( void *  ,
int   
)

Definition at line 1030 of file thread_stuff.cpp.

Definition at line 1036 of file thread_stuff.cpp.

Definition at line 1044 of file thread_stuff.cpp.

Definition at line 1052 of file thread_stuff.cpp.

Definition at line 1315 of file thread_stuff.cpp.

void adpthread_manager::send_dvariable ( const prevariable x,
int  sno 
)

Definition at line 1275 of file thread_stuff.cpp.

Definition at line 1259 of file thread_stuff.cpp.

Definition at line 1202 of file thread_stuff.cpp.

Definition at line 1220 of file thread_stuff.cpp.

Definition at line 1302 of file thread_stuff.cpp.

Referenced by adjoint_send_dvariable_to_slave(), and send_dvariable_to_slave().

void adpthread_manager::send_double_to_master ( const double &  x,
int  sno 
)

Definition at line 1075 of file thread_stuff.cpp.

void adpthread_manager::send_double ( const double &  x,
int  sno 
)

Definition at line 1007 of file thread_stuff.cpp.

void adpthread_manager::send_double_to_slave ( const double &  x,
int  sno 
)

Definition at line 1013 of file thread_stuff.cpp.

Definition at line 1081 of file thread_stuff.cpp.

Definition at line 1067 of file thread_stuff.cpp.

Definition at line 1060 of file thread_stuff.cpp.

Definition at line 55 of file thread_stuff3.cpp.

void adpthread_manager::send_dvar3_array ( const dvar3_array x,
int  sno 
)

Definition at line 96 of file thread_stuff4.cpp.

void adpthread_manager::send_d3_array ( const d3_array x,
int  sno 
)

Definition at line 136 of file thread_stuff4.cpp.

void adpthread_manager::send_i3_array ( const i3_array x,
int  sno 
)

Definition at line 354 of file thread_stuff4.cpp.

Definition at line 137 of file thread_stuff3.cpp.

Definition at line 250 of file thread_stuff4.cpp.

Definition at line 296 of file thread_stuff4.cpp.

Definition at line 325 of file thread_stuff4.cpp.

Definition at line 204 of file thread_stuff4.cpp.

Definition at line 56 of file thread_stuff4.cpp.

Definition at line 65 of file thread_stuff6.cpp.

void adpthread_manager::send_dvar4_array ( const dvar4_array x,
int  sno 
)

Definition at line 120 of file thread_stuff5.cpp.

void adpthread_manager::send_d4_array ( const d4_array x,
int  sno 
)

Definition at line 173 of file thread_stuff5.cpp.

void adpthread_manager::send_i4_array ( const i4_array x,
int  sno 
)

Definition at line 460 of file thread_stuff5.cpp.

Definition at line 175 of file thread_stuff6.cpp.

Definition at line 266 of file thread_stuff5.cpp.

Definition at line 325 of file thread_stuff5.cpp.

Definition at line 384 of file thread_stuff5.cpp.

Definition at line 422 of file thread_stuff5.cpp.

Definition at line 68 of file thread_stuff5.cpp.

Definition at line 83 of file thread_stuff8.cpp.

void adpthread_manager::send_d5_array ( const d5_array x,
int  sno 
)

Definition at line 225 of file thread_stuff7.cpp.

void adpthread_manager::send_dvar5_array ( const dvar5_array x,
int  sno 
)

Definition at line 154 of file thread_stuff7.cpp.

Definition at line 226 of file thread_stuff8.cpp.

Definition at line 429 of file thread_stuff7.cpp.

Definition at line 509 of file thread_stuff7.cpp.

Definition at line 349 of file thread_stuff7.cpp.

Definition at line 83 of file thread_stuff7.cpp.

Definition at line 113 of file xthread_stuff.cpp.

Referenced by adjoint_adwrite_lock_buffer_1(), and write_lock_buffer().

Definition at line 148 of file xthread_stuff.cpp.

Referenced by adjoint_adwrite_lock_buffer_2(), and write_lock_buffer().

Definition at line 286 of file xthread_stuff.cpp.

Referenced by adjoint_adwrite_unlock_buffer_1(), and write_unlock_buffer().

Definition at line 321 of file xthread_stuff.cpp.

Referenced by adjoint_adwrite_unlock_buffer_2(), and write_unlock_buffer().

Definition at line 177 of file xthread_stuff.cpp.

Definition at line 236 of file xthread_stuff.cpp.

Definition at line 22 of file xthread_stuff.cpp.

Definition at line 72 of file xthread_stuff.cpp.

Definition at line 122 of file ythread_stuff.cpp.

Referenced by adjoint_adread_lock_buffer_1(), and read_lock_buffer().

Definition at line 160 of file ythread_stuff.cpp.

Referenced by adjoint_adread_lock_buffer_2(), and read_lock_buffer().

Definition at line 305 of file ythread_stuff.cpp.

Referenced by adjoint_adread_unlock_buffer_1(), and read_unlock_buffer().

Definition at line 338 of file ythread_stuff.cpp.

Referenced by adjoint_adread_unlock_buffer_2(), and read_unlock_buffer().

Definition at line 24 of file ythread_stuff.cpp.

Definition at line 78 of file ythread_stuff.cpp.

Definition at line 198 of file ythread_stuff.cpp.

Definition at line 256 of file ythread_stuff.cpp.

Definition at line 916 of file thread_stuff.cpp.


Member Data Documentation

Definition at line 52 of file adthread.h.

Referenced by adpthread_manager(), and attach_code().

int adpthread_manager::old_buffer_flag = 0 [static, private]

Definition at line 53 of file adthread.h.

Referenced by set_old_buffer_flag().

Definition at line 55 of file adthread.h.

Referenced by get_slave_number(), is_master(), is_slave(), and set_slave_number().

Definition at line 58 of file adthread.h.

Referenced by adpthread_manager(), attach_code(), and create_all().

Definition at line 74 of file adthread.h.

Referenced by adpthread_manager(), and check_buffer_size_read().

Definition at line 75 of file adthread.h.

Referenced by adpthread_manager(), create_all(), and pthread_join_all().

Definition at line 76 of file adthread.h.

Referenced by check_buffer_size().

Definition at line 77 of file adthread.h.

Referenced by adpthread_manager(), and create_all().

Definition at line 78 of file adthread.h.

Referenced by adpthread_manager().

Definition at line 79 of file adthread.h.

Referenced by adpthread_manager().

Definition at line 80 of file adthread.h.

Definition at line 81 of file adthread.h.

Referenced by adpthread_manager(), and create_all().

Definition at line 82 of file adthread.h.

Referenced by adpthread_manager(), and check_buffer_size_read().

Definition at line 85 of file adthread.h.

Referenced by adpthread_manager().

Definition at line 86 of file adthread.h.

Referenced by adpthread_manager().

Definition at line 87 of file adthread.h.

Referenced by adpthread_manager().

pthread_mutex_t* adpthread_manager::smutex

Definition at line 91 of file adthread.h.

Referenced by adpthread_manager(), and check_buffer_size().

Definition at line 94 of file adthread.h.

Referenced by adpthread_manager(), check_buffer_size(), and check_buffer_size_read().

pthread_mutex_t** adpthread_manager::ssmutex

Definition at line 100 of file adthread.h.

Referenced by adpthread_manager(), create_all(), and pthread_join_all().


The documentation for this class was generated from the following files: