diff options
Diffstat (limited to 'Build/source/utils/asymptote/runarray.cc')
-rw-r--r-- | Build/source/utils/asymptote/runarray.cc | 69 |
1 files changed, 34 insertions, 35 deletions
diff --git a/Build/source/utils/asymptote/runarray.cc b/Build/source/utils/asymptote/runarray.cc index eaf9b41513b..66ff7469db2 100644 --- a/Build/source/utils/asymptote/runarray.cc +++ b/Build/source/utils/asymptote/runarray.cc @@ -1262,8 +1262,8 @@ void array3Transpose(stack *Stack) } } - delete [] i; - delete [] size; + delete[] i; + delete[] size; {Stack->push<array*>(c); return;} } @@ -1345,7 +1345,7 @@ void gen_runarray47(stack *Stack) copyArray2C(A,a,true,0,NoGC); inverse(A,n); a=copyCArray2(n,n,A); - delete A; + delete[] A; {Stack->push<realarray2*>(a); return;} } @@ -1942,8 +1942,8 @@ void gen_runarray64(stack *Stack) Int sign=vm::pop<Int>(Stack,1); pairarray * a=vm::pop<pairarray *>(Stack); #line 1613 "runarray.in" - unsigned n=(unsigned) checkArray(a); #ifdef HAVE_LIBFFTW3 + unsigned n=(unsigned) checkArray(a); array *c=new array(n); if(n) { Complex *f=fftwpp::ComplexAlign(n); @@ -1962,7 +1962,6 @@ void gen_runarray64(stack *Stack) fftwpp::deleteAlign(f); } #else - unused(&n); unused(&sign); array *c=new array(0); error("Please install fftw3, run ./configure, and recompile"); @@ -1970,12 +1969,12 @@ void gen_runarray64(stack *Stack) {Stack->push<pairarray*>(c); return;} } -#line 1642 "runarray.in" +#line 1641 "runarray.in" // Intarray2* triangulate(pairarray *z); void gen_runarray65(stack *Stack) { pairarray * z=vm::pop<pairarray *>(Stack); -#line 1643 "runarray.in" +#line 1642 "runarray.in" size_t nv=checkArray(z); // Call robust version of Gilles Dumoulin's port of Paul Bourke's // triangulation code. @@ -2009,12 +2008,12 @@ void gen_runarray65(stack *Stack) {Stack->push<Intarray2*>(t); return;} } -#line 1677 "runarray.in" +#line 1676 "runarray.in" // real norm(realarray *a); void gen_runarray66(stack *Stack) { realarray * a=vm::pop<realarray *>(Stack); -#line 1678 "runarray.in" +#line 1677 "runarray.in" size_t n=checkArray(a); real M=0.0; for(size_t i=0; i < n; ++i) { @@ -2024,12 +2023,12 @@ void gen_runarray66(stack *Stack) {Stack->push<real>(M); return;} } -#line 1688 "runarray.in" +#line 1687 "runarray.in" // real norm(realarray2 *a); void gen_runarray67(stack *Stack) { realarray2 * a=vm::pop<realarray2 *>(Stack); -#line 1689 "runarray.in" +#line 1688 "runarray.in" size_t n=checkArray(a); real M=0.0; for(size_t i=0; i < n; ++i) { @@ -2043,12 +2042,12 @@ void gen_runarray67(stack *Stack) {Stack->push<real>(M); return;} } -#line 1703 "runarray.in" +#line 1702 "runarray.in" // real norm(triplearray2 *a); void gen_runarray68(stack *Stack) { triplearray2 * a=vm::pop<triplearray2 *>(Stack); -#line 1704 "runarray.in" +#line 1703 "runarray.in" size_t n=checkArray(a); real M=0.0; for(size_t i=0; i < n; ++i) { @@ -2062,12 +2061,12 @@ void gen_runarray68(stack *Stack) {Stack->push<real>(sqrt(M)); return;} } -#line 1718 "runarray.in" +#line 1717 "runarray.in" // real change2(triplearray2 *a); void gen_runarray69(stack *Stack) { triplearray2 * a=vm::pop<triplearray2 *>(Stack); -#line 1719 "runarray.in" +#line 1718 "runarray.in" size_t n=checkArray(a); if(n == 0) {Stack->push<real>(0.0); return;} @@ -2088,13 +2087,13 @@ void gen_runarray69(stack *Stack) {Stack->push<real>(M); return;} } -#line 1740 "runarray.in" +#line 1739 "runarray.in" // triple minbezier(triplearray2 *P, triple b); void gen_runarray70(stack *Stack) { triple b=vm::pop<triple>(Stack); triplearray2 * P=vm::pop<triplearray2 *>(Stack); -#line 1741 "runarray.in" +#line 1740 "runarray.in" real *A=copyTripleArray2Components(P,true,4); b=triple(bound(A,::min,b.getx(),sqrtFuzz*norm(A,16)), bound(A+16,::min,b.gety(),sqrtFuzz*norm(A+16,16)), @@ -2103,13 +2102,13 @@ void gen_runarray70(stack *Stack) {Stack->push<triple>(b); return;} } -#line 1750 "runarray.in" +#line 1749 "runarray.in" // triple maxbezier(triplearray2 *P, triple b); void gen_runarray71(stack *Stack) { triple b=vm::pop<triple>(Stack); triplearray2 * P=vm::pop<triplearray2 *>(Stack); -#line 1751 "runarray.in" +#line 1750 "runarray.in" real *A=copyTripleArray2Components(P,true,4); b=triple(bound(A,::max,b.getx(),sqrtFuzz*norm(A,16)), bound(A+16,::max,b.gety(),sqrtFuzz*norm(A+16,16)), @@ -2118,13 +2117,13 @@ void gen_runarray71(stack *Stack) {Stack->push<triple>(b); return;} } -#line 1760 "runarray.in" +#line 1759 "runarray.in" // pair minratio(triplearray2 *P, pair b); void gen_runarray72(stack *Stack) { pair b=vm::pop<pair>(Stack); triplearray2 * P=vm::pop<triplearray2 *>(Stack); -#line 1761 "runarray.in" +#line 1760 "runarray.in" triple *A; copyArray2C(A,P,true,4); real fuzz=sqrtFuzz*norm(A,16); @@ -2134,13 +2133,13 @@ void gen_runarray72(stack *Stack) {Stack->push<pair>(b); return;} } -#line 1771 "runarray.in" +#line 1770 "runarray.in" // pair maxratio(triplearray2 *P, pair b); void gen_runarray73(stack *Stack) { pair b=vm::pop<pair>(Stack); triplearray2 * P=vm::pop<triplearray2 *>(Stack); -#line 1772 "runarray.in" +#line 1771 "runarray.in" triple *A; copyArray2C(A,P,true,4); real fuzz=sqrtFuzz*norm(A,16); @@ -2150,11 +2149,11 @@ void gen_runarray73(stack *Stack) {Stack->push<pair>(b); return;} } -#line 1782 "runarray.in" +#line 1781 "runarray.in" // realarray* _projection(); void gen_runarray74(stack *Stack) { -#line 1783 "runarray.in" +#line 1782 "runarray.in" #ifdef HAVE_GL array *a=new array(14); gl::projection P=gl::camera(); @@ -2321,25 +2320,25 @@ void gen_runarray_venv(venv &ve) addFunc(ve, run::gen_runarray63, primReal(), SYM(simpson), formal(realRealFunction(), SYM(f), false, false), formal(primReal(), SYM(a), false, false), formal(primReal(), SYM(b), false, false), formal(primReal(), SYM(acc), true, false), formal(primReal(), SYM(dxmax), true, false)); #line 1611 "runarray.in" addFunc(ve, run::gen_runarray64, pairArray(), SYM(fft), formal(pairArray(), SYM(a), false, false), formal(primInt(), SYM(sign), true, false)); -#line 1642 "runarray.in" +#line 1641 "runarray.in" addFunc(ve, run::gen_runarray65, IntArray2(), SYM(triangulate), formal(pairArray(), SYM(z), false, false)); -#line 1677 "runarray.in" +#line 1676 "runarray.in" addFunc(ve, run::gen_runarray66, primReal(), SYM(norm), formal(realArray(), SYM(a), false, false)); -#line 1688 "runarray.in" +#line 1687 "runarray.in" addFunc(ve, run::gen_runarray67, primReal(), SYM(norm), formal(realArray2(), SYM(a), false, false)); -#line 1703 "runarray.in" +#line 1702 "runarray.in" addFunc(ve, run::gen_runarray68, primReal(), SYM(norm), formal(tripleArray2(), SYM(a), false, false)); -#line 1718 "runarray.in" +#line 1717 "runarray.in" addFunc(ve, run::gen_runarray69, primReal(), SYM(change2), formal(tripleArray2(), SYM(a), false, false)); -#line 1740 "runarray.in" +#line 1739 "runarray.in" addFunc(ve, run::gen_runarray70, primTriple(), SYM(minbezier), formal(tripleArray2(), SYM(p), false, false), formal(primTriple(), SYM(b), false, false)); -#line 1750 "runarray.in" +#line 1749 "runarray.in" addFunc(ve, run::gen_runarray71, primTriple(), SYM(maxbezier), formal(tripleArray2(), SYM(p), false, false), formal(primTriple(), SYM(b), false, false)); -#line 1760 "runarray.in" +#line 1759 "runarray.in" addFunc(ve, run::gen_runarray72, primPair(), SYM(minratio), formal(tripleArray2(), SYM(p), false, false), formal(primPair(), SYM(b), false, false)); -#line 1771 "runarray.in" +#line 1770 "runarray.in" addFunc(ve, run::gen_runarray73, primPair(), SYM(maxratio), formal(tripleArray2(), SYM(p), false, false), formal(primPair(), SYM(b), false, false)); -#line 1782 "runarray.in" +#line 1781 "runarray.in" addFunc(ve, run::gen_runarray74, realArray(), SYM(_projection)); } |