197{
198 int cnt=0;
int rw=0;
int cl=0;
199
200 for(
int j=rl-1;
j>=0;
j--)
201 {
204 if (xx[
j]->
nrows >rw) rw=xx[
j]->nrows;
206 }
208 {
209 WerrorS(
"format mismatch in CRT");
211 }
213 if ((cpus==1) || (2*cpus>=cnt))
214
219 int parent_pid=getpid();
221 vmem_init();
222
224 for(
int i=cnt-1;
i>=0;
i--)
225 {
227 }
228 for(
int i=cpus;
i>=0;
i--)
229 {
230 queue->enqueue(-1);
231 }
232
234 for (
int i=0;
i<cpus;
i++)
235 {
237 if (pid==0) break;
238 }
239 if (parent_pid!=getpid())
240 {
241 number *
x=(number *)
omAlloc(rl*
sizeof(number));
242 poly *
p=(poly *)
omAlloc(rl*
sizeof(poly));
247 {
248 int ind=queue->dequeue();
249 if (ind== -1)
250 {
251 exit(0);
252 }
253
254 for(
int j=rl-1;
j>=0;
j--)
255 {
258 else
260 }
263
265 char *
s=(
char*)msg->str();
267 rqueue->enqueue(msg);
269 }
270 }
271 else
272 {
275 while(cnt>0)
276 {
277 msg=rqueue->dequeue();
278 char *
s=(
char*)msg->str();
279 int ind;
282
285 cnt--;
286 }
287
290 vmem_deinit();
291 }
293}
const CanonicalForm int s
void WerrorS(const char *s)
static void * feOptValue(feOptIndex opt)
static char * get_poly(char *s, int &ind, poly *p, const ring r)
static long size_poly(poly p, const ring r)
static char * send_poly(char *s, int ind, poly p, const ring r)
poly p_ChineseRemainder(poly *xx, mpz_ptr *x, mpz_ptr *q, int rl, mpz_ptr *C, const ring R)
ideal idInit(int idsize, int rank)
initialise an ideal / module
ideal id_ChineseRemainder(ideal *xx, number *q, int rl, const ring r)