@@ -4,7 +4,8 @@ function demo() {
44 expression : "" ,
55 tensorOrders : { } ,
66 error : "" ,
7- indices : [ ]
7+ indices : [ ] ,
8+ prefix : ""
89 } ,
910 schedule : [ ] ,
1011 output : {
@@ -30,7 +31,6 @@ function demo() {
3031 }
3132 } ,
3233 updateScheduleView : function ( ) {
33- console . log ( model . schedule ) ;
3434 model . removeInvalidIndices ( ) ;
3535 model . removeInvalidAccesses ( ) ;
3636 model . scheduleView ( 0 ) ;
@@ -81,6 +81,11 @@ function demo() {
8181 }
8282 model . updateInputViews ( ) ;
8383 } ,
84+ setPrefix : function ( prefix ) {
85+ model . cancelReq ( ) ;
86+ model . setOutput ( "" , "" , "" , "" ) ;
87+ model . input . prefix = prefix ;
88+ } ,
8489 setOutput : function ( computeLoops , assemblyLoops , fullCode , error ) {
8590 model . output = { computeLoops : computeLoops ,
8691 assemblyLoops : assemblyLoops ,
@@ -1008,6 +1013,10 @@ function demo() {
10081013 command += ")" ;
10091014 }
10101015
1016+ // if (model.input.prefix) {
1017+ // command += " -prefix=\"" + model.input.prefix + "\"";
1018+ // }
1019+
10111020 var req = $ . ajax ( {
10121021 type : "POST" ,
10131022 url : "http://tensor-compiler-online.csail.mit.edu" ,
@@ -1138,4 +1147,8 @@ function demo() {
11381147 $ ( "#btnGPU" ) . click ( function ( ) {
11391148 model . setSchedule ( default_GPU_schedules [ $ ( this ) . attr ( 'data-val' ) ] ) ;
11401149 } ) ;
1150+
1151+ $ ( "#prefix" ) . keyup ( function ( ) {
1152+ model . setPrefix ( $ ( "#prefix" ) . val ( ) ) ;
1153+ } ) ;
11411154}
0 commit comments