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

◆ memUsage()

void ResPolyRing::memUsage ( const ResPolynomial & f,
long & nterms,
long & bytes_used,
long & bytes_alloc ) const

Definition at line 11 of file res-poly-ring.cpp.

15{
16 long sz = 0;
17 // sz = f.len * sizeof(FieldElement); // TODO MES: what to add here?
18 sz += f.monoms.size() * sizeof(res_monomial_word);
19 nterms += f.len;
20 bytes_used += sz;
21 bytes_alloc += sz;
22}
std::vector< res_monomial_word > monoms
myword res_monomial_word

References ResPolynomial::len, and ResPolynomial::monoms.

Referenced by SchreyerFrame::showMemoryUsage().