[138] | 1 | #include <stdio.h> |
---|
| 2 | #include "libpartest.h" |
---|
| 3 | |
---|
| 4 | int run_main(int argc, char **argv) |
---|
| 5 | { |
---|
| 6 | /* Call the mclInitializeApplication routine. Make sure that the application |
---|
| 7 | * was initialized properly by checking the return status. This initialization |
---|
| 8 | * has to be done before calling any MATLAB API's or MATLAB Compiler generated |
---|
| 9 | * shared library functions. */ |
---|
| 10 | if( !mclInitializeApplication(NULL,0) ) |
---|
| 11 | { |
---|
| 12 | fprintf(stderr, "Could not initialize the application.\n"); |
---|
| 13 | return -1; |
---|
| 14 | } |
---|
| 15 | |
---|
| 16 | /* Call the library intialization routine and make sure that the |
---|
| 17 | * library was initialized properly. */ |
---|
| 18 | if (!libpartestInitialize()){ |
---|
| 19 | fprintf(stderr,"Could not initialize the library.\n"); |
---|
| 20 | return -2; |
---|
| 21 | } |
---|
| 22 | else |
---|
| 23 | { |
---|
| 24 | mlfParallel(); |
---|
| 25 | /* Call the library termination routine */ |
---|
| 26 | libpartestTerminate(); |
---|
| 27 | |
---|
| 28 | /* Free the memory created */ |
---|
| 29 | /*mxDestroyArray(database_dir); database_dir = 0; |
---|
| 30 | mxDestroyArray(test_dir); test_dir = 0; |
---|
| 31 | |
---|
| 32 | mxDestroyArray(C); C = 0; |
---|
| 33 | mxDestroyArray(Ctest); Ctest = 0; |
---|
| 34 | |
---|
| 35 | mxDestroyArray(F); F = 0; |
---|
| 36 | mxDestroyArray(Ftest); Ftest = 0; |
---|
| 37 | |
---|
| 38 | mxDestroyArray(pc); pc = 0;*/ |
---|
| 39 | } |
---|
| 40 | |
---|
| 41 | /* Note that you should call mclTerminate application at the end of |
---|
| 42 | * your application. |
---|
| 43 | */ |
---|
| 44 | mclTerminateApplication(); |
---|
| 45 | return 0; |
---|
| 46 | } |
---|
| 47 | |
---|
| 48 | int main() |
---|
| 49 | { |
---|
| 50 | mclmcrInitialize(); |
---|
| 51 | return mclRunMain((mclMainFcnType)run_main,0,NULL); |
---|
| 52 | } |
---|