Changeset ec23b4 in git
- Timestamp:
- Nov 19, 2020, 3:09:39 PM (3 years ago)
- Branches:
- (u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
- Children:
- 779deb22a360a6da7bc13629a032985fd826194e
- Parents:
- 2e7c6b095bd02b92f7355c8c0aa193435fd1af8e
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/iparith.cc
r2e7c6b0 rec23b4 6 6 * ABSTRACT: table driven kernel interface, used by interpreter 7 7 */ 8 //long all_farey=0L;9 //long farey_cnt=0L;8 long all_farey=0L; 9 long farey_cnt=0L; 10 10 11 11 #include "kernel/mod2.h" … … 2119 2119 ideal uu=(ideal)u->Data(); 2120 2120 number vv=(number)v->Data(); 2121 //timespec buf1,buf2;2122 //clock_gettime(CLOCK_THREAD_CPUTIME_ID,&buf1);2121 timespec buf1,buf2; 2122 clock_gettime(CLOCK_THREAD_CPUTIME_ID,&buf1); 2123 2123 res->data=(void*)id_Farey(uu,vv,currRing); 2124 //clock_gettime(CLOCK_THREAD_CPUTIME_ID,&buf2);2125 //const unsigned long SEC = 1000L*1000L*1000L;2126 //all_farey+=((buf2.tv_sec-buf1.tv_sec)*SEC+2127 //buf2.tv_nsec-buf1.tv_nsec);2128 //farey_cnt++;2124 clock_gettime(CLOCK_THREAD_CPUTIME_ID,&buf2); 2125 const unsigned long SEC = 1000L*1000L*1000L; 2126 all_farey+=((buf2.tv_sec-buf1.tv_sec)*SEC+ 2127 buf2.tv_nsec-buf1.tv_nsec); 2128 farey_cnt++; 2129 2129 return FALSE; 2130 2130 } … … 9742 9742 else 9743 9743 { 9744 #if 09744 #if 1 9745 9745 if (rField_is_Q(currRing)) 9746 9746 result=id_ChineseRemainder_0(x,q,rl,currRing); // deletes also x -
kernel/GBEngine/kChinese.cc
r2e7c6b0 rec23b4 99 99 if (n->s==3) 100 100 { 101 ll+=SIZEOF_LONG*2; /* n->s, mpz size */ 101 102 long l=mpz_size1(n->z); 102 103 ll+=l*sizeof(mp_limb_t); … … 104 105 else 105 106 { 106 long l=mpz_size1(n->z); 107 ll+=SIZEOF_LONG*3; /* n->s, mpz size(n->z) mpz size(n->n)*/ 108 size_t l=mpz_size1(n->z); 107 109 ll+=l*sizeof(mp_limb_t); 108 110 l=mpz_size1(n->n); … … 204 206 return NULL; 205 207 } 208 int cpus=(int)(long)feOptValue(FE_OPT_CPUS); 209 if (2*cpus>=cnt) /* at least 2 polys for each process, 210 or switch to seriell version */ 211 return id_ChineseRemainder(xx,q,rl,r); 206 212 ideal result=idInit(cnt,xx[0]->rank); 207 213 result->nrows=rw; // for lifting matrices 208 214 result->ncols=cl; // for lifting matrices 209 int cpus=(int)(long)feOptValue(FE_OPT_CPUS);210 215 int parent_pid=getpid(); 211 216 using namespace vspace; … … 293 298 printf("send len: %d\n",(int)(s-buf)); 294 299 long *d=(long*)buf; 295 for(int i=0;i<=ll/ 8;i++) printf("%ld ",d[i]);300 for(int i=0;i<=ll/SIZEOF_LONG;i++) printf("%ld ",d[i]); 296 301 printf("\n"); 297 302 n=NULL; … … 301 306 p_Write(n,currRing); 302 307 PrintLn(); 303 } 308 omFree(buf); 309 }
Note: See TracChangeset
for help on using the changeset viewer.