]> www.ginac.de Git - ginac.git/commit
Improve method of setting status_flags::dynallocated.
authorRichard Kreckel <kreckel@ginac.de>
Mon, 30 Nov 2015 22:06:53 +0000 (23:06 +0100)
committerRichard Kreckel <kreckel@ginac.de>
Tue, 1 Dec 2015 22:29:01 +0000 (23:29 +0100)
commit65f2693a0948d1db0bc68d7656c64e1fed91c158
tree94f4c1cf31b8a0791e2baa35b1e85f305f12406e
parent00d612ce3789ba9240ade1b8bf06b26c326bd8f2
Improve method of setting status_flags::dynallocated.

There seems to be no way to obsolete the need to mark an object derived
from basic and handled by ex as being 'on the heap', at least none that
doesn't have significant performance impact. Having said that, this
patch aims at making this process simpler and more intuitive.

Where, before, one would return from a function returning an ex with
        return (new mul(a, b))->setflag(status_flags::dynallocated);
this patch lets us return with
        return dynallocate<mul>(a, b);
which should be much clearer. In any case, it involves less typing.

The two points where the status_flags::dynallocated are set are now
  * the dynallocate<B>(args...) template function and
  * the virtual duplicate() member functions.

This patch rolls out the new functionality throughout the library.
34 files changed:
check/exam_factor.cpp
check/exam_mod_gcd.cpp
ginac/add.cpp
ginac/basic.cpp
ginac/basic.h
ginac/clifford.cpp
ginac/color.cpp
ginac/ex.cpp
ginac/expairseq.cpp
ginac/function.cppy
ginac/idx.cpp
ginac/indexed.cpp
ginac/inifcns.cpp
ginac/inifcns_trans.cpp
ginac/integral.cpp
ginac/matrix.cpp
ginac/mul.cpp
ginac/ncmul.cpp
ginac/normal.cpp
ginac/numeric.cpp
ginac/operators.cpp
ginac/parser/parse_binop_rhs.cpp
ginac/polynomial/collect_vargs.cpp
ginac/polynomial/divide_in_z_p.cpp
ginac/polynomial/euclid_gcd_wrap.h
ginac/power.cpp
ginac/power.h
ginac/pseries.cpp
ginac/registrar.h
ginac/relational.cpp
ginac/symbol.h
ginac/symmetry.cpp
ginac/tensor.cpp
ginac/utils.cpp