version 1.22, 2007/02/18 05:36:28 |
version 1.32, 2020/10/04 03:14:08 |
|
|
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* |
* |
* $OpenXM: OpenXM_contrib2/asir2000/include/ox.h,v 1.21 2004/01/25 11:54:09 ohara Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/include/ox.h,v 1.31 2018/03/29 01:32:53 noro Exp $ |
*/ |
*/ |
#include "com.h" |
#include "com.h" |
|
|
/* version */ |
/* version */ |
|
|
#define OX_VERSION 199901160 |
#define OX_VERSION 199901160 |
|
|
/* header */ |
/* header */ |
|
|
#define OX_COMMAND 513 |
#define OX_COMMAND 513 |
#define OX_DATA 514 |
#define OX_DATA 514 |
#define OX_SYNC_BALL 515 |
#define OX_SYNC_BALL 515 |
|
|
#define OX_DATA_WITH_SIZE 521 |
#define OX_DATA_WITH_SIZE 521 |
#define OX_DATA_ASIR_BINARY_EXPRESSION 522 |
#define OX_DATA_ASIR_BINARY_EXPRESSION 522 |
|
|
#define OX_LOCAL_OBJECT 0x7fcdef30 |
#define OX_LOCAL_OBJECT 0x7fcdef30 |
|
|
#define OX_LOCAL_OBJECT_ASIR (OX_LOCAL_OBJECT+0) |
#define OX_LOCAL_OBJECT_ASIR (OX_LOCAL_OBJECT+0) |
#define OX_LOCAL_OBJECT_SM1 (OX_LOCAL_OBJECT+1) |
#define OX_LOCAL_OBJECT_SM1 (OX_LOCAL_OBJECT+1) |
|
|
/* cmo_tags */ |
/* cmo_tags */ |
|
|
#define CMO_LARGE_ID 0x7f000000 |
#define CMO_LARGE_ID 0x7f000000 |
|
|
#define CMO_ERROR CMO_LARGE_ID+1 |
#define CMO_ERROR CMO_LARGE_ID+1 |
#define CMO_ERROR2 CMO_LARGE_ID+2 |
#define CMO_ERROR2 CMO_LARGE_ID+2 |
|
|
#define CMO_NULL 1 |
#define CMO_NULL 1 |
#define CMO_INT32 2 |
#define CMO_INT32 2 |
#define CMO_DATUM 3 |
#define CMO_DATUM 3 |
#define CMO_STRING 4 |
#define CMO_STRING 4 |
#define CMO_MATHCAP 5 |
#define CMO_MATHCAP 5 |
|
|
#define CMO_ARRAY 16 |
#define CMO_ARRAY 16 |
#define CMO_LIST 17 |
#define CMO_LIST 17 |
#define CMO_ATOM 18 |
#define CMO_ATOM 18 |
#define CMO_MONOMIAL32 19 |
#define CMO_MONOMIAL32 19 |
#define CMO_ZZ 20 |
#define CMO_ZZ 20 |
#define CMO_QQ 21 |
#define CMO_QQ 21 |
#define CMO_ZERO 22 |
#define CMO_ZERO 22 |
|
|
#define CMO_DMS_GENERIC 24 |
#define CMO_DMS_GENERIC 24 |
#define CMO_DMS_OF_N_VARIABLES 25 |
#define CMO_DMS_OF_N_VARIABLES 25 |
#define CMO_RING_BY_NAME 26 |
#define CMO_RING_BY_NAME 26 |
#define CMO_RECURSIVE_POLYNOMIAL 27 |
#define CMO_RECURSIVE_POLYNOMIAL 27 |
|
|
#define CMO_DISTRIBUTED_POLYNOMIAL 31 |
#define CMO_DISTRIBUTED_POLYNOMIAL 31 |
#define CMO_UNIVARIATE_POLYNOMIAL 33 |
#define CMO_UNIVARIATE_POLYNOMIAL 33 |
#define CMO_RATIONAL 34 |
#define CMO_RATIONAL 34 |
|
#define CMO_COMPLEX 35 |
|
|
#define CMO_64BIT_MACHINE_DOUBLE 40 |
#define CMO_64BIT_MACHINE_DOUBLE 40 |
#define CMO_ARRAY_OF_64BIT_MACHINE_DOUBLE 41 |
#define CMO_ARRAY_OF_64BIT_MACHINE_DOUBLE 41 |
#define CMO_128BIT_MACHINE_DOUBLE 42 |
#define CMO_128BIT_MACHINE_DOUBLE 42 |
#define CMO_ARRAY_OF_128BIT_MACHINE_DOUBLE 43 |
#define CMO_ARRAY_OF_128BIT_MACHINE_DOUBLE 43 |
|
|
#define CMO_BIGFLOAT 50 |
#define CMO_BIGFLOAT 50 |
#define CMO_IEEE_DOUBLE_FLOAT 51 |
#define CMO_IEEE_DOUBLE_FLOAT 51 |
|
#define CMO_BIGFLOAT32 52 |
|
|
#define CMO_INDETERMINATE 60 |
#define CMO_INDETERMINATE 60 |
#define CMO_TREE 61 |
#define CMO_TREE 61 |
#define CMO_LAMBDA 62 |
#define CMO_LAMBDA 62 |
|
|
/* asir local object id */ |
/* asir local object id */ |
|
|
#define ASIR_VL 0 |
#define ASIR_VL 0 |
#define ASIR_OBJ 1 |
#define ASIR_OBJ 1 |
|
|
/* commands */ |
/* commands */ |
|
|
|
|
|
|
#define SM_nop 300 |
#define SM_nop 300 |
|
|
#define SM_control_kill 1024 |
/* local SM command in ox_asir */ |
#define SM_control_intr 1025 |
#define SM_executeFunctionSync 400 |
#define SM_control_reset_connection 1030 |
|
|
|
|
#define SM_control_kill 1024 |
|
#define SM_control_intr 1025 |
|
#define SM_control_reset_connection 1030 |
|
|
typedef FILE *ox_stream; |
typedef FILE *ox_stream; |
|
|
/* a macro to check whether data are available in the read buffer */ |
/* a macro to check whether data are available in the read buffer */ |
Line 158 typedef FILE *ox_stream; |
|
Line 163 typedef FILE *ox_stream; |
|
#define FP_DATA_IS_AVAILABLE(fp) ((fp)->_r) |
#define FP_DATA_IS_AVAILABLE(fp) ((fp)->_r) |
#elif defined(sparc) || defined(__alpha) || defined(__SVR4) || defined(mips) || defined(_IBMR2) |
#elif defined(sparc) || defined(__alpha) || defined(__SVR4) || defined(mips) || defined(_IBMR2) |
#define FP_DATA_IS_AVAILABLE(fp) ((fp)->_cnt) |
#define FP_DATA_IS_AVAILABLE(fp) ((fp)->_cnt) |
#elif defined(VISUAL) |
#elif defined(VISUAL) || defined(__MINGW32__) |
#define FP_DATA_IS_AVAILABLE(fp) ((fp)->p < (fp)->buf_size) |
#define FP_DATA_IS_AVAILABLE(fp) ((fp)->p < (fp)->buf_size) |
#elif defined(hpux) |
#elif defined(hpux) |
#define FP_DATA_IS_AVAILABLE(fp) ((fp)->__cnt) |
#define FP_DATA_IS_AVAILABLE(fp) ((fp)->__cnt) |
Line 198 void read_cmo_dp(FILE *s,DP *rp); |
|
Line 203 void read_cmo_dp(FILE *s,DP *rp); |
|
void read_cmo_list(FILE *s,Obj *rp); |
void read_cmo_list(FILE *s,Obj *rp); |
void read_cmo_zz(FILE *s,int *sgn,N *rp); |
void read_cmo_zz(FILE *s,int *sgn,N *rp); |
void read_cmo_uint(FILE *s,USINT *rp); |
void read_cmo_uint(FILE *s,USINT *rp); |
|
void read_cmo_bf(FILE *s,BF *q); |
|
void read_cmo_complex(FILE *s,C *q); |
void read_cmo(FILE *s,Obj *rp); |
void read_cmo(FILE *s,Obj *rp); |
void write_cmo_tree(FILE *s,LIST l); |
void write_cmo_tree(FILE *s,LIST l); |
void write_cmo_error(FILE *s,ERR e); |
void write_cmo_error(FILE *s,ERR e); |
Line 212 void write_cmo_p(FILE *s,P p); |
|
Line 219 void write_cmo_p(FILE *s,P p); |
|
void write_cmo_zz(FILE *s,int sgn,N n); |
void write_cmo_zz(FILE *s,int sgn,N n); |
void write_cmo_real(FILE *s,Real real); |
void write_cmo_real(FILE *s,Real real); |
void write_cmo_q(FILE *s,Q q); |
void write_cmo_q(FILE *s,Q q); |
|
void write_cmo_bf(FILE *s,BF q); |
|
void write_cmo_complex(FILE *s,C q); |
void write_cmo_uint(FILE *s,USINT ui); |
void write_cmo_uint(FILE *s,USINT ui); |
|
void write_cmo_matrix_as_list(FILE *s,MAT m); |
void write_cmo_mathcap(FILE *s,MATHCAP mc); |
void write_cmo_mathcap(FILE *s,MATHCAP mc); |
int cmo_tag(Obj obj,int *tag); |
int cmo_tag(Obj obj,int *tag); |
void write_cmo(FILE *s,Obj obj); |
void write_cmo(FILE *s,Obj obj); |
Line 273 int gen_fwrite (char *ptr,int size,int nitems,FILE *st |
|
Line 283 int gen_fwrite (char *ptr,int size,int nitems,FILE *st |
|
void write_char(FILE *f,unsigned char *p); |
void write_char(FILE *f,unsigned char *p); |
void write_short(FILE *f,unsigned short *p); |
void write_short(FILE *f,unsigned short *p); |
void write_int(FILE *f,unsigned int *p); |
void write_int(FILE *f,unsigned int *p); |
|
void write_int64(FILE *f,UL *p); |
void init_deskey(); |
void init_deskey(); |
void write_intarray(FILE *f,unsigned int *p,int l); |
void write_intarray(FILE *f,unsigned int *p,int l); |
void write_longarray(FILE *f,unsigned long *p,int l); |
void write_longarray(FILE *f,unsigned long *p,int l); |
Line 281 void write_string(FILE *f,unsigned char *p,int l); |
|
Line 292 void write_string(FILE *f,unsigned char *p,int l); |
|
void read_char(FILE *f,unsigned char *p); |
void read_char(FILE *f,unsigned char *p); |
void read_short(FILE *f,unsigned short *p); |
void read_short(FILE *f,unsigned short *p); |
void read_int(FILE *f,unsigned int *p); |
void read_int(FILE *f,unsigned int *p); |
|
void read_int64(FILE *f,UL *p); |
void read_intarray(FILE *f,unsigned int *p,int l); |
void read_intarray(FILE *f,unsigned int *p,int l); |
void read_longarray(FILE *f,unsigned long *p,int l); |
void read_longarray(FILE *f,unsigned long *p,int l); |
void read_string(FILE *f,unsigned char *p,int l); |
void read_string(FILE *f,unsigned char *p,int l); |
Line 298 void init_socket(); |
|
Line 310 void init_socket(); |
|
int get_fd(int index); |
int get_fd(int index); |
int get_index(int fd); |
int get_index(int fd); |
void ox_launch_generic(char *host,char *launcher,char *server, |
void ox_launch_generic(char *host,char *launcher,char *server, |
int use_unix,int use_ssh,int use_x,int conn_to_serv,Q *rp); |
int use_unix,int use_ssh,int use_x,int conn_to_serv,Q *rp); |
void spawn_server(char *host,char *launcher,char *server, |
void spawn_server(char *host,char *launcher,char *server, |
int use_unix,int use_ssh,int use_x,int conn_to_serv, |
int use_unix,int use_ssh,int use_x,int conn_to_serv, |
char *control_port_str,char *server_port_str); |
char *control_port_str,char *server_port_str); |
void ox_launch_main(int with_x,NODE arg,Obj *p); |
void ox_launch_main(int with_x,NODE arg,Obj *p); |
int register_server(int af_unix,int m,int c); |
int register_server(int af_unix,int m,int c,int fd); |
int get_mcindex(int i); |
int get_mcindex(int i); |
void shutdown_all(); |
void shutdown_all(); |
|
int register_102(int s1,int rank,int is_master); |
|
|
/* library functions */ |
/* library functions */ |
void asir_ox_push_cmo(void *); |
void asir_ox_push_cmo(void *); |
Line 314 void asir_ox_push_cmd(int); |
|
Line 327 void asir_ox_push_cmd(int); |
|
void asir_ox_execute_string(char *); |
void asir_ox_execute_string(char *); |
int asir_ox_peek_cmo_size(); |
int asir_ox_peek_cmo_size(); |
int asir_ox_init(int); |
int asir_ox_init(int); |
|
int no_ox_reset(int s); |