Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/ein16/synth/d2/run.py
ViewVC logotype

Diff of /branches/ein16/synth/d2/run.py

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

revision 4410, Fri Aug 12 18:28:32 2016 UTC revision 4411, Fri Aug 12 18:28:57 2016 UTC
# Line 13  Line 13 
13  from core import *  from core import *
14  from write import *  from write import *
15  # unu save -f nrrd -e ascii -i out.nrrd | less  # unu save -f nrrd -e ascii -i out.nrrd | less
16  isVis15 = true  isVis15 = false
17  args_types = int(sys.argv[1])  args_types = int(sys.argv[1])
18  layer = int(sys.argv[2])  layer = int(sys.argv[2])
19  args = int(sys.argv[3])  args = int(sys.argv[3])
# Line 182  Line 182 
182          print "tf2", tf2, tshape2          print "tf2", tf2, tshape2
183          if(tf2==true):# if it works continue          if(tf2==true):# if it works continue
184              #create app object              #create app object
185                print "opr_outer", opr_outer.name
186              print "tshape2", tshape2.name              print "tshape2", tshape2.name
187              appname  = opr_outer.name+"("+opr_inner.name+")"              appname  = opr_outer.name+"("+opr_inner.name+")"
188              (app, coeffs) = mkApply_twice(appname, opr_inner,opr_outer, ishape, inputfile, tshape1, tshape2)              (app, coeffs) = mkApply_twice(appname, opr_inner,opr_outer, ishape, inputfile, tshape1, tshape2)
189              dimF = tshape2.dim              dimF = tshape2.dim
190              # main part              # main part
191              print title              print title
192                print "appoty",app.oty.name
193              return (app, coeffs, dimF, title)              return (app, coeffs, dimF, title)
194          else:          else:
195              # "\n\t\tskipped did not apply "+opr_outer.name+" to ("+str(tshape2)+","              # "\n\t\tskipped did not apply "+opr_outer.name+" to ("+str(tshape2)+","
# Line 235  Line 237 
237              return ([], "")              return ([], "")
238      (fty, s) = get_fty(t_ty2)      (fty, s) = get_fty(t_ty2)
239      names="p_aty"+str(args_types)+"_i"+str(opr_inner.id)+"_o"+str(opr_outer.id)+"_n"+str(t_num)+s      names="p_aty"+str(args_types)+"_i"+str(opr_inner.id)+"_o"+str(opr_outer.id)+"_n"+str(t_num)+s
240        print "names",names
241      rtn = create_embed_app(opr_inner, opr_outer, t_num, fty, names)      rtn = create_embed_app(opr_inner, opr_outer, t_num, fty, names)
242      if(rtn==None):      if(rtn==None):
243          print "found none after create embed app"          print "found none after create embed app"
# Line 404  Line 407 
407          embed_base_iter_outer(id_toOpr(t_opr))          embed_base_iter_outer(id_toOpr(t_opr))
408      return      return
409    
410    
411    #specify outer operator
412    def embed2_iter_inner_gotouter(opr_outer):
413        n_opr = getN()
414        global rst_total
415        rst_total = 0
416        #iterate over inner operator
417        for t_opr in range(n_opr):
418            global rst_cnt
419            rst_cnt = 0
420            global rst_compile
421            rst_compile = 0
422            global rst_good
423            rst_good = 0
424            global rst_eh
425            rst_eh = 0
426            global rst_check
427            rst_check = 0
428            global rst_terrible
429            rst_terrible = 0
430            opr_inner = id_toOpr(t_opr)
431            writeTitle_outer(opr_inner, opr_outer)
432            embed_base_iter_ty2(opr_inner, opr_outer)
433            writeResults_outer(opr_inner, opr_outer)
434        return
435    
436    
437  #run all examples for a specific operator  #run all examples for a specific operator
438  def single_all_ops(opr_inner):  def single_all_ops(opr_inner):
439      ex = oprToEx(opr_inner, args_types)      ex = oprToEx(opr_inner, args_types)
# Line 487  Line 517 
517          opr_inner = id_toOpr(t_inner)          opr_inner = id_toOpr(t_inner)
518          embed_base_iter_outer(opr_inner)          embed_base_iter_outer(opr_inner)
519          writeCumulative()          writeCumulative()
520        elif(args==5):
521            t_outer = int(sys.argv[4])
522            opr_outer = id_toOpr(t_outer)
523            writeTitle_outer2(opr_outer)
524            embed2_iter_inner_gotouter(opr_outer)
525            writeCumulative()
526      elif (args==2):      elif (args==2):
527          t_inner = int(sys.argv[4])          t_inner = int(sys.argv[4])
528          t_outer = int(sys.argv[5])#outer  operator          t_outer = int(sys.argv[5])#outer  operator

Legend:
Removed from v.4410  
changed lines
  Added in v.4411

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0