[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: Re: [analitza/aucahuasi/analitzajit] analitzajit/examples: Minor improvements.
From: Percy_Camilo_Triveño_Aucahuasi <percy.camilo.ta () gmail ! com>
Date: 2014-08-12 12:13:32
Message-ID: 84C8C84B-5496-48A7-9E95-27969E1C1D5D () gmail ! com
[Download RAW message or body]
On Aug 11, 2014, at 7:27 AM, Aleix Pol <aleixpol@kde.org> wrote:
> On Mon, Aug 11, 2014 at 10:18 AM, Percy Camilo Triveño Aucahuasi \
> <percy.camilo.ta@gmail.com> wrote: Git commit \
> b3d0f624e030e0460edaf48903a0c027ee82aa89 by Percy Camilo Triveño Aucahuasi. \
> Committed on 11/08/2014 at 08:17. Pushed by aucahuasi into branch \
> 'aucahuasi/analitzajit'.
> Minor improvements.
>
> M +5 -4 analitzajit/examples/benchmarking.cpp
>
> http://commits.kde.org/analitza/b3d0f624e030e0460edaf48903a0c027ee82aa89
>
> diff --git a/analitzajit/examples/benchmarking.cpp \
> b/analitzajit/examples/benchmarking.cpp index 926e9ea..2820b21 100644
> --- a/analitzajit/examples/benchmarking.cpp
> +++ b/analitzajit/examples/benchmarking.cpp
> @@ -38,6 +38,7 @@ QDebug operator<<(QDebug dbg, const QVarLengthArray<double> &a)
> return dbg.space();
> }
>
> +using namespace std;
> using namespace Analitza;
>
> const double xmin = -0.24;
> @@ -59,7 +60,7 @@ JITAnalyzer b;
>
> //BEGIN profile 1
>
> -const Expression profile1 = \
> Expression("(x,y)->(x^2+y^2-4)*((x-1)^2+y^2-0.3)*((x+1)^2+y^2-0.3)*(x^2+(y-2)^2-0.4)*(x^2+(y+2)^2-0.4)");
> +const Expression profile1 = \
> Expression("(x,y)->(x^2+y^2-4)*((x-1)^2+y^2-0.3)*((x+1)^2+y^2-0.3)*(x^2+(y-2)^2-0.4)*(x^2+(-y+2)^2-0.4)");
>
> double f_profile1(double x, double y)
> {
> @@ -126,7 +127,7 @@ void eval_profile1()
>
> //BEGIN profile 2
>
> -const Expression profile2 = \
> Expression("(u,v)->vector{(3+1.5*cos(u))*cos(v),(3+1.5*cos(u))*sin(v),1.5*sin(u)}");
> +const Expression profile2 = \
> Expression("(u,v)->vector{(3+1.5*cos(u))*cos(v),(3+1.5*cos(u))*sin(v),abs(1.5*sin(u))}");
>
> QVarLengthArray<double> f_profile2(double u, double v)
> {
> @@ -303,13 +304,13 @@ void benchmarking()
> jiteval_profile1();
> eval_profile1();
>
> - qDebug() << "==== PROFILE 2: VECTOR-VALUED FUNCTION ====";
> + qDebug() << "\n==== PROFILE 2: VECTOR-VALUED FUNCTION ====";
> setupBenchmarking(profile2);
> ceval_profile2();
> jiteval_profile2();
> eval_profile2();
>
> - qDebug() << "==== PROFILE 3: REAL-VALUED FUNCTION WITH PIECEWISE ====";
> + qDebug() << "\n==== PROFILE 3: REAL-VALUED FUNCTION WITH PIECEWISE ====";
> setupBenchmarking(profile3);
> ceval_profile3();
> jiteval_profile3();
>
>
> Try QBENCHMARK(). ;)
>
Cool, I'll port our little benchmarking to use that macro, thanks ;)
> Aleix
[Attachment #3 (unknown)]
<html><head></head><body bgcolor="#FFFFFF"><div><br><br>On Aug 11, 2014, at 7:27 AM, \
Aleix Pol <<a href="mailto:aleixpol@kde.org">aleixpol@kde.org</a>> \
wrote:<br><br></div><div></div><blockquote type="cite"><div><div dir="ltr"><div \
class="gmail_extra"><div class="gmail_quote">On Mon, Aug 11, 2014 at 10:18 AM, Percy \
Camilo Triveño Aucahuasi <span dir="ltr"><<a \
href="mailto:percy.camilo.ta@gmail.com" \
target="_blank">percy.camilo.ta@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Git commit b3d0f624e030e0460edaf48903a0c027ee82aa89 by Percy \
Camilo Triveño Aucahuasi.<br> Committed on 11/08/2014 at 08:17.<br>
Pushed by aucahuasi into branch 'aucahuasi/analitzajit'.<br>
<br>
Minor improvements.<br>
<br>
M +5 -4 analitzajit/examples/benchmarking.cpp<br>
<br>
<a href="http://commits.kde.org/analitza/b3d0f624e030e0460edaf48903a0c027ee82aa89" \
target="_blank">http://commits.kde.org/analitza/b3d0f624e030e0460edaf48903a0c027ee82aa89</a><br>
<br>
diff --git a/analitzajit/examples/benchmarking.cpp \
b/analitzajit/examples/benchmarking.cpp<br> index 926e9ea..2820b21 100644<br>
--- a/analitzajit/examples/benchmarking.cpp<br>
+++ b/analitzajit/examples/benchmarking.cpp<br>
@@ -38,6 +38,7 @@ QDebug operator<<(QDebug dbg, const \
QVarLengthArray<double> &a)<br> return \
dbg.space();<br> }<br>
<br>
+using namespace std;<br>
using namespace Analitza;<br>
<br>
const double xmin = -0.24;<br>
@@ -59,7 +60,7 @@ JITAnalyzer b;<br>
<br>
//BEGIN profile 1<br>
<br>
-const Expression profile1 = \
Expression("(x,y)->(x^2+y^2-4)*((x-1)^2+y^2-0.3)*((x+1)^2+y^2-0.3)*(x^2+(y-2)^2-0.4)*(x^2+(y+2)^2-0.4)");<br>
+const Expression profile1 = \
Expression("(x,y)->(x^2+y^2-4)*((x-1)^2+y^2-0.3)*((x+1)^2+y^2-0.3)*(x^2+(y-2)^2-0.4)*(x^2+(-y+2)^2-0.4)");<br>
<br>
double f_profile1(double x, double y)<br>
{<br>
@@ -126,7 +127,7 @@ void eval_profile1()<br>
<br>
//BEGIN profile 2<br>
<br>
-const Expression profile2 = \
Expression("(u,v)->vector{(3+1.5*cos(u))*cos(v),(3+1.5*cos(u))*sin(v),1.5*sin(u)}");<br>
+const Expression profile2 = \
Expression("(u,v)->vector{(3+1.5*cos(u))*cos(v),(3+1.5*cos(u))*sin(v),abs(1.5*sin(u))}");<br>
<br>
QVarLengthArray<double> f_profile2(double u, double v)<br>
{<br>
@@ -303,13 +304,13 @@ void benchmarking()<br>
jiteval_profile1();<br>
eval_profile1();<br>
<br>
- qDebug() << "==== PROFILE 2: VECTOR-VALUED FUNCTION \
====";<br> + qDebug() << "\n==== PROFILE 2: VECTOR-VALUED \
FUNCTION ====";<br> setupBenchmarking(profile2);<br>
ceval_profile2();<br>
jiteval_profile2();<br>
eval_profile2();<br>
<br>
- qDebug() << "==== PROFILE 3: REAL-VALUED FUNCTION WITH \
PIECEWISE ====";<br> + qDebug() << "\n==== PROFILE 3: \
REAL-VALUED FUNCTION WITH PIECEWISE ====";<br> \
setupBenchmarking(profile3);<br> ceval_profile3();<br>
jiteval_profile3();<br>
<br>
</blockquote></div><br></div><div class="gmail_extra">Try QBENCHMARK(). ;)</div><div \
class="gmail_extra"><br></div></div></div></blockquote><div><br></div><div>Cool, I'll \
port our little benchmarking to use that macro, thanks \
;)</div><div><br></div><br><blockquote type="cite"><div><div dir="ltr"><div \
class="gmail_extra">Aleix</div></div> </div></blockquote></body></html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic