/[escript]/trunk/escript/test/python/TimingTests.py
ViewVC logotype

Diff of /trunk/escript/test/python/TimingTests.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 569 by jgs, Fri Dec 16 01:44:11 2005 UTC revision 570 by jgs, Tue Feb 28 06:51:25 2006 UTC
# Line 18  arglist = [ \ Line 18  arglist = [ \
18  3.0, \  3.0, \
19  [3.0,4.0], \  [3.0,4.0], \
20  [[1.0,2.0],[3.0,4.0]], \  [[1.0,2.0],[3.0,4.0]], \
21  [[[15.0,8.0],[12.0,8.0]],[[-9.0,9.0],[13.0,8.0]]] \  [[[15.0,8.0],[12.0,8.0]],[[-9.0,9.0],[13.0,8.0]]], \
22    [[[[14.0,7.0],[11.0,8.5]],[[-970,9.2],[18.0,8.0]]],[[[-4.4,7.0],[93.0,8.0]],[[-1.0,9.4],[12.0,9.0]]]] \
23  ]  ]
24    
25  testlist = [  testlist = [
26  "_maxval",  "_trace           ",
27  "_minval",  "_maxval          ",
28  "_trace",  "_minval          ",
29  "_sign",  "_wherePositive   ",
30  "_exp",  "_whereNegative   ",
31  "_sqrt",  "_whereNonNegative",
32  "_sin",  "_whereNonPositive",
33  "_cos",  "_whereZero       ",
34  "_tan",  "_whereNonZero    ",
35  "_asin",  "_sin             ",
36  "_acos",  "_cos             ",
37  "_atan",  "_tan             ",
38  "_sinh",  "_asin            ",
39  "_cosh",  "_acos            ",
40  "_tanh",  "_atan            ",
41  "_asinh",  "_sinh            ",
42  "_acosh",  "_cosh            ",
43  "_atanh",  "_tanh            ",
44  "_log10",  "_asinh           ",
45  "_log",  "_acosh           ",
46  "_Lsup",  "_atanh           ",
47  "_sup",  "_exp             ",
48  "_inf"  "_sqrt            ",
49    "_log10           ",
50    "_log             ",
51    "_sign            ",
52    "_Lsup            ",
53    "_sup             ",
54    "_inf             "
55  ]  ]
56    
57  #  #
# Line 56  def prepareArg(val,ex,wh): Line 63  def prepareArg(val,ex,wh):
63      else:      else:
64          exx=False          exx=False
65      out=Data(val,what=wh,expand=exx)      out=Data(val,what=wh,expand=exx)
66        if ex=="Tagged":
67            out.tag()
68      return out      return out
69    
70  def getStartTime():  def getStartTime():
# Line 68  def calcElapsedTime(starttime): Line 77  def calcElapsedTime(starttime):
77    
78  def runTest(arg,test):  def runTest(arg,test):
79      print "\t\t", test,      print "\t\t", test,
80      result = arg.__getattribute__(test)()      test_name = test.rstrip()
81        result = arg.__getattribute__(test_name)()
82      del result      del result
83    
84  #  #
# Line 80  for wh in [Function(msh),ContinuousFunct Line 90  for wh in [Function(msh),ContinuousFunct
90    
91    print "\n", wh, ":"    print "\n", wh, ":"
92    
93    for ex in ["Expanded"]:    for ex in ["Constant", "Tagged", "Expanded"]:
94    
95      for a in arglist:      for a in arglist:
96    
97        print "\n\t", ex, a, "==>"        arg=prepareArg(a,ex,wh)
98    
99          print "\n\t", ex, "Rank", arg.getRank(), "==>"
100        print "\n\t\tFunction\t\tElapsed time"        print "\n\t\tFunction\t\tElapsed time"
101        print "\t\t--------\t\t------------"        print "\t\t--------\t\t------------"
102    
       arg=prepareArg(a,ex,wh)  
   
103        for test in testlist:        for test in testlist:
104    
105          starttime = getStartTime()          starttime = getStartTime()

Legend:
Removed from v.569  
changed lines
  Added in v.570

  ViewVC Help
Powered by ViewVC 1.1.26