source: git/polys/monomials/polys-impl.h @ ec96d7

spielwiese
Last change on this file since ec96d7 was ec96d7, checked in by Hans Schoenemann <hannes@…>, 14 years ago
monomials.h defines poly
  • Property mode set to 100644
File size: 1.7 KB
Line 
1#ifndef POLYS_IMPL_H
2#define POLYS_IMPL_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/* $Id$ */
7
8/***************************************************************
9 *
10 * File:       polys-impl.h
11 * Purpose:    low-level and macro definition of polys
12 *
13 * If you touch anything here, you better know what you are doing.
14 * What is here should not be used directly from other routines -- the
15 * encapsulations in polys.h should be used, instead.
16 *
17 ***************************************************************/
18#include <omalloc.h>
19#include <coeffs.h>
20
21#define POLYSIZE (sizeof(poly) + sizeof(number))
22#define POLYSIZEW (POLYSIZE / sizeof(long))
23#if SIZEOF_LONG == 8
24#define POLY_NEGWEIGHT_OFFSET (((long)0x80000000) << 32)
25#else
26#define POLY_NEGWEIGHT_OFFSET ((long)0x80000000)
27#endif
28
29
30/***************************************************************
31 *
32 * Macros for low-level allocation
33 *
34 ***************************************************************/
35#ifdef PDEBUG
36#define p_AllocBin(p, bin, r)                   \
37do                                              \
38{                                               \
39  omTypeAllocBin(poly, p, bin);                 \
40  p_SetRingOfLm(p, r);                        \
41}                                               \
42while (0)
43#define p_FreeBinAddr(p, r) p_LmFree(p, r)
44#else
45#define p_AllocBin(p, bin, r)   omTypeAllocBin(poly, p, bin)
46#define p_FreeBinAddr(p, r)     omFreeBinAddr(p)
47#endif
48
49/***************************************************************
50 *
51 * Misc macros
52 *
53 ***************************************************************/
54#define rRing_has_Comp(r)   (r->pCompIndex >= 0)
55
56#endif // POLYS_IMPL_H
Note: See TracBrowser for help on using the repository browser.