| 6789 | |
| 6790 | |
| 6791 | void DoArchive(Archive& ar) override |
| 6792 | { |
| 6793 | CoefficientFunction::DoArchive(ar); |
| 6794 | ar.Shallow(cf); |
| 6795 | if(ar.Input()) |
| 6796 | { |
| 6797 | cf -> TraverseTree |
| 6798 | ([&] (CoefficientFunction & stepcf) |
| 6799 | { |
| 6800 | if (!steps.Contains(&stepcf)) |
| 6801 | { |
| 6802 | steps.Append (&stepcf); |
| 6803 | // timers.Append (new Timer(string("CompiledCF")+typeid(stepcf).name())); |
| 6804 | dim.Append (stepcf.Dimension()); |
| 6805 | is_complex.Append (stepcf.IsComplex()); |
| 6806 | } |
| 6807 | }); |
| 6808 | totdim = 0; |
| 6809 | for (int d : dim) totdim += d; |
| 6810 | inputs = DynamicTable<int> (steps.Size()); |
| 6811 | max_inputsize = 0; |
| 6812 | |
| 6813 | cf -> TraverseTree |
| 6814 | ([&] (CoefficientFunction & stepcf) |
| 6815 | { |
| 6816 | int mypos = steps.Pos (&stepcf); |
| 6817 | if (!inputs[mypos].Size()) |
| 6818 | { |
| 6819 | Array<shared_ptr<CoefficientFunction>> in = stepcf.InputCoefficientFunctions(); |
| 6820 | max_inputsize = max2(in.Size(), max_inputsize); |
| 6821 | for (auto incf : in) |
| 6822 | inputs.Add (mypos, steps.Pos(incf.get())); |
| 6823 | } |
| 6824 | }); |
| 6825 | } |
| 6826 | } |
| 6827 | |
| 6828 | |
| 6829 | virtual shared_ptr<CoefficientFunction> |
nothing calls this directly
no test coverage detected