| version 1.35, 2008/08/01 08:29:40 |
version 1.40, 2015/08/27 03:03:33 |
|
|
| /* -*- mode: C -*- */ |
/* -*- mode: C -*- */ |
| /* $OpenXM: OpenXM/src/ox_toolkit/ox_toolkit.h,v 1.34 2007/03/14 10:30:54 ohara Exp $ */ |
/* $OpenXM: OpenXM/src/ox_toolkit/ox_toolkit.h,v 1.39 2015/08/26 20:17:28 ohara Exp $ */ |
| |
|
| #ifndef _OX_TOOLKIT_H_ |
#ifndef _OX_TOOLKIT_H_ |
| #define _OX_TOOLKIT_H_ |
#define _OX_TOOLKIT_H_ |
|
|
| |
|
| #include <stdio.h> |
#include <stdio.h> |
| #include <gmp.h> |
#include <gmp.h> |
| |
#include <mpfr.h> |
| #include <ox/cmotag.h> |
#include <ox/cmotag.h> |
| #include <ox/oxMessageTag.h> |
#include <ox/oxMessageTag.h> |
| #include <ox/smCommand.h> |
#include <ox/smCommand.h> |
| #include <gc/gc.h> |
#include <gc/gc.h> |
| |
|
| |
#if defined(_MSC_VER) |
| |
#include <malloc.h> |
| |
#endif |
| |
|
| #define MALLOC(x) GC_MALLOC((x)) |
#define MALLOC(x) GC_MALLOC((x)) |
| #define MALLOC_ATOMIC(x) GC_MALLOC_ATOMIC((x)) |
#define MALLOC_ATOMIC(x) GC_MALLOC_ATOMIC((x)) |
| #define ALLOCA(x) alloca((x)) |
#define ALLOCA(x) alloca((x)) |
| Line 120 typedef struct { |
|
| Line 125 typedef struct { |
|
| |
|
| typedef struct { |
typedef struct { |
| int tag; |
int tag; |
| |
mpfr_t mpfr; |
| |
} cmo_bf; |
| |
|
| |
typedef struct { |
| |
int tag; |
| |
cmo *re,*im; |
| |
} cmo_complex; |
| |
|
| |
typedef struct { |
| |
int tag; |
| double d; /* machine dependent */ |
double d; /* machine dependent */ |
| } cmo_double; |
} cmo_double; |
| |
|
| Line 192 cmo_zz* new_cmo_zz_set_string(char* s); |
|
| Line 207 cmo_zz* new_cmo_zz_set_string(char* s); |
|
| cmo_qq* new_cmo_qq(); |
cmo_qq* new_cmo_qq(); |
| cmo_qq* new_cmo_qq_set_mpq(mpq_ptr q); |
cmo_qq* new_cmo_qq_set_mpq(mpq_ptr q); |
| cmo_qq* new_cmo_qq_set_mpz(mpz_ptr num, mpz_ptr den); |
cmo_qq* new_cmo_qq_set_mpz(mpz_ptr num, mpz_ptr den); |
| |
cmo_bf* new_cmo_bf(); |
| |
cmo_bf* new_cmo_bf_set_mpfr(mpfr_ptr q); |
| |
cmo_complex* new_cmo_complex(); |
| |
cmo_complex* new_cmo_complex_set_re_im(cmo *re,cmo *im); |
| cmo_zero* new_cmo_zero(); |
cmo_zero* new_cmo_zero(); |
| cmo_double* new_cmo_double(double d); |
cmo_double* new_cmo_double(double d); |
| cmo_distributed_polynomial* new_cmo_distributed_polynomial(); |
cmo_distributed_polynomial* new_cmo_distributed_polynomial(); |
| Line 261 void dump_ox_data(ox_data* m); |
|
| Line 280 void dump_ox_data(ox_data* m); |
|
| |
|
| void print_cmo(cmo* c); |
void print_cmo(cmo* c); |
| void resize_mpz(mpz_ptr mpz, int size); |
void resize_mpz(mpz_ptr mpz, int size); |
| |
|
| |
int cmo_to_int(cmo *n); |
| |
|
| typedef cmo *(*hook_t)(OXFILE *, cmo *); |
typedef cmo *(*hook_t)(OXFILE *, cmo *); |
| |
|