Hello community, here is the log from the commit of package armadillo for openSUSE:Factory checked in at 2019-03-20 13:20:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/armadillo (Old) and /work/SRC/openSUSE:Factory/.armadillo.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "armadillo" Wed Mar 20 13:20:29 2019 rev:124 rq:686438 version:9.200.8 Changes: -------- --- /work/SRC/openSUSE:Factory/armadillo/armadillo.changes 2019-01-25 22:45:35.235064076 +0100 +++ /work/SRC/openSUSE:Factory/.armadillo.new.28833/armadillo.changes 2019-03-20 13:20:35.117324995 +0100 @@ -1,0 +2,6 @@ +Fri Mar 15 16:46:42 UTC 2019 - badshah...@gmail.com + +- Update to version 9.200.8: + + Misc bug fixes. + +------------------------------------------------------------------- Old: ---- armadillo-9.200.7.tar.xz New: ---- armadillo-9.200.8.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ armadillo.spec ++++++ --- /var/tmp/diff_new_pack.I9ssYe/_old 2019-03-20 13:20:37.121324508 +0100 +++ /var/tmp/diff_new_pack.I9ssYe/_new 2019-03-20 13:20:37.125324507 +0100 @@ -18,7 +18,7 @@ %define soname libarmadillo9 Name: armadillo -Version: 9.200.7 +Version: 9.200.8 Release: 0 Summary: C++ matrix library with interfaces to LAPACK and ATLAS License: Apache-2.0 ++++++ armadillo-9.200.7.tar.xz -> armadillo-9.200.8.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/armadillo-9.200.7/cmake_aux/Modules/ARMA_FindARPACK.cmake new/armadillo-9.200.8/cmake_aux/Modules/ARMA_FindARPACK.cmake --- old/armadillo-9.200.7/cmake_aux/Modules/ARMA_FindARPACK.cmake 2016-06-16 18:19:17.000000000 +0200 +++ new/armadillo-9.200.8/cmake_aux/Modules/ARMA_FindARPACK.cmake 2016-06-16 18:19:18.000000000 +0200 @@ -1,29 +1,29 @@ -# - Try to find ARPACK -# Once done this will define -# -# ARPACK_FOUND - system has ARPACK -# ARPACK_LIBRARY - Link this to use ARPACK - - -find_library(ARPACK_LIBRARY - NAMES arpack - PATHS ${CMAKE_SYSTEM_LIBRARY_PATH} /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /opt/local/lib64 /opt/local/lib - ) - - -IF (ARPACK_LIBRARY) - SET(ARPACK_FOUND YES) -ELSE () - SET(ARPACK_FOUND NO) -ENDIF () - - -IF (ARPACK_FOUND) - IF (NOT ARPACK_FIND_QUIETLY) - MESSAGE(STATUS "Found ARPACK: ${ARPACK_LIBRARY}") - ENDIF (NOT ARPACK_FIND_QUIETLY) -ELSE (ARPACK_FOUND) - IF (ARPACK_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find ARPACK") - ENDIF (ARPACK_FIND_REQUIRED) -ENDIF (ARPACK_FOUND) +# - Try to find ARPACK +# Once done this will define +# +# ARPACK_FOUND - system has ARPACK +# ARPACK_LIBRARY - Link this to use ARPACK + + +find_library(ARPACK_LIBRARY + NAMES arpack + PATHS ${CMAKE_SYSTEM_LIBRARY_PATH} /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /opt/local/lib64 /opt/local/lib + ) + + +IF (ARPACK_LIBRARY) + SET(ARPACK_FOUND YES) +ELSE () + SET(ARPACK_FOUND NO) +ENDIF () + + +IF (ARPACK_FOUND) + IF (NOT ARPACK_FIND_QUIETLY) + MESSAGE(STATUS "Found ARPACK: ${ARPACK_LIBRARY}") + ENDIF (NOT ARPACK_FIND_QUIETLY) +ELSE (ARPACK_FOUND) + IF (ARPACK_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find ARPACK") + ENDIF (ARPACK_FIND_REQUIRED) +ENDIF (ARPACK_FOUND) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/armadillo-9.200.7/docs.html new/armadillo-9.200.8/docs.html --- old/armadillo-9.200.7/docs.html 2016-06-16 18:19:17.000000000 +0200 +++ new/armadillo-9.200.8/docs.html 2016-06-16 18:19:18.000000000 +0200 @@ -1785,7 +1785,7 @@ </li> <br> <li> -Specifically intended for large matrices where only a small minority of the elements are non-zero +Specifically intended for large matrices where only a small minority of the elements is non-zero </li> <br> <li> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/armadillo-9.200.7/include/armadillo_bits/Gen_bones.hpp new/armadillo-9.200.8/include/armadillo_bits/Gen_bones.hpp --- old/armadillo-9.200.7/include/armadillo_bits/Gen_bones.hpp 2016-06-16 18:19:17.000000000 +0200 +++ new/armadillo-9.200.8/include/armadillo_bits/Gen_bones.hpp 2016-06-16 18:19:18.000000000 +0200 @@ -29,7 +29,7 @@ typedef typename T1::elem_type elem_type; typedef typename get_pod_type<elem_type>::result pod_type; - static const bool use_at = (is_same_type<gen_type, gen_eye>::value) ? true : false; + static const bool use_at = (is_same_type<gen_type, gen_eye>::value); static const bool is_simple = (is_same_type<gen_type, gen_ones>::value) || (is_same_type<gen_type, gen_zeros>::value); static const bool is_row = T1::is_row; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/armadillo-9.200.7/include/armadillo_bits/arma_version.hpp new/armadillo-9.200.8/include/armadillo_bits/arma_version.hpp --- old/armadillo-9.200.7/include/armadillo_bits/arma_version.hpp 2016-06-16 18:19:17.000000000 +0200 +++ new/armadillo-9.200.8/include/armadillo_bits/arma_version.hpp 2016-06-16 18:19:18.000000000 +0200 @@ -21,7 +21,7 @@ #define ARMA_VERSION_MAJOR 9 #define ARMA_VERSION_MINOR 200 -#define ARMA_VERSION_PATCH 7 +#define ARMA_VERSION_PATCH 8 #define ARMA_VERSION_NAME "Carpe Noctem" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/armadillo-9.200.7/include/armadillo_bits/def_hdf5.hpp new/armadillo-9.200.8/include/armadillo_bits/def_hdf5.hpp --- old/armadillo-9.200.7/include/armadillo_bits/def_hdf5.hpp 2016-06-16 18:19:17.000000000 +0200 +++ new/armadillo-9.200.8/include/armadillo_bits/def_hdf5.hpp 2016-06-16 18:19:18.000000000 +0200 @@ -1,154 +1,154 @@ -// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au) -// Copyright 2008-2016 National ICT Australia (NICTA) -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ------------------------------------------------------------------------ - - -#if defined(ARMA_USE_HDF5) - -#if !defined(ARMA_USE_HDF5_ALT) - - // macros needed if the wrapper run-time library is not being used - - #define arma_H5Tcopy H5Tcopy - #define arma_H5Tcreate H5Tcreate - #define arma_H5Tinsert H5Tinsert - #define arma_H5Tequal H5Tequal - #define arma_H5Tclose H5Tclose - - #define arma_H5Dopen H5Dopen - #define arma_H5Dget_type H5Dget_type - #define arma_H5Dclose H5Dclose - #define arma_H5Dwrite H5Dwrite - #define arma_H5Dget_space H5Dget_space - #define arma_H5Dread H5Dread - #define arma_H5Dcreate H5Dcreate - - #define arma_H5Sget_simple_extent_ndims H5Sget_simple_extent_ndims - #define arma_H5Sget_simple_extent_dims H5Sget_simple_extent_dims - #define arma_H5Sclose H5Sclose - #define arma_H5Screate_simple H5Screate_simple - - #define arma_H5Ovisit H5Ovisit - - #define arma_H5Eset_auto H5Eset_auto - #define arma_H5Eget_auto H5Eget_auto - - #define arma_H5Fopen H5Fopen - #define arma_H5Fcreate H5Fcreate - #define arma_H5Fclose H5Fclose - #define arma_H5Fis_hdf5 H5Fis_hdf5 - - #define arma_H5Gcreate H5Gcreate - #define arma_H5Gopen H5Gopen - #define arma_H5Gclose H5Gclose - - #define arma_H5Lexists H5Lexists - #define arma_H5Ldelete H5Ldelete - - #define arma_H5T_NATIVE_UCHAR H5T_NATIVE_UCHAR - #define arma_H5T_NATIVE_CHAR H5T_NATIVE_CHAR - #define arma_H5T_NATIVE_SHORT H5T_NATIVE_SHORT - #define arma_H5T_NATIVE_USHORT H5T_NATIVE_USHORT - #define arma_H5T_NATIVE_INT H5T_NATIVE_INT - #define arma_H5T_NATIVE_UINT H5T_NATIVE_UINT - #define arma_H5T_NATIVE_LONG H5T_NATIVE_LONG - #define arma_H5T_NATIVE_ULONG H5T_NATIVE_ULONG - #define arma_H5T_NATIVE_LLONG H5T_NATIVE_LLONG - #define arma_H5T_NATIVE_ULLONG H5T_NATIVE_ULLONG - #define arma_H5T_NATIVE_FLOAT H5T_NATIVE_FLOAT - #define arma_H5T_NATIVE_DOUBLE H5T_NATIVE_DOUBLE - -#else - -// prototypes for the wrapper functions defined in the wrapper run-time library (src/wrapper.cpp) - -extern "C" - { - // Wrapper functions for H5* functions. - hid_t arma_H5Tcopy(hid_t dtype_id); - hid_t arma_H5Tcreate(H5T_class_t cl, size_t size); - herr_t arma_H5Tinsert(hid_t dtype_id, const char* name, size_t offset, hid_t field_id); - htri_t arma_H5Tequal(hid_t dtype_id1, hid_t dtype_id2); - herr_t arma_H5Tclose(hid_t dtype_id); - - hid_t arma_H5Dopen(hid_t loc_id, const char* name, hid_t dapl_id); - hid_t arma_H5Dget_type(hid_t dataset_id); - herr_t arma_H5Dclose(hid_t dataset_id); - hid_t arma_H5Dcreate(hid_t loc_id, const char* name, hid_t dtype_id, hid_t space_id, hid_t lcpl_id, hid_t dcpl_id, hid_t dapl_id); - herr_t arma_H5Dwrite(hid_t dataset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t xfer_plist_id, const void* buf); - hid_t arma_H5Dget_space(hid_t dataset_id); - herr_t arma_H5Dread(hid_t dataset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t xfer_plist_id, void* buf); - - int arma_H5Sget_simple_extent_ndims(hid_t space_id); - int arma_H5Sget_simple_extent_dims(hid_t space_id, hsize_t* dims, hsize_t* maxdims); - herr_t arma_H5Sclose(hid_t space_id); - hid_t arma_H5Screate_simple(int rank, const hsize_t* current_dims, const hsize_t* maximum_dims); - - herr_t arma_H5Ovisit(hid_t object_id, H5_index_t index_type, H5_iter_order_t order, H5O_iterate_t op, void* op_data); - - herr_t arma_H5Eset_auto(hid_t estack_id, H5E_auto_t func, void* client_data); - herr_t arma_H5Eget_auto(hid_t estack_id, H5E_auto_t* func, void** client_data); - - hid_t arma_H5Fopen(const char* name, unsigned flags, hid_t fapl_id); - hid_t arma_H5Fcreate(const char* name, unsigned flags, hid_t fcpl_id, hid_t fapl_id); - herr_t arma_H5Fclose(hid_t file_id); - htri_t arma_H5Fis_hdf5(const char* name); - - hid_t arma_H5Gcreate(hid_t loc_id, const char* name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id); - hid_t arma_H5Gopen(hid_t loc_id, const char* name, hid_t gapl_id); - herr_t arma_H5Gclose(hid_t group_id); - - htri_t arma_H5Lexists(hid_t loc_id, const char* name, hid_t lapl_id); - herr_t arma_H5Ldelete(hid_t loc_id, const char* name, hid_t lapl_id); - - // Wrapper variables that represent the hid_t values for the H5T_NATIVE_* - // types. Note that H5T_NATIVE_UCHAR itself is a macro that resolves to about - // forty other macros, and we definitely don't want to hijack those, - // so this is the best way to go about wrapping these... - extern hid_t arma_H5T_NATIVE_UCHAR; - extern hid_t arma_H5T_NATIVE_CHAR; - extern hid_t arma_H5T_NATIVE_SHORT; - extern hid_t arma_H5T_NATIVE_USHORT; - extern hid_t arma_H5T_NATIVE_INT; - extern hid_t arma_H5T_NATIVE_UINT; - extern hid_t arma_H5T_NATIVE_LONG; - extern hid_t arma_H5T_NATIVE_ULONG; - extern hid_t arma_H5T_NATIVE_LLONG; - extern hid_t arma_H5T_NATIVE_ULLONG; - extern hid_t arma_H5T_NATIVE_FLOAT; - extern hid_t arma_H5T_NATIVE_DOUBLE; - - } - - // Lastly, we have to hijack H5open() and H5check_version(), which are called - // by some expanded macros of the other H5* functions. This means we can't - // create arma_H5open(), because we can't modify those macros. Instead, we'll - // create arma::H5open() and arma::H5check_version(), and then issue a using - // directive so that arma::H5open() and arma::H5check_version() are always - // called. - // - // There is potential danger in the use of a using directive like this, but in - // this case, I can't think of a better way to solve the problem, and I doubt - // this will cause problems in any situations that aren't truly bizarre. And - // if it does cause problems, the user can #define ARMA_DONT_USE_WRAPPER or - // #undef ARMA_USE_WRAPPER in their Armadillo configuration. - herr_t H5open(); - herr_t H5check_version(unsigned majnum, unsigned minnum, unsigned relnum); - - using arma::H5open; - using arma::H5check_version; - -#endif - -#endif +// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au) +// Copyright 2008-2016 National ICT Australia (NICTA) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ------------------------------------------------------------------------ + + +#if defined(ARMA_USE_HDF5) + +#if !defined(ARMA_USE_HDF5_ALT) + + // macros needed if the wrapper run-time library is not being used + + #define arma_H5Tcopy H5Tcopy + #define arma_H5Tcreate H5Tcreate + #define arma_H5Tinsert H5Tinsert + #define arma_H5Tequal H5Tequal + #define arma_H5Tclose H5Tclose + + #define arma_H5Dopen H5Dopen + #define arma_H5Dget_type H5Dget_type + #define arma_H5Dclose H5Dclose + #define arma_H5Dwrite H5Dwrite + #define arma_H5Dget_space H5Dget_space + #define arma_H5Dread H5Dread + #define arma_H5Dcreate H5Dcreate + + #define arma_H5Sget_simple_extent_ndims H5Sget_simple_extent_ndims + #define arma_H5Sget_simple_extent_dims H5Sget_simple_extent_dims + #define arma_H5Sclose H5Sclose + #define arma_H5Screate_simple H5Screate_simple + + #define arma_H5Ovisit H5Ovisit + + #define arma_H5Eset_auto H5Eset_auto + #define arma_H5Eget_auto H5Eget_auto + + #define arma_H5Fopen H5Fopen + #define arma_H5Fcreate H5Fcreate + #define arma_H5Fclose H5Fclose + #define arma_H5Fis_hdf5 H5Fis_hdf5 + + #define arma_H5Gcreate H5Gcreate + #define arma_H5Gopen H5Gopen + #define arma_H5Gclose H5Gclose + + #define arma_H5Lexists H5Lexists + #define arma_H5Ldelete H5Ldelete + + #define arma_H5T_NATIVE_UCHAR H5T_NATIVE_UCHAR + #define arma_H5T_NATIVE_CHAR H5T_NATIVE_CHAR + #define arma_H5T_NATIVE_SHORT H5T_NATIVE_SHORT + #define arma_H5T_NATIVE_USHORT H5T_NATIVE_USHORT + #define arma_H5T_NATIVE_INT H5T_NATIVE_INT + #define arma_H5T_NATIVE_UINT H5T_NATIVE_UINT + #define arma_H5T_NATIVE_LONG H5T_NATIVE_LONG + #define arma_H5T_NATIVE_ULONG H5T_NATIVE_ULONG + #define arma_H5T_NATIVE_LLONG H5T_NATIVE_LLONG + #define arma_H5T_NATIVE_ULLONG H5T_NATIVE_ULLONG + #define arma_H5T_NATIVE_FLOAT H5T_NATIVE_FLOAT + #define arma_H5T_NATIVE_DOUBLE H5T_NATIVE_DOUBLE + +#else + +// prototypes for the wrapper functions defined in the wrapper run-time library (src/wrapper.cpp) + +extern "C" + { + // Wrapper functions for H5* functions. + hid_t arma_H5Tcopy(hid_t dtype_id); + hid_t arma_H5Tcreate(H5T_class_t cl, size_t size); + herr_t arma_H5Tinsert(hid_t dtype_id, const char* name, size_t offset, hid_t field_id); + htri_t arma_H5Tequal(hid_t dtype_id1, hid_t dtype_id2); + herr_t arma_H5Tclose(hid_t dtype_id); + + hid_t arma_H5Dopen(hid_t loc_id, const char* name, hid_t dapl_id); + hid_t arma_H5Dget_type(hid_t dataset_id); + herr_t arma_H5Dclose(hid_t dataset_id); + hid_t arma_H5Dcreate(hid_t loc_id, const char* name, hid_t dtype_id, hid_t space_id, hid_t lcpl_id, hid_t dcpl_id, hid_t dapl_id); + herr_t arma_H5Dwrite(hid_t dataset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t xfer_plist_id, const void* buf); + hid_t arma_H5Dget_space(hid_t dataset_id); + herr_t arma_H5Dread(hid_t dataset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t xfer_plist_id, void* buf); + + int arma_H5Sget_simple_extent_ndims(hid_t space_id); + int arma_H5Sget_simple_extent_dims(hid_t space_id, hsize_t* dims, hsize_t* maxdims); + herr_t arma_H5Sclose(hid_t space_id); + hid_t arma_H5Screate_simple(int rank, const hsize_t* current_dims, const hsize_t* maximum_dims); + + herr_t arma_H5Ovisit(hid_t object_id, H5_index_t index_type, H5_iter_order_t order, H5O_iterate_t op, void* op_data); + + herr_t arma_H5Eset_auto(hid_t estack_id, H5E_auto_t func, void* client_data); + herr_t arma_H5Eget_auto(hid_t estack_id, H5E_auto_t* func, void** client_data); + + hid_t arma_H5Fopen(const char* name, unsigned flags, hid_t fapl_id); + hid_t arma_H5Fcreate(const char* name, unsigned flags, hid_t fcpl_id, hid_t fapl_id); + herr_t arma_H5Fclose(hid_t file_id); + htri_t arma_H5Fis_hdf5(const char* name); + + hid_t arma_H5Gcreate(hid_t loc_id, const char* name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id); + hid_t arma_H5Gopen(hid_t loc_id, const char* name, hid_t gapl_id); + herr_t arma_H5Gclose(hid_t group_id); + + htri_t arma_H5Lexists(hid_t loc_id, const char* name, hid_t lapl_id); + herr_t arma_H5Ldelete(hid_t loc_id, const char* name, hid_t lapl_id); + + // Wrapper variables that represent the hid_t values for the H5T_NATIVE_* + // types. Note that H5T_NATIVE_UCHAR itself is a macro that resolves to about + // forty other macros, and we definitely don't want to hijack those, + // so this is the best way to go about wrapping these... + extern hid_t arma_H5T_NATIVE_UCHAR; + extern hid_t arma_H5T_NATIVE_CHAR; + extern hid_t arma_H5T_NATIVE_SHORT; + extern hid_t arma_H5T_NATIVE_USHORT; + extern hid_t arma_H5T_NATIVE_INT; + extern hid_t arma_H5T_NATIVE_UINT; + extern hid_t arma_H5T_NATIVE_LONG; + extern hid_t arma_H5T_NATIVE_ULONG; + extern hid_t arma_H5T_NATIVE_LLONG; + extern hid_t arma_H5T_NATIVE_ULLONG; + extern hid_t arma_H5T_NATIVE_FLOAT; + extern hid_t arma_H5T_NATIVE_DOUBLE; + + } + + // Lastly, we have to hijack H5open() and H5check_version(), which are called + // by some expanded macros of the other H5* functions. This means we can't + // create arma_H5open(), because we can't modify those macros. Instead, we'll + // create arma::H5open() and arma::H5check_version(), and then issue a using + // directive so that arma::H5open() and arma::H5check_version() are always + // called. + // + // There is potential danger in the use of a using directive like this, but in + // this case, I can't think of a better way to solve the problem, and I doubt + // this will cause problems in any situations that aren't truly bizarre. And + // if it does cause problems, the user can #define ARMA_DONT_USE_WRAPPER or + // #undef ARMA_USE_WRAPPER in their Armadillo configuration. + herr_t H5open(); + herr_t H5check_version(unsigned majnum, unsigned minnum, unsigned relnum); + + using arma::H5open; + using arma::H5check_version; + +#endif + +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/armadillo-9.200.7/include/armadillo_bits/fn_spsolve.hpp new/armadillo-9.200.8/include/armadillo_bits/fn_spsolve.hpp --- old/armadillo-9.200.7/include/armadillo_bits/fn_spsolve.hpp 2016-06-16 18:19:17.000000000 +0200 +++ new/armadillo-9.200.8/include/armadillo_bits/fn_spsolve.hpp 2016-06-16 18:19:18.000000000 +0200 @@ -1,194 +1,194 @@ -// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au) -// Copyright 2008-2016 National ICT Australia (NICTA) -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ------------------------------------------------------------------------ - - -//! \addtogroup fn_spsolve -//! @{ - -//! Solve a system of linear equations, i.e., A*X = B, where X is unknown, -//! A is sparse, and B is dense. X will be dense too. - -template<typename T1, typename T2> -inline -bool -spsolve_helper - ( - Mat<typename T1::elem_type>& out, - const SpBase<typename T1::elem_type, T1>& A, - const Base<typename T1::elem_type, T2>& B, - const char* solver, - const spsolve_opts_base& settings, - const typename arma_blas_type_only<typename T1::elem_type>::result* junk = 0 - ) - { - arma_extra_debug_sigprint(); - arma_ignore(junk); - - typedef typename T1::pod_type T; - typedef typename T1::elem_type eT; - - const char sig = (solver != NULL) ? solver[0] : char(0); - - arma_debug_check( ((sig != 'l') && (sig != 's')), "spsolve(): unknown solver" ); - - T rcond = T(0); - - bool status = false; - - superlu_opts superlu_opts_default; - - if(is_float <T>::value) { superlu_opts_default.refine = superlu_opts::REF_SINGLE; } - if(is_double<T>::value) { superlu_opts_default.refine = superlu_opts::REF_DOUBLE; } - - const superlu_opts& opts = (settings.id == 1) ? static_cast<const superlu_opts&>(settings) : superlu_opts_default; - - arma_debug_check( ( (opts.pivot_thresh < double(0)) || (opts.pivot_thresh > double(1)) ), "spsolve(): pivot_thresh out of bounds" ); - - if(sig == 's') // SuperLU solver - { - if( (opts.equilibrate == false) && (opts.refine == superlu_opts::REF_NONE) ) - { - status = sp_auxlib::spsolve_simple(out, A.get_ref(), B.get_ref(), opts); - } - else - { - status = sp_auxlib::spsolve_refine(out, rcond, A.get_ref(), B.get_ref(), opts); - } - } - else - if(sig == 'l') // brutal LAPACK solver - { - if( (settings.id != 0) && ((opts.symmetric) || (opts.pivot_thresh != double(1.0))) ) - { - arma_debug_warn("spsolve(): ignoring settings not applicable to LAPACK based solver"); - } - - Mat<eT> AA; - - bool conversion_ok = false; - - try - { - Mat<eT> tmp(A.get_ref()); // conversion from sparse to dense can throw std::bad_alloc - - AA.steal_mem(tmp); - - conversion_ok = true; - } - catch(std::bad_alloc&) - { - arma_debug_warn("spsolve(): not enough memory to use LAPACK based solver"); - } - - if(conversion_ok) - { - arma_debug_check( (AA.n_rows != AA.n_cols), "spsolve(): matrix A must be square sized" ); - - uword flags = solve_opts::flag_none; - - if( (opts.equilibrate == false) && (opts.refine == superlu_opts::REF_NONE) ) - { - flags |= solve_opts::flag_fast; - } - else - if(opts.equilibrate == true) - { - flags |= solve_opts::flag_equilibrate; - } - - if(opts.allow_ugly == true) - { - flags |= solve_opts::flag_allow_ugly; - } - - status = glue_solve_gen::apply(out, AA, B.get_ref(), flags); - } - } - - - if(status == false) - { - if(rcond > T(0)) { arma_debug_warn("spsolve(): system seems singular (rcond: ", rcond, ")"); } - else { arma_debug_warn("spsolve(): system seems singular"); } - - out.soft_reset(); - } - - if( (status == true) && (rcond > T(0)) && (rcond <= (T(0.5)*std::numeric_limits<T>::epsilon())) ) - { - arma_debug_warn("solve(): solution computed, but system seems singular to working precision (rcond: ", rcond, ")"); - } - - return status; - } - - - -template<typename T1, typename T2> -inline -bool -spsolve - ( - Mat<typename T1::elem_type>& out, - const SpBase<typename T1::elem_type, T1>& A, - const Base<typename T1::elem_type, T2>& B, - const char* solver = "superlu", - const spsolve_opts_base& settings = spsolve_opts_none(), - const typename arma_blas_type_only<typename T1::elem_type>::result* junk = 0 - ) - { - arma_extra_debug_sigprint(); - arma_ignore(junk); - - const bool status = spsolve_helper(out, A.get_ref(), B.get_ref(), solver, settings); - - return status; - } - - - -template<typename T1, typename T2> -arma_warn_unused -inline -Mat<typename T1::elem_type> -spsolve - ( - const SpBase<typename T1::elem_type, T1>& A, - const Base<typename T1::elem_type, T2>& B, - const char* solver = "superlu", - const spsolve_opts_base& settings = spsolve_opts_none(), - const typename arma_blas_type_only<typename T1::elem_type>::result* junk = 0 - ) - { - arma_extra_debug_sigprint(); - arma_ignore(junk); - - typedef typename T1::elem_type eT; - - Mat<eT> out; - - const bool status = spsolve_helper(out, A.get_ref(), B.get_ref(), solver, settings); - - if(status == false) - { - arma_stop_runtime_error("spsolve(): solution not found"); - } - - return out; - } - - - -//! @} +// Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au) +// Copyright 2008-2016 National ICT Australia (NICTA) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ------------------------------------------------------------------------ + + +//! \addtogroup fn_spsolve +//! @{ + +//! Solve a system of linear equations, i.e., A*X = B, where X is unknown, +//! A is sparse, and B is dense. X will be dense too. + +template<typename T1, typename T2> +inline +bool +spsolve_helper + ( + Mat<typename T1::elem_type>& out, + const SpBase<typename T1::elem_type, T1>& A, + const Base<typename T1::elem_type, T2>& B, + const char* solver, + const spsolve_opts_base& settings, + const typename arma_blas_type_only<typename T1::elem_type>::result* junk = 0 + ) + { + arma_extra_debug_sigprint(); + arma_ignore(junk); + + typedef typename T1::pod_type T; + typedef typename T1::elem_type eT; + + const char sig = (solver != NULL) ? solver[0] : char(0); + + arma_debug_check( ((sig != 'l') && (sig != 's')), "spsolve(): unknown solver" ); + + T rcond = T(0); + + bool status = false; + + superlu_opts superlu_opts_default; + + if(is_float <T>::value) { superlu_opts_default.refine = superlu_opts::REF_SINGLE; } + if(is_double<T>::value) { superlu_opts_default.refine = superlu_opts::REF_DOUBLE; } + + const superlu_opts& opts = (settings.id == 1) ? static_cast<const superlu_opts&>(settings) : superlu_opts_default; + + arma_debug_check( ( (opts.pivot_thresh < double(0)) || (opts.pivot_thresh > double(1)) ), "spsolve(): pivot_thresh out of bounds" ); + + if(sig == 's') // SuperLU solver + { + if( (opts.equilibrate == false) && (opts.refine == superlu_opts::REF_NONE) ) + { + status = sp_auxlib::spsolve_simple(out, A.get_ref(), B.get_ref(), opts); + } + else + { + status = sp_auxlib::spsolve_refine(out, rcond, A.get_ref(), B.get_ref(), opts); + } + } + else + if(sig == 'l') // brutal LAPACK solver + { + if( (settings.id != 0) && ((opts.symmetric) || (opts.pivot_thresh != double(1.0))) ) + { + arma_debug_warn("spsolve(): ignoring settings not applicable to LAPACK based solver"); + } + + Mat<eT> AA; + + bool conversion_ok = false; + + try + { + Mat<eT> tmp(A.get_ref()); // conversion from sparse to dense can throw std::bad_alloc + + AA.steal_mem(tmp); + + conversion_ok = true; + } + catch(std::bad_alloc&) + { + arma_debug_warn("spsolve(): not enough memory to use LAPACK based solver"); + } + + if(conversion_ok) + { + arma_debug_check( (AA.n_rows != AA.n_cols), "spsolve(): matrix A must be square sized" ); + + uword flags = solve_opts::flag_none; + + if( (opts.equilibrate == false) && (opts.refine == superlu_opts::REF_NONE) ) + { + flags |= solve_opts::flag_fast; + } + else + if(opts.equilibrate == true) + { + flags |= solve_opts::flag_equilibrate; + } + + if(opts.allow_ugly == true) + { + flags |= solve_opts::flag_allow_ugly; + } + + status = glue_solve_gen::apply(out, AA, B.get_ref(), flags); + } + } + + + if(status == false) + { + if(rcond > T(0)) { arma_debug_warn("spsolve(): system seems singular (rcond: ", rcond, ")"); } + else { arma_debug_warn("spsolve(): system seems singular"); } + + out.soft_reset(); + } + + if( (status == true) && (rcond > T(0)) && (rcond <= (T(0.5)*std::numeric_limits<T>::epsilon())) ) + { + arma_debug_warn("solve(): solution computed, but system seems singular to working precision (rcond: ", rcond, ")"); + } + + return status; + } + + + +template<typename T1, typename T2> +inline +bool +spsolve + ( + Mat<typename T1::elem_type>& out, + const SpBase<typename T1::elem_type, T1>& A, + const Base<typename T1::elem_type, T2>& B, + const char* solver = "superlu", + const spsolve_opts_base& settings = spsolve_opts_none(), + const typename arma_blas_type_only<typename T1::elem_type>::result* junk = 0 + ) + { + arma_extra_debug_sigprint(); + arma_ignore(junk); + + const bool status = spsolve_helper(out, A.get_ref(), B.get_ref(), solver, settings); + + return status; + } + + + +template<typename T1, typename T2> +arma_warn_unused +inline +Mat<typename T1::elem_type> +spsolve + ( + const SpBase<typename T1::elem_type, T1>& A, + const Base<typename T1::elem_type, T2>& B, + const char* solver = "superlu", + const spsolve_opts_base& settings = spsolve_opts_none(), + const typename arma_blas_type_only<typename T1::elem_type>::result* junk = 0 + ) + { + arma_extra_debug_sigprint(); + arma_ignore(junk); + + typedef typename T1::elem_type eT; + + Mat<eT> out; + + const bool status = spsolve_helper(out, A.get_ref(), B.get_ref(), solver, settings); + + if(status == false) + { + arma_stop_runtime_error("spsolve(): solution not found"); + } + + return out; + } + + + +//! @} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/armadillo-9.200.7/include/armadillo_bits/op_wishrnd_meat.hpp new/armadillo-9.200.8/include/armadillo_bits/op_wishrnd_meat.hpp --- old/armadillo-9.200.7/include/armadillo_bits/op_wishrnd_meat.hpp 2016-06-16 18:19:17.000000000 +0200 +++ new/armadillo-9.200.8/include/armadillo_bits/op_wishrnd_meat.hpp 2016-06-16 18:19:18.000000000 +0200 @@ -142,17 +142,16 @@ A.at(i,i) = std::sqrt( chi2rnd_generator(df - eT(i)) ); } - const uword Nm1 = N-1; - for(uword i=0; i < Nm1; ++i) + for(uword i=1; i < N; ++i) { - arma_rng::randn<eT>::fill( &(A.at(i+1,i)), Nm1-i ); + arma_rng::randn<eT>::fill( A.colptr(i), i ); } - const Mat<eT> B = D * A; + const Mat<eT> tmp = A * D; A.reset(); - out = B * B.t(); + out = tmp.t() * tmp; } return true; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/armadillo-9.200.7/include/armadillo_bits/span.hpp new/armadillo-9.200.8/include/armadillo_bits/span.hpp --- old/armadillo-9.200.7/include/armadillo_bits/span.hpp 2016-06-16 18:19:17.000000000 +0200 +++ new/armadillo-9.200.8/include/armadillo_bits/span.hpp 2016-06-16 18:19:18.000000000 +0200 @@ -22,7 +22,7 @@ struct span_alt {}; -template<typename Dummy = int> +template<typename junk = int> class span_base { public: @@ -30,8 +30,8 @@ }; -template<typename Dummy> -const span_alt span_base<Dummy>::all = span_alt(); +template<typename junk> +const span_alt span_base<junk>::all = span_alt(); class span : public span_base<> @@ -44,14 +44,18 @@ inline span() - : whole(true) + : a(0) + , b(0) + , whole(true) { } inline span(const span_alt&) - : whole(true) + : a(0) + , b(0) + , whole(true) { }