[BACK]Return to up_lm.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2018 / engine

Diff for /OpenXM_contrib2/asir2018/engine/up_lm.c between version 1.2 and 1.3

version 1.2, 2018/09/28 08:20:28 version 1.3, 2019/03/03 05:21:17
Line 45 
Line 45 
  * 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/asir2018/engine/up_lm.c,v 1.1 2018/09/19 05:45:07 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2018/engine/up_lm.c,v 1.2 2018/09/28 08:20:28 noro Exp $
 */  */
 #include "ca.h"  #include "ca.h"
 #include <math.h>  #include <math.h>
Line 58  extern int current_ff;
Line 58  extern int current_ff;
 void fft_mulup_lm(UP n1,UP n2,UP *nr)  void fft_mulup_lm(UP n1,UP n2,UP *nr)
 {  {
   ModNum *f1,*f2,*w,*fr;    ModNum *f1,*f2,*w,*fr;
   ModNum *frarray[1024];    ModNum *frarray[NPrimes];
   int modarray[1024];    int modarray[NPrimes];
   int frarray_index = 0;    int frarray_index = 0;
   Z m,m1,m2,lm_mod;    Z m,m1,m2,lm_mod;
   int d1,d2,dmin,i,mod,root,d,cond,bound;    int d1,d2,dmin,i,mod,root,d,cond,bound;
Line 105  void fft_mulup_lm(UP n1,UP n2,UP *nr)
Line 105  void fft_mulup_lm(UP n1,UP n2,UP *nr)
 void fft_squareup_lm(UP n1,UP *nr)  void fft_squareup_lm(UP n1,UP *nr)
 {  {
   ModNum *f1,*w,*fr;    ModNum *f1,*w,*fr;
   ModNum *frarray[1024];    ModNum *frarray[NPrimes];
   int modarray[1024];    int modarray[NPrimes];
   int frarray_index = 0;    int frarray_index = 0;
   Z m,m1,m2,lm_mod;    Z m,m1,m2,lm_mod;
   int d1,dmin,i,mod,root,d,cond,bound;    int d1,dmin,i,mod,root,d,cond,bound;
Line 150  void fft_squareup_lm(UP n1,UP *nr)
Line 150  void fft_squareup_lm(UP n1,UP *nr)
 void trunc_fft_mulup_lm(UP n1,UP n2,int dbd,UP *nr)  void trunc_fft_mulup_lm(UP n1,UP n2,int dbd,UP *nr)
 {  {
   ModNum *f1,*f2,*fr,*w;    ModNum *f1,*f2,*fr,*w;
   ModNum *frarray[1024];    ModNum *frarray[NPrimes];
   int modarray[1024];    int modarray[NPrimes];
   int frarray_index = 0;    int frarray_index = 0;
   Z m,m1,m2,lm_mod;    Z m,m1,m2,lm_mod;
   int d1,d2,dmin,i,mod,root,d,cond,bound;    int d1,d2,dmin,i,mod,root,d,cond,bound;
Line 205  void crup_lm(ModNum **f,int d,int *mod,int index,Z m,Z
Line 205  void crup_lm(ModNum **f,int d,int *mod,int index,Z m,Z
   for ( i = 0; i <= d; i++ ) {    for ( i = 0; i <= d; i++ ) {
     remz((Z)w->c[i],lm_mod,&t); w->c[i] = (Num)t;      remz((Z)w->c[i],lm_mod,&t); w->c[i] = (Num)t;
   }    }
   for ( i = d; (i >= 0) && (w->c[i] != 0); i-- );    for ( i = d; (i >= 0) && (w->c[i] == 0); i-- );
   if ( i < 0 ) *r = 0;    if ( i < 0 ) *r = 0;
   else {    else {
     w->d = i;      w->d = i;
Line 275  void save_up(UP obj,char *name)
Line 275  void save_up(UP obj,char *name)
 void hybrid_powermodup(UP f,UP *xp)  void hybrid_powermodup(UP f,UP *xp)
 {  {
   Z n;    Z n;
   UP x,y,t,invf,s;    UP x,y,t,invf,s,s1;
   int k;    int k;
   LM lm;    LM lm;
   

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>