#include "misc/auxiliary.h"
#include "misc/intvec.h"
#include "misc/options.h"
#include "polys/monomials/p_polys.h"
#include "polys/matpol.h"
#include "polys/simpleideals.h"
#include "coeffs/longrat.h"
#include "Singular/feOpt.h"
#include "kernel/polys.h"
#include "kernel/mod2.h"
#include "kernel/oswrapper/vspace.h"
#include "kernel/ideals.h"
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
Go to the source code of this file.
|
number | nlRInit (long i) |
|
static char * | send_number (char *s, number n) |
|
static char * | get_number (char *s, number *n) |
|
static long | size_number (number n) |
|
static char * | send_mon (char *s, poly m, const ring r) |
|
static char * | get_mon (char *s, poly *m, const ring r) |
|
static long | size_mon (poly m, const ring r) |
|
static char * | send_poly (char *s, int ind, poly p, const ring r) |
|
static char * | get_poly (char *s, int &ind, poly *p, const ring r) |
|
static long | size_poly (poly p, const ring r) |
|
ideal | id_ChineseRemainder_0 (ideal *xx, number *q, int rl, const ring r) |
|
ideal | id_Farey_0 (ideal x, number N, const ring r) |
|
◆ mpz_isNeg
◆ get_mon()
Definition at line 131 of file kChinese.cc.
132{
135 memcpy((*m)->exp,
s,r->ExpL_Size*
sizeof(
long));
136 s+=r->ExpL_Size*
sizeof(
long);
138}
const CanonicalForm int s
static char * get_number(char *s, number *n)
static poly p_Init(const ring r, omBin bin)
◆ get_number()
Definition at line 56 of file kChinese.cc.
57{
58
59
60
61
62
65 if (((*d)&1)==1)
66 {
68 }
69 else
70 {
73 if (neg) *d-=8;
74 (*n)->s=(*d)/2;
80 if (neg)
mpz_neg((*n)->z,(*n)->z);
82 if ((*n)->s!=3)
83 {
90 }
91 }
93}
◆ get_poly()
Definition at line 166 of file kChinese.cc.
167{
174 for(
long i=0;
i<
l;
i++)
175 {
180 }
183}
static char * get_mon(char *s, poly *m, const ring r)
static poly pReverse(poly p)
◆ id_ChineseRemainder_0()
Definition at line 196 of file kChinese.cc.
197{
198 int cnt=0;
int rw=0;
int cl=0;
199
200 for(
int j=
rl-1;
j>=0;
j--)
201 {
206 }
208 {
209 WerrorS(
"format mismatch in CRT");
211 }
215
217
224 vmem_init();
225
227 for(
int i=cnt-1;
i>=0;
i--)
228 {
230 }
232 {
233 queue->enqueue(-1);
234 }
235
238 {
240 if (pid==0) break;
241 }
243 {
250 {
251 int ind=queue->dequeue();
253 {
255 }
256
257 for(
int j=
rl-1;
j>=0;
j--)
258 {
261 else
263 }
266
268 char *
s=(
char*)
msg->str();
272 }
273 }
274 else
275 {
278 while(cnt>0)
279 {
281 char *
s=(
char*)
msg->str();
285
288 cnt--;
289 }
290
291 queue.free();
293 vmem_deinit();
294 }
296}
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)
static const int MAX_PROCESS
ideal idInit(int idsize, int rank)
initialise an ideal / module
ideal id_ChineseRemainder(ideal *xx, number *q, int rl, const ring r)
◆ id_Farey_0()
Definition at line 298 of file kChinese.cc.
299{
304
306
311
314 vmem_init();
315
317 for(
int i=cnt-1;
i>=0;
i--)
318 {
320 }
322 {
323 queue->enqueue(-1);
324 }
325
328 {
330 if (pid==0) break;
331 }
333 {
335 {
336 int ind=queue->dequeue();
338 {
340 }
341
345 char *
s=(
char*)
msg->str();
349 }
350 }
351 else
352 {
355 while(cnt>0)
356 {
358 char *
s=(
char*)
msg->str();
362
365 cnt--;
366 }
367
369
370 queue.free();
372 vmem_deinit();
373 }
375}
const CanonicalForm CFMap CFMap & N
ideal id_Farey(ideal x, number N, const ring r)
poly p_Farey(poly p, number N, const ring r)
◆ nlRInit()
Definition at line 2532 of file longrat.cc.
2533{
2535#if defined(LDEBUG)
2536 z->debug=123456;
2537#endif
2539 z->s = 3;
2540 return z;
2541}
◆ send_mon()
Definition at line 122 of file kChinese.cc.
123{
124
126 memcpy(
s,
m->exp,r->ExpL_Size*
sizeof(
long));
127 s+=r->ExpL_Size*
sizeof(
long);
129}
static char * send_number(char *s, number n)
◆ send_number()
Definition at line 25 of file kChinese.cc.
26{
29 {
32 }
33 else
34 {
35 *d=n->s*2;
44 if (n->s!=3)
45 {
51 }
52 }
54}
◆ send_poly()
Definition at line 147 of file kChinese.cc.
148{
149
150
159 {
162 }
164}
static char * send_mon(char *s, poly m, const ring r)
static int pLength(poly a)
◆ size_mon()
Definition at line 140 of file kChinese.cc.
141{
143 ll+=r->ExpL_Size*
sizeof(
long);
145}
static long size_number(number n)
◆ size_number()
Definition at line 95 of file kChinese.cc.
96{
99 {
101 }
102 else
103 {
104 if (n->s==3)
105 {
109 }
110 else
111 {
117 }
118 }
120}
◆ size_poly()
Definition at line 185 of file kChinese.cc.
186{
189 {
192 }
194}
static long size_mon(poly m, const ring r)