Ticket #45101: patch-SuiteSparse.diff
File patch-SuiteSparse.diff, 9.6 KB (added by michaelld (Michael Dickens), 10 years ago) |
---|
-
libinterp/dldfcn/amd.cc
old new 164 164 165 165 // FIXME: how can we manage the memory allocation of amd 166 166 // in a cleaner manner? 167 amd_malloc = malloc;168 amd_free = free;169 amd_calloc = calloc;170 amd_realloc = realloc;171 amd_printf = printf;167 SUITESPARSE_ASSIGN_FPTR (malloc_func, amd_malloc, malloc); 168 SUITESPARSE_ASSIGN_FPTR (free_func, amd_free, free); 169 SUITESPARSE_ASSIGN_FPTR (calloc_func, amd_calloc, calloc); 170 SUITESPARSE_ASSIGN_FPTR (realloc_func, amd_realloc, realloc); 171 SUITESPARSE_ASSIGN_FPTR (printf_func, amd_printf, printf); 172 172 173 173 octave_idx_type result = AMD_NAME (_order) (n_col, cidx, ridx, P, 174 174 Control, Info); -
libinterp/dldfcn/symbfact.cc
old new 114 114 if (spu == 0.) 115 115 { 116 116 cm->print = -1; 117 cm->print_function = 0;117 SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, 0); 118 118 } 119 119 else 120 120 { 121 121 cm->print = static_cast<int> (spu) + 2; 122 cm->print_function =&SparseCholPrint;122 SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, &SparseCholPrint); 123 123 } 124 124 125 125 cm->error_handler = &SparseCholError; 126 cm->complex_divide = CHOLMOD_NAME(divcomplex);127 cm->hypotenuse = CHOLMOD_NAME(hypot);126 SUITESPARSE_ASSIGN_FPTR2 (divcomplex_func, cm->complex_divide, divcomplex); 127 SUITESPARSE_ASSIGN_FPTR2 (hypot_func, cm->hypotenuse, hypot); 128 128 129 129 double dummy; 130 130 cholmod_sparse Astore; -
liboctave/array/CSparse.cc
old new 5669 5669 if (spu == 0.) 5670 5670 { 5671 5671 cm->print = -1; 5672 cm->print_function = 0;5672 SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, 0); 5673 5673 } 5674 5674 else 5675 5675 { 5676 5676 cm->print = static_cast<int> (spu) + 2; 5677 cm->print_function =&SparseCholPrint;5677 SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, &SparseCholPrint); 5678 5678 } 5679 5679 5680 5680 cm->error_handler = &SparseCholError; 5681 cm->complex_divide = CHOLMOD_NAME(divcomplex);5682 cm->hypotenuse = CHOLMOD_NAME(hypot);5681 SUITESPARSE_ASSIGN_FPTR2 (divcomplex_func, cm->complex_divide, divcomplex); 5682 SUITESPARSE_ASSIGN_FPTR2 (hypot_func, cm->hypotenuse, hypot); 5683 5683 5684 5684 cm->final_ll = true; 5685 5685 … … 5912 5912 if (spu == 0.) 5913 5913 { 5914 5914 cm->print = -1; 5915 cm->print_function = 0;5915 SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, 0); 5916 5916 } 5917 5917 else 5918 5918 { 5919 5919 cm->print = static_cast<int> (spu) + 2; 5920 cm->print_function =&SparseCholPrint;5920 SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, &SparseCholPrint); 5921 5921 } 5922 5922 5923 5923 cm->error_handler = &SparseCholError; 5924 cm->complex_divide = CHOLMOD_NAME(divcomplex);5925 cm->hypotenuse = CHOLMOD_NAME(hypot);5924 SUITESPARSE_ASSIGN_FPTR2 (divcomplex_func, cm->complex_divide, divcomplex); 5925 SUITESPARSE_ASSIGN_FPTR2 (hypot_func, cm->hypotenuse, hypot); 5926 5926 5927 5927 cm->final_ll = true; 5928 5928 … … 6203 6203 if (spu == 0.) 6204 6204 { 6205 6205 cm->print = -1; 6206 cm->print_function = 0;6206 SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, 0); 6207 6207 } 6208 6208 else 6209 6209 { 6210 6210 cm->print = static_cast<int> (spu) + 2; 6211 cm->print_function =&SparseCholPrint;6211 SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, &SparseCholPrint); 6212 6212 } 6213 6213 6214 6214 cm->error_handler = &SparseCholError; 6215 cm->complex_divide = CHOLMOD_NAME(divcomplex);6216 cm->hypotenuse = CHOLMOD_NAME(hypot);6215 SUITESPARSE_ASSIGN_FPTR2 (divcomplex_func, cm->complex_divide, divcomplex); 6216 SUITESPARSE_ASSIGN_FPTR2 (hypot_func, cm->hypotenuse, hypot); 6217 6217 6218 6218 cm->final_ll = true; 6219 6219 … … 6425 6425 if (spu == 0.) 6426 6426 { 6427 6427 cm->print = -1; 6428 cm->print_function = 0;6428 SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, 0); 6429 6429 } 6430 6430 else 6431 6431 { 6432 6432 cm->print = static_cast<int> (spu) + 2; 6433 cm->print_function =&SparseCholPrint;6433 SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, &SparseCholPrint); 6434 6434 } 6435 6435 6436 6436 cm->error_handler = &SparseCholError; 6437 cm->complex_divide = CHOLMOD_NAME(divcomplex);6438 cm->hypotenuse = CHOLMOD_NAME(hypot);6437 SUITESPARSE_ASSIGN_FPTR2 (divcomplex_func, cm->complex_divide, divcomplex); 6438 SUITESPARSE_ASSIGN_FPTR2 (hypot_func, cm->hypotenuse, hypot); 6439 6439 6440 6440 cm->final_ll = true; 6441 6441 -
liboctave/array/dSparse.cc
old new 5871 5871 if (spu == 0.) 5872 5872 { 5873 5873 cm->print = -1; 5874 cm->print_function = 0;5874 SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, 0); 5875 5875 } 5876 5876 else 5877 5877 { 5878 5878 cm->print = static_cast<int> (spu) + 2; 5879 cm->print_function =&SparseCholPrint;5879 SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, &SparseCholPrint); 5880 5880 } 5881 5881 5882 5882 cm->error_handler = &SparseCholError; 5883 cm->complex_divide = CHOLMOD_NAME(divcomplex);5884 cm->hypotenuse = CHOLMOD_NAME(hypot);5883 SUITESPARSE_ASSIGN_FPTR2 (divcomplex_func, cm->complex_divide, divcomplex); 5884 SUITESPARSE_ASSIGN_FPTR2 (hypot_func, cm->hypotenuse, hypot); 5885 5885 5886 5886 cm->final_ll = true; 5887 5887 … … 6088 6088 if (spu == 0.) 6089 6089 { 6090 6090 cm->print = -1; 6091 cm->print_function = 0;6091 SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, 0); 6092 6092 } 6093 6093 else 6094 6094 { 6095 6095 cm->print = static_cast<int> (spu) + 2; 6096 cm->print_function =&SparseCholPrint;6096 SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, &SparseCholPrint); 6097 6097 } 6098 6098 6099 6099 cm->error_handler = &SparseCholError; 6100 cm->complex_divide = CHOLMOD_NAME(divcomplex);6101 cm->hypotenuse = CHOLMOD_NAME(hypot);6100 SUITESPARSE_ASSIGN_FPTR2 (divcomplex_func, cm->complex_divide, divcomplex); 6101 SUITESPARSE_ASSIGN_FPTR2 (hypot_func, cm->hypotenuse, hypot); 6102 6102 6103 6103 cm->final_ll = true; 6104 6104 … … 6350 6350 if (spu == 0.) 6351 6351 { 6352 6352 cm->print = -1; 6353 cm->print_function = 0;6353 SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, 0); 6354 6354 } 6355 6355 else 6356 6356 { 6357 6357 cm->print = static_cast<int> (spu) + 2; 6358 cm->print_function =&SparseCholPrint;6358 SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, &SparseCholPrint); 6359 6359 } 6360 6360 6361 6361 cm->error_handler = &SparseCholError; 6362 cm->complex_divide = CHOLMOD_NAME(divcomplex);6363 cm->hypotenuse = CHOLMOD_NAME(hypot);6362 SUITESPARSE_ASSIGN_FPTR2 (divcomplex_func, cm->complex_divide, divcomplex); 6363 SUITESPARSE_ASSIGN_FPTR2 (hypot_func, cm->hypotenuse, hypot); 6364 6364 6365 6365 cm->final_ll = true; 6366 6366 … … 6584 6584 if (spu == 0.) 6585 6585 { 6586 6586 cm->print = -1; 6587 cm->print_function = 0;6587 SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, 0); 6588 6588 } 6589 6589 else 6590 6590 { 6591 6591 cm->print = static_cast<int> (spu) + 2; 6592 cm->print_function =&SparseCholPrint;6592 SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, &SparseCholPrint); 6593 6593 } 6594 6594 6595 6595 cm->error_handler = &SparseCholError; 6596 cm->complex_divide = CHOLMOD_NAME(divcomplex);6597 cm->hypotenuse = CHOLMOD_NAME(hypot);6596 SUITESPARSE_ASSIGN_FPTR2 (divcomplex_func, cm->complex_divide, divcomplex); 6597 SUITESPARSE_ASSIGN_FPTR2 (hypot_func, cm->hypotenuse, hypot); 6598 6598 6599 6599 cm->final_ll = true; 6600 6600 -
liboctave/numeric/sparse-base-chol.cc
old new 105 105 if (spu == 0.) 106 106 { 107 107 cm->print = -1; 108 cm->print_function = 0;108 SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, 0); 109 109 } 110 110 else 111 111 { 112 112 cm->print = static_cast<int> (spu) + 2; 113 cm->print_function =&SparseCholPrint;113 SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, &SparseCholPrint); 114 114 } 115 115 116 116 cm->error_handler = &SparseCholError; 117 cm->complex_divide = CHOLMOD_NAME(divcomplex);118 cm->hypotenuse = CHOLMOD_NAME(hypot);117 SUITESPARSE_ASSIGN_FPTR2 (divcomplex_func, cm->complex_divide, divcomplex); 118 SUITESPARSE_ASSIGN_FPTR2 (hypot_func, cm->hypotenuse, hypot); 119 119 120 120 cm->final_asis = false; 121 121 cm->final_super = false; -
liboctave/util/oct-sparse.h
old new 94 94 #endif 95 95 #endif 96 96 97 // Cope with new suitesparse versions 98 // 99 #if defined (SUITESPARSE_VERSION) && SUITESPARSE_VERSION >= SUITESPARSE_VER_CODE (4, 3) 100 # define SUITESPARSE_ASSIGN_FPTR(f_name, f_var, f_assign) (SuiteSparse_config.f_name = f_assign) 101 # define SUITESPARSE_ASSIGN_FPTR2(f_name, f_var, f_assign) (SuiteSparse_config.f_name = CHOLMOD_NAME (f_assign)) 102 #else 103 # define SUITESPARSE_ASSIGN_FPTR(f_name, f_var, f_assign) (f_var = f_assign) 104 # define SUITESPARSE_ASSIGN_FPTR2(f_name, f_var, f_assign) (f_var = CHOLMOD_NAME (f_assign)) 97 105 #endif 106 107 #endif