My Project
Loading...
Searching...
No Matches
prCopyMacros.h
Go to the documentation of this file.
1#undef PR_DELETE_MONOM
2#if PR_DELETE_SRC > 0
3#define PR_DELETE_MONOM(src, r_src) \
4do \
5{ \
6 PR_NDELETE(&pGetCoeff(src), r_src); \
7 p_LmFree(src, r_src); \
8} \
9while (0)
10#else
11#define PR_DELETE_MONOM(src, r_src) do {} while (0)
12#endif
13
14#undef PR_INIT_EVECTOR_COPY
15#undef PR_CPY_EVECTOR
16#undef PR_ALLOC_MONOM
17#if PR_RING_EQUAL > 0
18#undef PR_NO_SORT
19#define PR_NO_SORT 1
20#define PR_INIT_EVECTOR_COPY(r_src, r_dest) do {} while (0)
21#define PR_CPY_EVECTOR(dest, dest_r, src, src_r) \
22 omMemcpyW(dest->exp, src->exp, dest_r->ExpL_Size)
23#define PR_ALLOC_MONOM(r) p_New(r)
24#undef PR_ALLOC_MONOM
25#define PR_ALLOC_MONOM(r) p_Init(r)
26#else
27#define PR_INIT_EVECTOR_COPY(r_src, r_dest) int _min = si_min(r_dest->N, r_src->N)
28#define PR_CPY_EVECTOR(dest, dest_r, src, src_r) \
29 prCopyEvector(dest, dest_r, src, src_r, _min)
30#define PR_ALLOC_MONOM(r) p_Init(r)
31#endif
32
33#undef PR_NCOPY
34#undef PR_NDELETE
35#undef PR_NUMBER_SIMPLE_NAME
36#if PR_NUMBER_SIMPLE > 0
37#define PR_NCOPY(n, r) n
38#define PR_NDELETE(n, r) do {} while (0)
39#define PR_NUMBER_SIMPLE_NAME NSimple
40#else
41#define PR_NCOPY(n, r) n_Copy(n,r->cf)
42#define PR_NDELETE(n, r) n_Delete(n,r->cf)
43#define PR_NUMBER_SIMPLE_NAME NoNSimple
44#endif
45
46#undef PR_SORT_POLY
47#if PR_NO_SORT > 0
48#define PR_SORT_POLY(p, d_r, s_r) do {} while (0)
49#else
50#define PR_SORT_POLY(p, d_r, s_r) p = p_SortMerge(p, d_r, d_r->OrdSgn == s_r->OrdSgn)
51#endif
52