version 1.24, 2006/02/08 02:11:19 |
version 1.30, 2013/06/13 18:40:31 |
|
|
* 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/engine/init.c,v 1.23 2005/07/03 10:19:22 ohara Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/engine/init.c,v 1.29 2012/12/17 07:20:44 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
|
#include "parse.h" |
#include "version.h" |
#include "version.h" |
#include "prime.h" |
#include "prime.h" |
|
|
|
|
int current_mod = 0; |
int current_mod = 0; |
int StrassenSize = 0; |
int StrassenSize = 0; |
int outputstyle = 0; |
int outputstyle = 0; |
|
int Itvplot = 33; |
|
|
static int *lprime; |
static int *lprime; |
static int lprime_size; |
static int lprime_size; |
Line 189 void nglob_init() { |
|
Line 191 void nglob_init() { |
|
init_lprime(); |
init_lprime(); |
} |
} |
|
|
extern double gctime; |
extern double GC_get_gctime(); |
double suspend_start; |
double suspend_start; |
double suspended_time=0; |
double suspended_time=0; |
|
|
void get_eg(struct oEGT *p) |
void get_eg(struct oEGT *p) |
{ |
{ |
|
double gctime = GC_get_gctime(); |
p->exectime = get_clock() - gctime - suspended_time; p->gctime = gctime; |
p->exectime = get_clock() - gctime - suspended_time; p->gctime = gctime; |
} |
} |
|
|
Line 263 char *get_asir_distribution() { |
|
Line 266 char *get_asir_distribution() { |
|
void create_error(ERR *err,unsigned int serial,char *msg,LIST trace) |
void create_error(ERR *err,unsigned int serial,char *msg,LIST trace) |
{ |
{ |
int len; |
int len; |
USINT ui; |
USINT ui,notsupp; |
NODE n,n1; |
NODE n,n1; |
LIST list; |
LIST list; |
char *msg1; |
char *msg1; |
STRING errmsg; |
STRING errmsg; |
|
|
MKUSINT(ui,serial); |
MKUSINT(ui,serial); |
|
MKUSINT(notsupp,-1); |
len = strlen(msg); |
len = strlen(msg); |
msg1 = (char *)MALLOC(len+1); |
msg1 = (char *)MALLOC(len+1); |
strcpy(msg1,msg); |
strcpy(msg1,msg); |
MKSTR(errmsg,msg1); |
MKSTR(errmsg,msg1); |
n = mknode(3,ui,errmsg,trace); MKLIST(list,n); |
if ( !trace ) |
|
MKLIST(trace,0); |
|
n = mknode(4,ui,notsupp,errmsg,trace); MKLIST(list,n); |
MKERR(*err,list); |
MKERR(*err,list); |
} |
} |
|
|
Line 283 void init_lprime() |
|
Line 289 void init_lprime() |
|
int s,i; |
int s,i; |
|
|
s = sizeof(lprime_init); |
s = sizeof(lprime_init); |
lprime = (int *)GC_malloc_atomic(s); |
lprime = (int *)MALLOC_ATOMIC(s); |
lprime_size = s/sizeof(int); |
lprime_size = s/sizeof(int); |
for ( i = 0; i < lprime_size; i++ ) |
for ( i = 0; i < lprime_size; i++ ) |
lprime[i] = lprime_init[lprime_size-i-1]; |
lprime[i] = lprime_init[lprime_size-i-1]; |