| 6852 | |
| 6853 | |
| 6854 | Code GenerateProgram (int deriv, bool simd) const override |
| 6855 | { |
| 6856 | Code code; |
| 6857 | code.is_simd = simd; |
| 6858 | code.deriv = deriv; |
| 6859 | |
| 6860 | string res_type = cf->IsComplex() ? "Complex" : "double"; |
| 6861 | if(simd) res_type = "SIMD<" + res_type + ">"; |
| 6862 | if(deriv==1) res_type = "AutoDiff<1," + res_type + ">"; |
| 6863 | if(deriv==2) res_type = "AutoDiffDiff<1," + res_type + ">"; |
| 6864 | code.res_type = res_type; |
| 6865 | |
| 6866 | for (auto i : Range(steps)) |
| 6867 | { |
| 6868 | auto& step = *steps[i]; |
| 6869 | if (!simd && deriv == 0) |
| 6870 | cout << IM(3) << "step " << i << ": " << typeid(step).name() << endl; |
| 6871 | code.body += string("// step ")+ToString(i)+": "+step.GetDescription()+"\n"; |
| 6872 | step.GenerateCode(code, inputs[i],i); |
| 6873 | } |
| 6874 | |
| 6875 | return code; |
| 6876 | } |
| 6877 | |
| 6878 | void RealCompile(int maxderiv, bool wait, bool keep_files) |
| 6879 | { |
no test coverage detected