Macaulay2 Engine
Loading...
Searching...
No Matches

◆ process()

void NCF4::process ( const std::deque< Overlap > & overlapsToProcess)
private

Definition at line 89 of file NCF4.cpp.

90{
91#if 0
92 if (M2_gbTrace >= 2)
93 {
94 buffer o;
95 o << newline << "F4 processing: # overlaps (spairs): " << overlapsToProcess.size() << newline;
96 emit(o.str());
97 }
98#endif
99
100 // build the F4 matrix
101 mtbb::tick_count t0 = mtbb::tick_count::now();
102 // if (mIsParallel)
103 // parallelBuildF4Matrix(overlapsToProcess);
104 // else
105 buildF4Matrix(overlapsToProcess);
106 mtbb::tick_count t1 = mtbb::tick_count::now();
107 if (M2_gbTrace >= 2)
108 std::cout << "Time spent on build step: " << (t1-t0).seconds() << std::endl;
109
110 if (M2_gbTrace >= 2)
111 {
112 std::cout << "NC F4 GB: matrix size: ";
113 displayF4MatrixSize(std::cout);
114 }
115
116 // sort the columns so that the matrix is `upper triangular'
118
119 if (M2_gbTrace >= 100) displayFullF4Matrix(std::cout);
120 else if (M2_gbTrace >= 50) displayF4Matrix(std::cout);
121
122 // reduce the matrix
123 t0 = mtbb::tick_count::now();
124 if (mIsParallel)
126 else
128 t1 = mtbb::tick_count::now();
129 if (M2_gbTrace >= 2)
130 std::cout << "Time spent on reduction step: " << (t1-t0).seconds() << std::endl;
131
132 if (M2_gbTrace >= 100) displayFullF4Matrix(std::cout);
133 else if (M2_gbTrace >= 50) displayF4Matrix(std::cout);
134
135 // convert back to GB elements...
136 PolyList newElems = newGBelements();
137
138 for (auto& f : newElems)
139 {
142 }
143
144 // prepare reduced matrix for use in the next degree
146
147#if 0
148 if (M2_gbTrace >= 2)
149 {
150 buffer o;
151 o << "F4 processing: # GB added: " << newElems.size() << newline;
152 o << "F4 processing: # GB total: " << mGroebner.size() << newline;
153 emit(o.str());
154 }
155#endif
156
157}
gc_vector< Poly * > PolyList
PolyList mGroebner
Definition NCF4.hpp:222
void displayF4Matrix(std::ostream &o) const
Definition NCF4.cpp:1098
void parallelReduceF4Matrix()
Definition NCF4.cpp:961
void addToGroebnerBasis(Poly *toAdd)
Definition NCF4.cpp:193
void reduceF4Matrix()
Definition NCF4.cpp:1039
void updateOverlaps(const Poly *toAdd)
Definition NCF4.cpp:198
void processPreviousF4Matrix()
Definition NCF4.cpp:159
PolyList newGBelements() const
Definition NCF4.cpp:315
bool mIsParallel
Definition NCF4.hpp:253
void displayFullF4Matrix(std::ostream &o) const
Definition NCF4.cpp:1162
void displayF4MatrixSize(std::ostream &o) const
Definition NCF4.cpp:1066
void labelAndSortF4Matrix()
Definition NCF4.cpp:837
void buildF4Matrix(const std::deque< Overlap > &overlapsToProcess)
Definition NCF4.cpp:468
int size()
Definition buffer.hpp:70
char * str()
Definition buffer.hpp:72
char newline[]
Definition m2-types.cpp:49
int M2_gbTrace
Definition m2-types.cpp:52
void emit(const char *s)
Definition text-io.cpp:41
double seconds(DurationType time_diff)
Definition timing.hpp:59

References addToGroebnerBasis(), buildF4Matrix(), displayF4Matrix(), displayF4MatrixSize(), displayFullF4Matrix(), emit(), labelAndSortF4Matrix(), M2_gbTrace, mGroebner, mIsParallel, newGBelements(), newline, parallelReduceF4Matrix(), processPreviousF4Matrix(), reduceF4Matrix(), seconds(), buffer::str(), and updateOverlaps().

Referenced by compute().