CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

Views: 418346
1
/****************************************************************************
2
**
3
*A setup.h ANUPQ source Eamonn O'Brien
4
**
5
*Y Copyright 1995-2001, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany
6
*Y Copyright 1995-2001, School of Mathematical Sciences, ANU, Australia
7
**
8
*/
9
10
/* in general pointers have the following format:
11
if non-negative then they have that value; otherwise -pointer
12
points to the base address of an exponent-generator string;
13
these strings are made up of a header block consisting of a
14
pointer and length followed by exponent-generator pair(s)
15
stored in array y in the following format
16
17
pointer length exp-gen exp-gen exp-gen ...
18
19
By default, the program has the following limits:
20
the maximum no of pc generators is 2^16 - 1 = 65535;
21
the maximum no of defining generators is 2^9 - 1 = 511;
22
the maximum class is 2^6 - 1 = 63;
23
the maximum exponent is 2^15 - 1;
24
25
The program can be compiled in two modes; in fixed mode
26
the above limits are enforced; in runtime mode, these are
27
also the default; however, the limit on the number of defining
28
generators and the class can be altered by the user via
29
on-line options "-d" and "-c"; if such selections are made,
30
the maximum number of pc generators is consequently altered;
31
a user must decide the limit on *each* of the number of
32
defining generators and the class;
33
34
The default limits are set in the header files:
35
storage_fixed.h (for the fixed version)
36
runtime.h (for the runtime version).
37
38
If you wish to compile the runtime mode version, then set
39
the RUN_TIME compiler flag in the Makefile.
40
41
for i positive --
42
y[pcp->dgen + i] is a pointer for defining generator i
43
y[pcp->dgen + i] = j (positive) if defining generator i is not redundant
44
and is assigned generator number j in pcp;
45
y[pcp->dgen + i] = 0 if defining generator i is currently trivial;
46
y[pcp->dgen + i] = -ptr if defining generator i is redundant
47
where ptr is the base address for its value relative to y[0];
48
49
for i negative --
50
y[pcp->dgen + i] is a pointer for inverse of defining generator i;
51
y[pcp->dgen + i] = 1 if inverse of defining generator i not needed;
52
y[pcp->dgen + i] = 0 if inverse is needed and is currently trivial;
53
y[pcp->dgen + i] = -ptr if inverse of defining generator is needed
54
where ptr is the base address for its value relative to y[0];
55
56
y[pcp->dgen + pcp->ndgen + i] contains the maximum number of
57
occurrences of defining generator i in the structure of a
58
pcp-generator or 0;
59
60
y[pcp->relp + 2 * i - 1] is a pointer to lhs of defining relation i;
61
y[pcp->relp + 2 * i] is a pointer to rhs of defining relation i;
62
y[pcp->relp + 2 * i(-1)] = 0 if this side of relation is trivial,
63
else y[pcp->relp + 2 * i(-1)] = ptr where ptr is the base address
64
of this side of relation;
65
66
a base address, ba say, of a value of a redundant defining
67
generator, inverse of a defining generator, side of a defining
68
relation, power or commutator table entry is such that
69
y[ba] is the start of a header block of length 2;
70
y[ba] contains a pointer, ptr say, which is the y-index of the
71
cell referring to this value (that is, y[ptr] = -ba);
72
y[ba + 1] contains the length of the following string
73
(the string starting in y[ba + 2] and ending in y[ba + 1 + y[ba + 1]);
74
75
when a string is no longer needed, y[ba] is set to 0 and y[ptr] is
76
changed to point to its new value; when only 1 word is to be taken
77
off of a string there is not a sufficient gap left to form a new
78
2 word header block and this is overcome by forming a 1 word header
79
block containing the value -1 (this is only needed for subroutine
80
compact);
81
82
allocation of storage in the array y is made in both directions;
83
84
the following data is stored at the front of y
85
1) y[pcp->clend + i] i = 0 .. MAXCLASS
86
2) y[pcp->dgen + i] i = -pcp->ndgen .. pcp->ndgen .. 2 * pcp->ndgen
87
3) y[pcp->relp + i] i = 1 .. 2 * pcp->ndrel
88
4) the group defining relations (with only a 1 word header block
89
containing the total length of the following exponent and side
90
of a group defining relation);
91
5) garbage collectable space (y[pcp->gspace] to y[pcp->lused])
92
after initialisation the data 1) to 4) is stable in size;
93
the garbage collectable space comprises strings of data with
94
each string preceded by a header block; temporary storage is
95
available in y[pcp->lused + 1] to y[pcp->subgrp] to do collections,
96
assemble strings, etc;
97
98
the following data is stored at the back of y
99
1) subgroup information (y[pcp->subgrp + i])
100
2) word information (y[pcp->words + i])
101
3) structure information (y[structure + i])
102
4) pointers to powers (y[pcp->ppower + i])
103
5) pointers to pointers to commutators (y[pcp->ppcomm + i])
104
6) pointers to commutators; to find the value of the commutator
105
(b,a) say one looks up y[y[pcp->ppcomm + b] + a];
106
107
the storage allocated for the data (3) to (6) changes at the
108
beginning of each class (in subroutine setup), destroying the
109
data (1) and (2);
110
111
most storage allocation is checked via calls to is_space_exhausted */
112
113