Go to the source code of this file.
Functions | |
| else | fprintf ('Result:Success%s test\n', fname) |
| end | pause (pause_time) |
| gs_call (fname, infloatvecn, inintn, resultfloatn) | |
| if (sid >=0) pause(async_pause) = gs_call_async(fname, infloatmatmn, inintm, inintn) | |
| else | fprintf ('Result:Success%s(async) test\n', fname) |
| if (sid< 0) return = failedcount+1 | |
| fprintf ('%s test:Cancel returned status%d.\n', testname, status) | |
| else | fprintf ('Result:Success%s test\n', testname) |
| fprintf ('%s test:...please wait\n', testname) | |
| if sid< 0 return;endstatus=0;sleepcount=0;while 1==1, status=gs_probe(sid);if status~=0%fprintf('%s test:Status%d;sleeping.\n', testname, status);sleepcount=sleepcount+1;pause(1);else%fprintf('%s test:Status%d;break.\n', testname, status);break endendgs_wait(sid);if(sleepcount <=1) fprintf('Result:Failed%s test\n', testname);failedcount=failedcount+1;else fprintf('Result:Success%s test\n', testname);end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%fname= 'return_double_vector';inintn=N;indoublevecn=rand(inintn, 1)*100;correctdoublen=indoublevecn+1;sid=gs_call_async(fname, indoublevecn, inintn);if(sid > =0) pause(async_pause);[resultdoublen]=gs_wait(sid);end;testcount=testcount+1;if(size(resultdoublen)==[0, 0]) fprintf('Result:Failed%s(async) test\n', fname);failedcount=failedcount+1;elseif(max(abs(resultdoublen-correctdoublen)) > accepterror | fprintf ('Result:Failed%s(async) test\n', fname) |
| gs_call (fname, infloatmatmn, inintm, inintn, resultfloatmn) | |
| gs_call (fname, indoublematmn, inintm, inintn, resultdoublemn) | |
| gs_call (fname, inintmatmn, inintm, inintn, resultintmn) | |
| if (size(resultintmn)==[0, 0]) | |
| gs_call (fname, incharmatmn, incharm, incharn, resultcharmn) | |
| gs_call (fname, inintvecn, inintn, resultintn) | |
| if (size(resultintn)==[0, 0]) | |
| gs_call (fname, incharvecn, incharn, resultcharn) | |
| gs_call (fname, inintn, resultintn) | |
| gs_call (fname, indoublen, resultdoublen) | |
| gs_call (fname, infloatn, resultfloatn) | |
| gs_call (fname, incharn, resultcharn) | |
| fprintf ('Result:Failed%s test\n', fname) | |
| fprintf ('%s test:%d\n', fname, n) | |
| fprintf ('%d?%d *%s *\n', size(str2, 2), n, str2) | |
| fprintf ('\n') | |
| if(failedcount > 0) fprintf('Result else | fprintf ('Result:Passed all%d tests in gs_totaltest\n',...testcount) |
Variables | |
| Some matlab tests To run this | script |
| Some matlab tests To run this your MATLABPATH will need to be setup to | include |
| M = 50 | |
| N = 50 | |
| density = 0.2 | |
| testcount = 0 | |
| failedcount = 0 | |
| pause_time = 0 | |
| async_pause = 0 | |
| fname = 'sparse_double_matrix_test' | |
| inmn = sprand(M, N, density)*100 | |
| correctmn = spones(inmn) + inmn | |
| nonz = nonzeros(inmn) | |
| inintn = N | |
| infloatvecn = rand(inintn,1)*100 | |
| correctfloatn = infloatvecn+1 | |
| sid = gs_call_async(fname, infloatvecn, inintn) | |
| end = gs_wait(sid) | |
| infloatn = rand(1)*100 | |
| resultfloatn = 0 | |
| testname = 'cancel' | |
| end | status = gs_cancel(sid) |
| inintm = M | |
| infloatmatmn = rand(inintm, inintn)*100 | |
| correctfloatmn = infloatmatmn+1 | |
| indoublematmn = rand(inintm, inintn)*100 | |
| correctdoublemn = indoublematmn+1 | |
| inintmatmn = floor(rand(inintm, inintn)*100) | |
| resultintmn = zeros(inintm, inintn) | |
| correctintmn = inintmatmn+1 | |
| incharm = M | |
| incharn = N | |
| incharmatmn = char(floor(rand(incharm, incharn)*127)) | |
| resultcharmn = zeros(incharm, incharn) | |
| correctcharmn = incharmatmn+1 | |
| inintvecn = floor(rand(inintn,1)*100) | |
| resultintn = zeros(inintn,1) | |
| correctintn = inintvecn+1 | |
| incharvecn = char(floor(rand(incharn,1)*127)) | |
| resultcharn = zeros(incharn,1) | |
| correctcharn = incharvecn+1 | |
| indoublen = (rand(1)*100) | |
| resultdoublen = 0 | |
| correctdoublen = indoublen+1 | |
| resultfloatmn = zeros(inintm, inintn) | |
| resultdoublemn = zeros(inintm, inintn) | |
| indoublevecn = rand(inintn, 1)*100 | |
| in = 0 | |
| correct = 0 | |
| result = 0 | |
| else fprintf | ( | 'Result:Success%s test\n' | , | |
| fname | ||||
| ) |
| if (failedcount > 0) fprintf('Result else fprintf | ( | 'Result:Passed all%d tests in gs_totaltest\n' | , | |
| testcount | ||||
| ) |
| else fprintf | ( | 'Result:Success%s(async) test\n' | , | |
| fname | ||||
| ) |
| else fprintf | ( | 'Result:Success%s test\n' | , | |
| testname | ||||
| ) |
| fprintf | ( | '%s test:...please wait\n' | , | |
| testname | ||||
| ) |
| fprintf | ( | 'Result:Failed%s(async) test\n' | , | |
| fname | ||||
| ) |
| fprintf | ( | 'Result:Failed%s test\n' | , | |
| fname | ||||
| ) |
| fprintf | ( | '%s test:%d\n' | , | |
| fname | , | |||
| n | ||||
| ) |
| fprintf | ( | '%d?%d *%s *\n' | , | |
| size(str2, 2) | , | |||
| n | , | |||
| str2 | ||||
| ) |
| fprintf | ( | '\n' | ) |
| gs_call | ( | fname | , | |
| indoublematmn | , | |||
| inintm | , | |||
| inintn | , | |||
| resultdoublemn | ||||
| ) |
| gs_call | ( | fname | , | |
| inintvecn | , | |||
| inintn | , | |||
| resultintn | ||||
| ) |
| gs_call | ( | fname | , | |
| incharmatmn | , | |||
| incharm | , | |||
| incharn | , | |||
| resultcharmn | ||||
| ) |
| gs_call | ( | fname | , | |
| inintmatmn | , | |||
| inintm | , | |||
| inintn | , | |||
| resultintmn | ||||
| ) |
| gs_call | ( | fname | , | |
| infloatmatmn | , | |||
| inintm | , | |||
| inintn | , | |||
| resultfloatmn | ||||
| ) |
| gs_call | ( | fname | , | |
| infloatn | , | |||
| resultfloatn | ||||
| ) |
| gs_call | ( | fname | , | |
| indoublen | , | |||
| resultdoublen | ||||
| ) |
| gs_call | ( | fname | , | |
| incharn | , | |||
| resultcharn | ||||
| ) |
| gs_call | ( | fname | , | |
| incharvecn | , | |||
| incharn | , | |||
| resultcharn | ||||
| ) |
| gs_call | ( | fname | , | |
| inintn | , | |||
| resultintn | ||||
| ) |
| gs_call | ( | fname | , | |
| infloatvecn | , | |||
| inintn | , | |||
| resultfloatn | ||||
| ) |
| if | ( | size(resultintmn) | = =[0, |
|
| 0] | ||||
| ) |
| if | ( | sid >= | 0 | ) | = gs_call_async(fname, infloatmatmn, inintm, inintn) |
| if | ( | ) | = failedcount+1 |
Definition at line 35 of file gs_totaltest.m.
| if | ( | size(resultintn) | = =[0, |
|
| 0] | ||||
| ) |
| end pause | ( | pause_time | ) |
| async_pause = 0 |
Definition at line 22 of file gs_totaltest.m.
| correct = 0 |
Definition at line 668 of file gs_totaltest.m.
Definition at line 247 of file gs_totaltest.m.
Definition at line 299 of file gs_totaltest.m.
Definition at line 193 of file gs_totaltest.m.
Definition at line 349 of file gs_totaltest.m.
Definition at line 167 of file gs_totaltest.m.
Definition at line 50 of file gs_totaltest.m.
Definition at line 220 of file gs_totaltest.m.
| correctintn = inintvecn+1 |
Definition at line 273 of file gs_totaltest.m.
Definition at line 28 of file gs_totaltest.m.
| density = 0.2 |
Definition at line 16 of file gs_totaltest.m.
Definition at line 55 of file gs_totaltest.m.
| elseif (max(abs(result-correct)) > accepterror) fprintf('Result failedcount = 0 |
Definition at line 19 of file gs_totaltest.m.
Definition at line 26 of file gs_totaltest.m.
| in = 0 |
Definition at line 668 of file gs_totaltest.m.
Definition at line 243 of file gs_totaltest.m.
| incharmatmn = char(floor(rand(incharm, incharn)*127)) |
Definition at line 245 of file gs_totaltest.m.
Definition at line 244 of file gs_totaltest.m.
| incharvecn = char(floor(rand(incharn,1)*127)) |
Definition at line 297 of file gs_totaltest.m.
| Some matlab tests To run this your MATLABPATH will need to be setup to include |
Definition at line 4 of file gs_totaltest.m.
| indoublematmn = rand(inintm, inintn)*100 |
Definition at line 192 of file gs_totaltest.m.
| indoublen = (rand(1)*100) |
Definition at line 347 of file gs_totaltest.m.
| indoublevecn = rand(inintn, 1)*100 |
Definition at line 530 of file gs_totaltest.m.
| infloatmatmn = rand(inintm, inintn)*100 |
Definition at line 166 of file gs_totaltest.m.
| infloatn = rand(1)*100 |
Definition at line 73 of file gs_totaltest.m.
| infloatvecn = rand(inintn,1)*100 |
Definition at line 49 of file gs_totaltest.m.
Definition at line 164 of file gs_totaltest.m.
| inintmatmn = floor(rand(inintm, inintn)*100) |
Definition at line 218 of file gs_totaltest.m.
Definition at line 48 of file gs_totaltest.m.
Definition at line 271 of file gs_totaltest.m.
| M = 50 |
Definition at line 14 of file gs_totaltest.m.
| N = 50 |
Definition at line 15 of file gs_totaltest.m.
Definition at line 31 of file gs_totaltest.m.
| pause_time = 0 |
Definition at line 21 of file gs_totaltest.m.
| result = 0 |
Definition at line 668 of file gs_totaltest.m.
| resultcharmn = zeros(incharm, incharn) |
Definition at line 246 of file gs_totaltest.m.
| resultcharn = zeros(incharn,1) |
Definition at line 298 of file gs_totaltest.m.
| resultdoublemn = zeros(inintm, inintn) |
Definition at line 445 of file gs_totaltest.m.
| resultdoublen = 0 |
Definition at line 348 of file gs_totaltest.m.
| resultfloatmn = zeros(inintm, inintn) |
Definition at line 423 of file gs_totaltest.m.
| resultfloatn = 0 |
Definition at line 74 of file gs_totaltest.m.
| resultintmn = zeros(inintm, inintn) |
Definition at line 219 of file gs_totaltest.m.
| resultintn = zeros(inintn,1) |
Definition at line 272 of file gs_totaltest.m.
| Some matlab tests To run this script |
Definition at line 4 of file gs_totaltest.m.
| sid = gs_call_async(fname, infloatvecn, inintn) |
Definition at line 52 of file gs_totaltest.m.
Definition at line 97 of file gs_totaltest.m.
Definition at line 18 of file gs_totaltest.m.
Definition at line 92 of file gs_totaltest.m.
1.6.3-20100507