comparison liboctave/array/CSparse.cc @ 19331:afd6179d2616

allow building with new version of SuiteSparse (bug #43063) * oct-sparse.h (SUITESPARSE_ASSIGN_FPTR, SUITESPARSE_ASSIGN_FPTR2): New macros. * amd.cc, symbfact.cc, CSparse.cc, dSparse.cc, sparse-base-chol.cc: Use as needed. From Andre da Costa Barros <andre.cbarros@yahoo.com>.
author John W. Eaton <jwe@octave.org>
date Sun, 21 Sep 2014 15:45:08 -0400
parents 9ac2357f19bc
children 65554f5847ac
comparison
equal deleted inserted replaced
19330:ebeb3defae37 19331:afd6179d2616
5667 5667
5668 double spu = octave_sparse_params::get_key ("spumoni"); 5668 double spu = octave_sparse_params::get_key ("spumoni");
5669 if (spu == 0.) 5669 if (spu == 0.)
5670 { 5670 {
5671 cm->print = -1; 5671 cm->print = -1;
5672 cm->print_function = 0; 5672 SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, 0);
5673 } 5673 }
5674 else 5674 else
5675 { 5675 {
5676 cm->print = static_cast<int> (spu) + 2; 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 cm->error_handler = &SparseCholError; 5680 cm->error_handler = &SparseCholError;
5681 cm->complex_divide = CHOLMOD_NAME(divcomplex); 5681 SUITESPARSE_ASSIGN_FPTR2 (divcomplex_func, cm->complex_divide, divcomplex);
5682 cm->hypotenuse = CHOLMOD_NAME(hypot); 5682 SUITESPARSE_ASSIGN_FPTR2 (hypot_func, cm->hypotenuse, hypot);
5683 5683
5684 cm->final_ll = true; 5684 cm->final_ll = true;
5685 5685
5686 cholmod_sparse Astore; 5686 cholmod_sparse Astore;
5687 cholmod_sparse *A = &Astore; 5687 cholmod_sparse *A = &Astore;
5910 5910
5911 double spu = octave_sparse_params::get_key ("spumoni"); 5911 double spu = octave_sparse_params::get_key ("spumoni");
5912 if (spu == 0.) 5912 if (spu == 0.)
5913 { 5913 {
5914 cm->print = -1; 5914 cm->print = -1;
5915 cm->print_function = 0; 5915 SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, 0);
5916 } 5916 }
5917 else 5917 else
5918 { 5918 {
5919 cm->print = static_cast<int> (spu) + 2; 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 cm->error_handler = &SparseCholError; 5923 cm->error_handler = &SparseCholError;
5924 cm->complex_divide = CHOLMOD_NAME(divcomplex); 5924 SUITESPARSE_ASSIGN_FPTR2 (divcomplex_func, cm->complex_divide, divcomplex);
5925 cm->hypotenuse = CHOLMOD_NAME(hypot); 5925 SUITESPARSE_ASSIGN_FPTR2 (hypot_func, cm->hypotenuse, hypot);
5926 5926
5927 cm->final_ll = true; 5927 cm->final_ll = true;
5928 5928
5929 cholmod_sparse Astore; 5929 cholmod_sparse Astore;
5930 cholmod_sparse *A = &Astore; 5930 cholmod_sparse *A = &Astore;
6201 6201
6202 double spu = octave_sparse_params::get_key ("spumoni"); 6202 double spu = octave_sparse_params::get_key ("spumoni");
6203 if (spu == 0.) 6203 if (spu == 0.)
6204 { 6204 {
6205 cm->print = -1; 6205 cm->print = -1;
6206 cm->print_function = 0; 6206 SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, 0);
6207 } 6207 }
6208 else 6208 else
6209 { 6209 {
6210 cm->print = static_cast<int> (spu) + 2; 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 cm->error_handler = &SparseCholError; 6214 cm->error_handler = &SparseCholError;
6215 cm->complex_divide = CHOLMOD_NAME(divcomplex); 6215 SUITESPARSE_ASSIGN_FPTR2 (divcomplex_func, cm->complex_divide, divcomplex);
6216 cm->hypotenuse = CHOLMOD_NAME(hypot); 6216 SUITESPARSE_ASSIGN_FPTR2 (hypot_func, cm->hypotenuse, hypot);
6217 6217
6218 cm->final_ll = true; 6218 cm->final_ll = true;
6219 6219
6220 cholmod_sparse Astore; 6220 cholmod_sparse Astore;
6221 cholmod_sparse *A = &Astore; 6221 cholmod_sparse *A = &Astore;
6423 6423
6424 double spu = octave_sparse_params::get_key ("spumoni"); 6424 double spu = octave_sparse_params::get_key ("spumoni");
6425 if (spu == 0.) 6425 if (spu == 0.)
6426 { 6426 {
6427 cm->print = -1; 6427 cm->print = -1;
6428 cm->print_function = 0; 6428 SUITESPARSE_ASSIGN_FPTR (printf_func, cm->print_function, 0);
6429 } 6429 }
6430 else 6430 else
6431 { 6431 {
6432 cm->print = static_cast<int> (spu) + 2; 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 cm->error_handler = &SparseCholError; 6436 cm->error_handler = &SparseCholError;
6437 cm->complex_divide = CHOLMOD_NAME(divcomplex); 6437 SUITESPARSE_ASSIGN_FPTR2 (divcomplex_func, cm->complex_divide, divcomplex);
6438 cm->hypotenuse = CHOLMOD_NAME(hypot); 6438 SUITESPARSE_ASSIGN_FPTR2 (hypot_func, cm->hypotenuse, hypot);
6439 6439
6440 cm->final_ll = true; 6440 cm->final_ll = true;
6441 6441
6442 cholmod_sparse Astore; 6442 cholmod_sparse Astore;
6443 cholmod_sparse *A = &Astore; 6443 cholmod_sparse *A = &Astore;