Mercurial > hg > octave-lyh
comparison liboctave/CSparse.cc @ 7036:daff886a8e2a
[project @ 2007-10-17 19:02:10 by jwe]
author | jwe |
---|---|
date | Wed, 17 Oct 2007 19:02:11 +0000 |
parents | a1dbe9d80eee |
children | 3fade00a6ac7 |
comparison
equal
deleted
inserted
replaced
7035:a2000c2b5e7d | 7036:daff886a8e2a |
---|---|
5768 | 5768 |
5769 cm->error_handler = &SparseCholError; | 5769 cm->error_handler = &SparseCholError; |
5770 cm->complex_divide = CHOLMOD_NAME(divcomplex); | 5770 cm->complex_divide = CHOLMOD_NAME(divcomplex); |
5771 cm->hypotenuse = CHOLMOD_NAME(hypot); | 5771 cm->hypotenuse = CHOLMOD_NAME(hypot); |
5772 | 5772 |
5773 #ifdef HAVE_METIS | |
5774 // METIS 4.0.1 uses malloc and free, and will terminate if | |
5775 // it runs out of memory. Use CHOLMOD's memory guard for | |
5776 // METIS, which allocates a huge block of memory (and then | |
5777 // immediately frees it) before calling METIS | |
5778 cm->metis_memory = 2.0; | |
5779 | |
5780 #if defined(METIS_VERSION) | |
5781 #if (METIS_VERSION >= METIS_VER(4,0,2)) | |
5782 // METIS 4.0.2 uses function pointers for malloc and free. | |
5783 METIS_malloc = cm->malloc_memory; | |
5784 METIS_free = cm->free_memory; | |
5785 // Turn off METIS memory guard. | |
5786 cm->metis_memory = 0.0; | |
5787 #endif | |
5788 #endif | |
5789 #endif | |
5790 cm->final_ll = true; | 5773 cm->final_ll = true; |
5791 | 5774 |
5792 cholmod_sparse Astore; | 5775 cholmod_sparse Astore; |
5793 cholmod_sparse *A = &Astore; | 5776 cholmod_sparse *A = &Astore; |
5794 double dummy; | 5777 double dummy; |
6028 | 6011 |
6029 cm->error_handler = &SparseCholError; | 6012 cm->error_handler = &SparseCholError; |
6030 cm->complex_divide = CHOLMOD_NAME(divcomplex); | 6013 cm->complex_divide = CHOLMOD_NAME(divcomplex); |
6031 cm->hypotenuse = CHOLMOD_NAME(hypot); | 6014 cm->hypotenuse = CHOLMOD_NAME(hypot); |
6032 | 6015 |
6033 #ifdef HAVE_METIS | |
6034 // METIS 4.0.1 uses malloc and free, and will terminate MATLAB if | |
6035 // it runs out of memory. Use CHOLMOD's memory guard for METIS, | |
6036 // which mxMalloc's a huge block of memory (and then immediately | |
6037 // mxFree's it) before calling METIS | |
6038 cm->metis_memory = 2.0; | |
6039 | |
6040 #if defined(METIS_VERSION) | |
6041 #if (METIS_VERSION >= METIS_VER(4,0,2)) | |
6042 // METIS 4.0.2 uses function pointers for malloc and free | |
6043 METIS_malloc = cm->malloc_memory; | |
6044 METIS_free = cm->free_memory; | |
6045 // Turn off METIS memory guard. It is not needed, because mxMalloc | |
6046 // will safely terminate the mexFunction and free any workspace | |
6047 // without killing all of octave. | |
6048 cm->metis_memory = 0.0; | |
6049 #endif | |
6050 #endif | |
6051 #endif | |
6052 | |
6053 cm->final_ll = true; | 6016 cm->final_ll = true; |
6054 | 6017 |
6055 cholmod_sparse Astore; | 6018 cholmod_sparse Astore; |
6056 cholmod_sparse *A = &Astore; | 6019 cholmod_sparse *A = &Astore; |
6057 double dummy; | 6020 double dummy; |
6339 | 6302 |
6340 cm->error_handler = &SparseCholError; | 6303 cm->error_handler = &SparseCholError; |
6341 cm->complex_divide = CHOLMOD_NAME(divcomplex); | 6304 cm->complex_divide = CHOLMOD_NAME(divcomplex); |
6342 cm->hypotenuse = CHOLMOD_NAME(hypot); | 6305 cm->hypotenuse = CHOLMOD_NAME(hypot); |
6343 | 6306 |
6344 #ifdef HAVE_METIS | |
6345 // METIS 4.0.1 uses malloc and free, and will terminate MATLAB if | |
6346 // it runs out of memory. Use CHOLMOD's memory guard for METIS, | |
6347 // which mxMalloc's a huge block of memory (and then immediately | |
6348 // mxFree's it) before calling METIS | |
6349 cm->metis_memory = 2.0; | |
6350 | |
6351 #if defined(METIS_VERSION) | |
6352 #if (METIS_VERSION >= METIS_VER(4,0,2)) | |
6353 // METIS 4.0.2 uses function pointers for malloc and free | |
6354 METIS_malloc = cm->malloc_memory; | |
6355 METIS_free = cm->free_memory; | |
6356 // Turn off METIS memory guard. It is not needed, because mxMalloc | |
6357 // will safely terminate the mexFunction and free any workspace | |
6358 // without killing all of octave. | |
6359 cm->metis_memory = 0.0; | |
6360 #endif | |
6361 #endif | |
6362 #endif | |
6363 | |
6364 cm->final_ll = true; | 6307 cm->final_ll = true; |
6365 | 6308 |
6366 cholmod_sparse Astore; | 6309 cholmod_sparse Astore; |
6367 cholmod_sparse *A = &Astore; | 6310 cholmod_sparse *A = &Astore; |
6368 double dummy; | 6311 double dummy; |
6580 } | 6523 } |
6581 | 6524 |
6582 cm->error_handler = &SparseCholError; | 6525 cm->error_handler = &SparseCholError; |
6583 cm->complex_divide = CHOLMOD_NAME(divcomplex); | 6526 cm->complex_divide = CHOLMOD_NAME(divcomplex); |
6584 cm->hypotenuse = CHOLMOD_NAME(hypot); | 6527 cm->hypotenuse = CHOLMOD_NAME(hypot); |
6585 | |
6586 #ifdef HAVE_METIS | |
6587 // METIS 4.0.1 uses malloc and free, and will terminate MATLAB if | |
6588 // it runs out of memory. Use CHOLMOD's memory guard for METIS, | |
6589 // which mxMalloc's a huge block of memory (and then immediately | |
6590 // mxFree's it) before calling METIS | |
6591 cm->metis_memory = 2.0; | |
6592 | |
6593 #if defined(METIS_VERSION) | |
6594 #if (METIS_VERSION >= METIS_VER(4,0,2)) | |
6595 // METIS 4.0.2 uses function pointers for malloc and free | |
6596 METIS_malloc = cm->malloc_memory; | |
6597 METIS_free = cm->free_memory; | |
6598 // Turn off METIS memory guard. It is not needed, because mxMalloc | |
6599 // will safely terminate the mexFunction and free any workspace | |
6600 // without killing all of octave. | |
6601 cm->metis_memory = 0.0; | |
6602 #endif | |
6603 #endif | |
6604 #endif | |
6605 | 6528 |
6606 cm->final_ll = true; | 6529 cm->final_ll = true; |
6607 | 6530 |
6608 cholmod_sparse Astore; | 6531 cholmod_sparse Astore; |
6609 cholmod_sparse *A = &Astore; | 6532 cholmod_sparse *A = &Astore; |