diff --git a/external/cosmotool/.gitignore b/external/cosmotool/.gitignore index c248456..9e4c862 100644 --- a/external/cosmotool/.gitignore +++ b/external/cosmotool/.gitignore @@ -1,3 +1,8 @@ *~ *.o *.prog +*.pyc +*.png +*.dat +ic_* +*.h5 diff --git a/external/cosmotool/CMakeLists.txt b/external/cosmotool/CMakeLists.txt index 6c0ab9b..e1d4318 100644 --- a/external/cosmotool/CMakeLists.txt +++ b/external/cosmotool/CMakeLists.txt @@ -1,92 +1,85 @@ -cmake_minimum_required(VERSION 2.6) -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}") +cmake_minimum_required(VERSION 3.6) +set(CMAKE_CXX_STANDARD 11) +list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}") project(CosmoToolbox) include(GetGitRevisionDescription) include(ExternalProject) -include(FindOpenMP) - -get_git_head_revision(HEAD GIT_VER) +include(FindPkgConfig) +include(FindPackageHandleStandardArgs) +include(color_msg) option(BUILD_SHARED_LIBS "Build shared libraries." OFF) option(BUILD_STATIC_LIBS "Build static libraries." ON) -option(ENABLE_OPENMP "Enable OpenMP support." OFF) -option(ENABLE_SHARP "Enable SPHT support." ON) +option(ENABLE_SHARP "Enable SHARP support." ON) +option(INTERNAL_HDF5 "Build internal version of HDF5" OFF) +option(INTERNAL_EIGEN "Build internal version of Eigen" ON) +option(INTERNAL_NETCDF "Build internal version of NETCDF" OFF) +option(INTERNAL_BOOST "Build internal version of BOOST" OFF) +option(USE_GIT_VERSION "Use GIT version to pad version number" OFF) +option(YORICK_SUPPORT "Add for pleasant yorick support" ON) +option(BUILD_PYTHON "Build the python modules" ON) +IF(USE_GIT_VERSION) + get_git_head_revision(HEAD GIT_VER) + SET(EXTRA_VERSION "-${GIT_VER}") +ENDIF(USE_GIT_VERSION) -find_path(NETCDF_INCLUDE_PATH NAMES netcdf.h) -find_path(NETCDFCPP_INCLUDE_PATH NAMES netcdfcpp.h netcdf) -find_path(GSL_INCLUDE_PATH NAMES gsl/gsl_blas.h) +IF(BUILD_PYTHON) + include(FindPythonInterp) + set(NumPy_FIND_REQUIRED TRUE) + include(${CMAKE_SOURCE_DIR}/FindPyLibs.cmake) + include(${CMAKE_SOURCE_DIR}/FindNumPy.cmake) +ENDIF(BUILD_PYTHON) -IF(EXISTS ${NETCDFCPP_INCLUDE_PATH}/netcdf) - SET(FOUND_NETCDF4 1) - FILE(WRITE ${CMAKE_BINARY_DIR}/src/ctool_netcdf_ver.hpp "#define NETCDFCPP4 1") -ELSE(EXISTS ${NETCDFCPP_INCLUDE_PATH}/netcdf) - SET(FOUND_NETCDF3 1) - FILE(WRITE ${CMAKE_BINARY_DIR}/src/ctool_netcdf_ver.hpp "#undef NETCDFCPP4") -ENDIF(EXISTS ${NETCDFCPP_INCLUDE_PATH}/netcdf) -find_library(NETCDF_LIBRARY netcdf) -find_library(NETCDFCPP_LIBRARY NAMES netcdf_c++ netcdf_c++4) -find_library(GSL_LIBRARY gsl) -find_library(GSLCBLAS_LIBRARY gslcblas) +#IF(NOT BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS) +# SET(CosmoTool_local CosmoTool_static) +#ELSE(NOT BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS) + SET(CosmoTool_local CosmoTool) +#ENDIF(NOT BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS) + +MESSAGE(STATUS "Using the target ${CosmoTool_local} to build python module") + +include(${CMAKE_SOURCE_DIR}/external/external_build.cmake) + +IF(YORICK_SUPPORT) + IF((EXISTS ${NETCDFCPP_INCLUDE_PATH}/netcdf AND ${NETCDFCPP_LIBRARY} MATCHES "netcdf_c\\+\\+4") OR (INTERNAL_NETCDF)) + SET(FOUND_NETCDF4 1) + FILE(WRITE ${CMAKE_BINARY_DIR}/src/ctool_netcdf_ver.hpp "#define NETCDFCPP4 1") + ELSE((EXISTS ${NETCDFCPP_INCLUDE_PATH}/netcdf AND ${NETCDFCPP_LIBRARY} MATCHES "netcdf_c\\+\\+4") OR (INTERNAL_NETCDF)) + SET(FOUND_NETCDF3 1) + FILE(WRITE ${CMAKE_BINARY_DIR}/src/ctool_netcdf_ver.hpp "#undef NETCDFCPP4") + ENDIF((EXISTS ${NETCDFCPP_INCLUDE_PATH}/netcdf AND ${NETCDFCPP_LIBRARY} MATCHES "netcdf_c\\+\\+4") OR (INTERNAL_NETCDF)) +ENDIF(YORICK_SUPPORT) + +find_program(CYTHON cython3 cython) find_library(ZLIB z) -find_library(LDLIB dl) +find_library(DL_LIBRARY dl) +find_library(MATH_LIBRARY m) -if (ENABLE_SHARP) - SET(SHARP_SOURCE ${CMAKE_SOURCE_DIR}/external/sharp) - SET(DEP_BUILD ${CMAKE_SOURCE_DIR}/external/sharp/auto) - ExternalProject_Add(sharp - SOURCE_DIR ${SHARP_SOURCE} - BUILD_IN_SOURCE 1 - CONFIGURE_COMMAND ${SHARP_SOURCE}/configure --prefix=${DEP_BUILD} - BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} - INSTALL_COMMAND echo "No install" - ) - SET(SHARP_LIBRARY ${DEP_BUILD}/lib/libsharp.a) - SET(SHARP_LIBRARIES ${SHARP_LIBRARY}) - SET(SHARP_INCLUDE_PATH ${DEP_BUILD}/include) -endif (ENABLE_SHARP) - - -find_package(Boost 1.53) -message("INC DIRS: ${Boost_INCLUDE_DIRS}") -mark_as_advanced(Boost_INCLUDE_DIRS Boost_LIBRARIES) - - -if(HDF5_ROOTDIR) - SET(ENV{HDF5_ROOT} ${HDF5_ROOTDIR}) -endif(HDF5_ROOTDIR) -find_package(HDF5 REQUIRED COMPONENTS HL CXX) - -include(FindPkgConfig) - -pkg_check_modules(FFTW3 fftw3>=3.3) -pkg_check_modules(FFTW3F fftw3f>=3.3) -pkg_check_modules(EIGEN3 eigen3) - -include(FindPackageHandleStandardArgs) -set(NETCDF_FIND_REQUIRED TRUE) +set(NETCDF_FIND_REQUIRED ${YORICK_SUPPORT}) set(GSL_FIND_REQUIRED TRUE) FIND_PACKAGE_HANDLE_STANDARD_ARGS(NetCDF DEFAULT_MSG NETCDF_LIBRARY NETCDFCPP_LIBRARY NETCDF_INCLUDE_PATH) FIND_PACKAGE_HANDLE_STANDARD_ARGS(GSL DEFAULT_MSG GSL_LIBRARY GSLCBLAS_LIBRARY GSL_INCLUDE_PATH) -set(GSL_LIBRARIES ${GSL_LIBRARY} ${GSLCBLAS_LIBRARY}) - # CPACK Configuration SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A toolbox for impatient cosmologists") SET(CPACK_PACKAGE_VENDOR "Guilhem Lavaux") SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENCE_CeCILL_V2") SET(CPACK_PACKAGE_VERSION_MAJOR "1") SET(CPACK_PACKAGE_VERSION_MINOR "0") -SET(CPACK_PACKAGE_VERSION_PATCH "0-${GIT_VER}") -SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CosmoToolbox-${GalaxExplorer_VERSION_MAJOR}.${GalaxExplorer_VERSION_MINOR}") +SET(CPACK_PACKAGE_VERSION_PATCH "0${EXTRA_VERSION}") +SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CosmoToolbox-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}") SET(CPACK_STRIP_FILES "lib/libCosmoTool.so") SET(CPACK_SOURCE_IGNORE_FILES "/CVS/;/\\\\.git/;/\\\\.svn/;\\\\.swp$;\\\\.#;/#;.*~;cscope.*;/CMakeFiles/;.*\\\\.cmake;Makefile") add_subdirectory(src) add_subdirectory(sample) +if(BUILD_PYTHON) + add_subdirectory(python) +endif(BUILD_PYTHON) include(CPack) diff --git a/external/cosmotool/build_tools/gather_sources.py b/external/cosmotool/build_tools/gather_sources.py index ca8c3d1..d3008a4 100644 --- a/external/cosmotool/build_tools/gather_sources.py +++ b/external/cosmotool/build_tools/gather_sources.py @@ -1,5 +1,5 @@ #+ -# This is CosmoTool (./build_tools/gather_sources.py) -- Copyright (C) Guilhem Lavaux (2007-2013) +# This is CosmoTool (./build_tools/gather_sources.py) -- Copyright (C) Guilhem Lavaux (2007-2014) # # guilhem.lavaux@gmail.com # @@ -55,7 +55,7 @@ def apply_license(license, relimit, filename): def apply_python_license(filename): license="""#+ -# This is CosmoTool (@FILENAME@) -- Copyright (C) Guilhem Lavaux (2007-2013) +# This is CosmoTool (@FILENAME@) -- Copyright (C) Guilhem Lavaux (2007-2014) # # guilhem.lavaux@gmail.com # @@ -97,7 +97,7 @@ def apply_python_license(filename): def apply_cpp_license(filename): license="""/*+ -This is CosmoTool (@FILENAME@) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (@FILENAME@) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com @@ -131,16 +131,19 @@ The fact that you are presently reading this means that you have had knowledge of the CeCILL license and that you accept its terms. +*/ """ - relimit = r'^(?s)/\*\+.*\+\*/' + relimit = r'^(?s)/\*\+.*\+\*/\n' print("C++ file: %s" % filename) apply_license(license, relimit, filename) def analyze_tree(prefix, t): - for ename,entry in t.items(): + for entry in t: + ename = entry.name if ename == 'external' or ename == 'zobov': continue - if type(entry) == Tree: + if type(entry) == Submodule: + continue + elif type(entry) == Tree: analyze_tree(prefix + "/" + ename, entry) elif type(entry) == Blob: if ename == './src/hdf5_flash.h' or ename == './src/h5_readFlash.cpp' or ename == './src/h5_readFlash.hpp': diff --git a/external/cosmotool/external/sharp/COPYING b/external/cosmotool/external/sharp/COPYING deleted file mode 100644 index d159169..0000000 --- a/external/cosmotool/external/sharp/COPYING +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/external/cosmotool/external/sharp/Makefile b/external/cosmotool/external/sharp/Makefile deleted file mode 100644 index 70d457c..0000000 --- a/external/cosmotool/external/sharp/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -SHARP_TARGET?=auto -ifndef SHARP_TARGET - SHARP_TARGET:=$(error SHARP_TARGET undefined. Please see README.compilation for help)UNDEFINED -endif - -default: compile_all -SRCROOT:=$(shell pwd) -include $(SRCROOT)/config/config.$(SHARP_TARGET) -include $(SRCROOT)/config/rules.common - -all_hdr:= -all_lib:= -all_cbin:= - -FULL_INCLUDE:= - -include c_utils/planck.make -include libfftpack/planck.make -include libsharp/planck.make -include docsrc/planck.make - -$(all_lib): %: | $(LIBDIR)_mkdir - @echo "# creating library $*" - $(ARCREATE) $@ $^ - -$(all_cbin): %: | $(BINDIR)_mkdir - @echo "# linking C binary $*" - $(CL) -o $@ $^ $(CLFLAGS) - -compile_all: $(all_cbin) hdrcopy - -hdrclean: - @if [ -d $(INCDIR) ]; then rm -rf $(INCDIR)/* ; fi - -hdrcopy: | $(INCDIR)_mkdir - @if [ "$(all_hdr)" ]; then cp -p $(all_hdr) $(INCDIR); fi - -$(notdir $(all_cbin)) : % : $(BINDIR)/% - -test: compile_all - $(BINDIR)/sharp_acctest && \ - $(BINDIR)/sharp_test healpix 2048 1024 1 0 1 && \ - $(BINDIR)/sharp_test ecp 2047 4096 0 2 1 && \ - $(BINDIR)/sharp_test gauss 2047 4096 0 0 2 - -perftest: compile_all - $(BINDIR)/sharp_test healpix 2048 1024 0 0 1 && \ - $(BINDIR)/sharp_test gauss 63 128 0 0 1 && \ - $(BINDIR)/sharp_test gauss 127 256 0 0 1 && \ - $(BINDIR)/sharp_test gauss 255 512 0 0 1 && \ - $(BINDIR)/sharp_test gauss 511 1024 0 0 1 && \ - $(BINDIR)/sharp_test gauss 1023 2048 0 0 1 && \ - $(BINDIR)/sharp_test gauss 2047 4096 0 0 1 && \ - $(BINDIR)/sharp_test gauss 4095 8192 0 0 1 && \ - $(BINDIR)/sharp_test gauss 8191 16384 0 0 1 diff --git a/external/cosmotool/external/sharp/README.compilation b/external/cosmotool/external/sharp/README.compilation deleted file mode 100644 index 8a8dfca..0000000 --- a/external/cosmotool/external/sharp/README.compilation +++ /dev/null @@ -1,13 +0,0 @@ -GNU make and GNU gcc (version 4.x) are required for compilation. - -Simply run "./configure"; if this fails, please refer to the output of -"./configure --help" for additional hints and, if necessary, provide -additional flags to the configure script. -Once the script finishes successfully, run "make" -(or "gmake"). This should install the compilation products in the -subdirectory "auto/". - -Documentation can be created by the command "(g)make doc". -However this requires the doxygen application to be installed -on your system. -The documentation will be created in the subdirectory doc/. diff --git a/external/cosmotool/external/sharp/autom4te.cache/output.0 b/external/cosmotool/external/sharp/autom4te.cache/output.0 deleted file mode 100644 index 278cf45..0000000 --- a/external/cosmotool/external/sharp/autom4te.cache/output.0 +++ /dev/null @@ -1,3974 +0,0 @@ -@%:@! /bin/sh -@%:@ Guess values for system-dependent variables and create Makefiles. -@%:@ Generated by GNU Autoconf 2.68. -@%:@ -@%:@ -@%:@ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -@%:@ 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -@%:@ Foundation, Inc. -@%:@ -@%:@ -@%:@ This configure script is free software; the Free Software Foundation -@%:@ gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in @%:@( - *posix*) : - set -o posix ;; @%:@( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in @%:@( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in @%:@(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in @%:@( - *posix*) : - set -o posix ;; @%:@( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in @%:@( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in @%:@ (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -@%:@ as_fn_unset VAR -@%:@ --------------- -@%:@ Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -@%:@ as_fn_set_status STATUS -@%:@ ----------------------- -@%:@ Set @S|@? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} @%:@ as_fn_set_status - -@%:@ as_fn_exit STATUS -@%:@ ----------------- -@%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} @%:@ as_fn_exit - -@%:@ as_fn_mkdir_p -@%:@ ------------- -@%:@ Create "@S|@as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} @%:@ as_fn_mkdir_p -@%:@ as_fn_append VAR VALUE -@%:@ ---------------------- -@%:@ Append the text in VALUE to the end of the definition contained in VAR. Take -@%:@ advantage of any shell optimizations that allow amortized linear growth over -@%:@ repeated appends, instead of the typical quadratic growth present in naive -@%:@ implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -@%:@ as_fn_arith ARG... -@%:@ ------------------ -@%:@ Perform arithmetic evaluation on the ARGs, and store the result in the -@%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments -@%:@ must be portable across @S|@(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -@%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] -@%:@ ---------------------------------------- -@%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are -@%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the -@%:@ script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} @%:@ as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in @%:@((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in @%:@( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in @%:@(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIB@&t@OBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= -PACKAGE_URL= - -ac_unique_file="config/config.auto.in" -ac_subst_vars='LTLIBOBJS -LIB@&t@OBJS -ARCREATE -LDCCFLAGS -CCFLAGS_NO_C -SILENT_RULE -GCCVERSION -OPENMP_CFLAGS -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -uname_found -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_openmp -enable_noisy_make -enable_mpi -enable_debug -enable_pic -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures this package to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - @<:@@S|@ac_default_prefix@:>@ - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - @<:@PREFIX@:>@ - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root @<:@DATAROOTDIR/doc/PACKAGE@:>@ - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF -_ACEOF -fi - -if test -n "$ac_init_help"; then - - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-openmp do not use OpenMP - --enable-noisy-make enable detailed make output - --enable-mpi enable generation of MPI-parallel code - --enable-debug enable generation of debugging symbols - --enable-pic enable generation of position independent code - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to the package provider. -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -configure -generated by GNU Autoconf 2.68 - -Copyright (C) 2010 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -@%:@ ac_fn_c_try_compile LINENO -@%:@ -------------------------- -@%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} @%:@ ac_fn_c_try_compile - -@%:@ ac_fn_c_try_link LINENO -@%:@ ----------------------- -@%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} @%:@ ac_fn_c_try_link -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -@%:@define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in @%:@(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -# Extract the first word of "uname", so it can be a program name with args. -set dummy uname; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_uname_found+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$uname_found"; then - ac_cv_prog_uname_found="$uname_found" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_uname_found="1" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_uname_found" && ac_cv_prog_uname_found="0" -fi -fi -uname_found=$ac_cv_prog_uname_found -if test -n "$uname_found"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $uname_found" >&5 -$as_echo "$uname_found" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -if test $uname_found -eq 0 ; then - echo "No uname found; setting system type to unknown." - system="unknown" -else - system=`uname -s`-`uname -r` -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $@%:@ != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -@%:@ifndef __INTEL_COMPILER -choke me -@%:@endif - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ICC=yes -else - ICC=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ICC = yes; then GCC=no; fi -CCTYPE=unknown -if test $GCC = yes; then CCTYPE=gcc; fi -if test $ICC = yes; then CCTYPE=icc; fi - - OPENMP_CFLAGS= - @%:@ Check whether --enable-openmp was given. -if test "${enable_openmp+set}" = set; then : - enableval=$enable_openmp; -fi - - if test "$enable_openmp" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to support OpenMP" >&5 -$as_echo_n "checking for $CC option to support OpenMP... " >&6; } -if ${ac_cv_prog_c_openmp+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifndef _OPENMP - choke me -#endif -#include -int main () { return omp_get_num_threads (); } - -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_prog_c_openmp='none needed' -else - ac_cv_prog_c_openmp='unsupported' - for ac_option in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp; do - ac_save_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS $ac_option" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifndef _OPENMP - choke me -#endif -#include -int main () { return omp_get_num_threads (); } - -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_prog_c_openmp=$ac_option -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - CFLAGS=$ac_save_CFLAGS - if test "$ac_cv_prog_c_openmp" != unsupported; then - break - fi - done -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_c_openmp" >&5 -$as_echo "$ac_cv_prog_c_openmp" >&6; } - case $ac_cv_prog_c_openmp in #( - "none needed" | unsupported) - ;; #( - *) - OPENMP_CFLAGS=$ac_cv_prog_c_openmp ;; - esac - fi - - - -SILENT_RULE=".SILENT:" -@%:@ Check whether --enable-noisy-make was given. -if test "${enable_noisy_make+set}" = set; then : - enableval=$enable_noisy_make; if test "$enableval" = yes; then - SILENT_RULE="" - fi -fi - - -ENABLE_MPI=no -@%:@ Check whether --enable-mpi was given. -if test "${enable_mpi+set}" = set; then : - enableval=$enable_mpi; if test "$enableval" = yes; then - ENABLE_MPI=yes - fi -fi - - -ENABLE_DEBUG=no -@%:@ Check whether --enable-debug was given. -if test "${enable_debug+set}" = set; then : - enableval=$enable_debug; if test "$enableval" = yes; then - ENABLE_DEBUG=yes - fi -fi - - -ENABLE_PIC=no -@%:@ Check whether --enable-pic was given. -if test "${enable_pic+set}" = set; then : - enableval=$enable_pic; if test "$enableval" = yes; then - ENABLE_PIC=yes - fi -fi - - -case $CCTYPE in - gcc) - CCFLAGS="-O3 -fno-tree-vectorize -ffast-math -fomit-frame-pointer -std=c99 -pedantic -Wextra -Wall -Wno-unknown-pragmas -Wshadow -Wmissing-prototypes -Wfatal-errors" - GCCVERSION="`$CC -dumpversion 2>&1`" - echo "Using gcc version $GCCVERSION" - - case $system in - Darwin-*) - ;; - *) - CCFLAGS="$CCFLAGS -ffunction-sections -fdata-sections" - ;; - esac - - gcc43=`echo $GCCVERSION | grep -c '4\.[3456789]'` - - if test $gcc43 -gt 0; then - CCFLAGS="$CCFLAGS -march=native" - fi - ;; - icc) - CCFLAGS="-O3 -xHOST -std=c99 -ip -Wbrief -Wall -vec-report0 -openmp-report0 -wd383,981,1419,1572" - ;; - *) - CCFLAGS="-O2" - # Don't do anything now - ;; -esac - -case $system in - Darwin-*) - ARCREATE="libtool -static -o" - ;; - *) - ARCREATE="ar cr" - ;; -esac - -CCFLAGS="$CCFLAGS $OPENMP_CFLAGS" - -if test $ENABLE_DEBUG = yes; then - CCFLAGS="$CCFLAGS -g" -fi - -if test $ENABLE_PIC = yes; then - CCFLAGS="$CCFLAGS -fPIC" -fi - -if test $ENABLE_MPI = yes; then - CCFLAGS="$CCFLAGS -DUSE_MPI" -fi - -CCFLAGS_NO_C="$CCFLAGS $CPPFLAGS" - -LDCCFLAGS="$LDFLAGS $CCFLAGS" - - - - - - - -ac_config_files="$ac_config_files config/config.auto" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -ac_script=' -:mline -/\\$/{ - N - s,\\\n,, - b mline -} -t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g -t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g -t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` - - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIB@&t@OBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in @%:@( - *posix*) : - set -o posix ;; @%:@( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in @%:@( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in @%:@(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -@%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] -@%:@ ---------------------------------------- -@%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are -@%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the -@%:@ script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} @%:@ as_fn_error - - -@%:@ as_fn_set_status STATUS -@%:@ ----------------------- -@%:@ Set @S|@? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} @%:@ as_fn_set_status - -@%:@ as_fn_exit STATUS -@%:@ ----------------- -@%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} @%:@ as_fn_exit - -@%:@ as_fn_unset VAR -@%:@ --------------- -@%:@ Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -@%:@ as_fn_append VAR VALUE -@%:@ ---------------------- -@%:@ Append the text in VALUE to the end of the definition contained in VAR. Take -@%:@ advantage of any shell optimizations that allow amortized linear growth over -@%:@ repeated appends, instead of the typical quadratic growth present in naive -@%:@ implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -@%:@ as_fn_arith ARG... -@%:@ ------------------ -@%:@ Perform arithmetic evaluation on the ARGs, and store the result in the -@%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments -@%:@ must be portable across @S|@(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in @%:@((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -@%:@ as_fn_mkdir_p -@%:@ ------------- -@%:@ Create "@S|@as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} @%:@ as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in @%:@( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in @%:@(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - -Configuration files: -$config_files - -Report bugs to the package provider." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -config.status -configured by $0, generated by GNU Autoconf 2.68, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2010 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX -@%:@@%:@ Running $as_me. @%:@@%:@ -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config/config.auto") CONFIG_FILES="$CONFIG_FILES config/config.auto" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - - -eval set X " :F $CONFIG_FILES " -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - - - - esac - -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - diff --git a/external/cosmotool/external/sharp/autom4te.cache/requests b/external/cosmotool/external/sharp/autom4te.cache/requests deleted file mode 100644 index 0208bf7..0000000 --- a/external/cosmotool/external/sharp/autom4te.cache/requests +++ /dev/null @@ -1,79 +0,0 @@ -# This file was generated by Autom4te Sun Nov 6 20:57:04 UTC 2011. -# It contains the lists of macros which have been traced. -# It can be safely removed. - -@request = ( - bless( [ - '0', - 1, - [ - '/usr/share/autoconf' - ], - [ - '/usr/share/autoconf/autoconf/autoconf.m4f', - 'configure.ac' - ], - { - 'AM_PROG_F77_C_O' => 1, - '_LT_AC_TAGCONFIG' => 1, - 'm4_pattern_forbid' => 1, - 'AC_INIT' => 1, - 'AC_CANONICAL_TARGET' => 1, - '_AM_COND_IF' => 1, - 'AC_CONFIG_LIBOBJ_DIR' => 1, - 'AC_SUBST' => 1, - 'AC_CANONICAL_HOST' => 1, - 'AC_FC_SRCEXT' => 1, - 'AC_DEFUN' => 1, - 'AC_PROG_LIBTOOL' => 1, - 'AM_INIT_AUTOMAKE' => 1, - 'AC_CONFIG_SUBDIRS' => 1, - 'AM_PATH_GUILE' => 1, - 'AM_AUTOMAKE_VERSION' => 1, - 'LT_CONFIG_LTDL_DIR' => 1, - 'AC_CONFIG_LINKS' => 1, - 'AC_REQUIRE_AUX_FILE' => 1, - 'LT_SUPPORTED_TAG' => 1, - 'm4_sinclude' => 1, - 'AM_MAINTAINER_MODE' => 1, - 'AC_DEFUN_ONCE' => 1, - 'AM_NLS' => 1, - 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1, - '_m4_warn' => 1, - 'AM_MAKEFILE_INCLUDE' => 1, - 'AM_PROG_CXX_C_O' => 1, - '_AM_MAKEFILE_INCLUDE' => 1, - '_AM_COND_ENDIF' => 1, - 'AM_ENABLE_MULTILIB' => 1, - 'AM_SILENT_RULES' => 1, - 'AM_PROG_MOC' => 1, - 'AC_CONFIG_FILES' => 1, - 'LT_INIT' => 1, - 'include' => 1, - 'AM_GNU_GETTEXT' => 1, - 'AM_PROG_AR' => 1, - 'AC_LIBSOURCE' => 1, - 'AC_CANONICAL_BUILD' => 1, - 'AM_PROG_FC_C_O' => 1, - 'AC_FC_FREEFORM' => 1, - 'AH_OUTPUT' => 1, - 'AC_CONFIG_AUX_DIR' => 1, - '_AM_SUBST_NOTMAKE' => 1, - 'm4_pattern_allow' => 1, - '_AM_AUTOCONF_VERSION' => 1, - 'AM_PROG_CC_C_O' => 1, - 'sinclude' => 1, - 'AM_CONDITIONAL' => 1, - 'AC_CANONICAL_SYSTEM' => 1, - 'AM_XGETTEXT_OPTION' => 1, - 'AC_CONFIG_HEADERS' => 1, - 'AC_DEFINE_TRACE_LITERAL' => 1, - 'AM_POT_TOOLS' => 1, - 'm4_include' => 1, - '_AM_COND_ELSE' => 1, - 'AU_DEFUN' => 1, - 'AC_SUBST_TRACE' => 1 - } - ], 'Autom4te::Request' ) - ); - diff --git a/external/cosmotool/external/sharp/autom4te.cache/traces.0 b/external/cosmotool/external/sharp/autom4te.cache/traces.0 deleted file mode 100644 index 6d71d40..0000000 --- a/external/cosmotool/external/sharp/autom4te.cache/traces.0 +++ /dev/null @@ -1,229 +0,0 @@ -m4trace:configure.ac:1: -1- AC_INIT([config/config.auto.in]) -m4trace:configure.ac:1: -1- m4_pattern_forbid([^_?A[CHUM]_]) -m4trace:configure.ac:1: -1- m4_pattern_forbid([_AC_]) -m4trace:configure.ac:1: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) -m4trace:configure.ac:1: -1- m4_pattern_allow([^AS_FLAGS$]) -m4trace:configure.ac:1: -1- m4_pattern_forbid([^_?m4_]) -m4trace:configure.ac:1: -1- m4_pattern_forbid([^dnl$]) -m4trace:configure.ac:1: -1- m4_pattern_forbid([^_?AS_]) -m4trace:configure.ac:1: -1- AC_SUBST([SHELL]) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([SHELL]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^SHELL$]) -m4trace:configure.ac:1: -1- AC_SUBST([PATH_SEPARATOR]) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([PATH_SEPARATOR]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^PATH_SEPARATOR$]) -m4trace:configure.ac:1: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])]) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([PACKAGE_NAME]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_NAME$]) -m4trace:configure.ac:1: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])]) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([PACKAGE_TARNAME]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) -m4trace:configure.ac:1: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])]) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([PACKAGE_VERSION]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_VERSION$]) -m4trace:configure.ac:1: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])]) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([PACKAGE_STRING]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_STRING$]) -m4trace:configure.ac:1: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])]) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) -m4trace:configure.ac:1: -1- AC_SUBST([PACKAGE_URL], [m4_ifdef([AC_PACKAGE_URL], ['AC_PACKAGE_URL'])]) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([PACKAGE_URL]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_URL$]) -m4trace:configure.ac:1: -1- AC_SUBST([exec_prefix], [NONE]) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([exec_prefix]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^exec_prefix$]) -m4trace:configure.ac:1: -1- AC_SUBST([prefix], [NONE]) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([prefix]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^prefix$]) -m4trace:configure.ac:1: -1- AC_SUBST([program_transform_name], [s,x,x,]) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([program_transform_name]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^program_transform_name$]) -m4trace:configure.ac:1: -1- AC_SUBST([bindir], ['${exec_prefix}/bin']) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([bindir]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^bindir$]) -m4trace:configure.ac:1: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin']) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([sbindir]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^sbindir$]) -m4trace:configure.ac:1: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec']) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([libexecdir]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^libexecdir$]) -m4trace:configure.ac:1: -1- AC_SUBST([datarootdir], ['${prefix}/share']) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([datarootdir]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^datarootdir$]) -m4trace:configure.ac:1: -1- AC_SUBST([datadir], ['${datarootdir}']) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([datadir]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^datadir$]) -m4trace:configure.ac:1: -1- AC_SUBST([sysconfdir], ['${prefix}/etc']) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([sysconfdir]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^sysconfdir$]) -m4trace:configure.ac:1: -1- AC_SUBST([sharedstatedir], ['${prefix}/com']) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([sharedstatedir]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^sharedstatedir$]) -m4trace:configure.ac:1: -1- AC_SUBST([localstatedir], ['${prefix}/var']) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([localstatedir]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^localstatedir$]) -m4trace:configure.ac:1: -1- AC_SUBST([includedir], ['${prefix}/include']) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([includedir]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^includedir$]) -m4trace:configure.ac:1: -1- AC_SUBST([oldincludedir], ['/usr/include']) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([oldincludedir]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^oldincludedir$]) -m4trace:configure.ac:1: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME], - ['${datarootdir}/doc/${PACKAGE_TARNAME}'], - ['${datarootdir}/doc/${PACKAGE}'])]) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([docdir]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^docdir$]) -m4trace:configure.ac:1: -1- AC_SUBST([infodir], ['${datarootdir}/info']) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([infodir]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^infodir$]) -m4trace:configure.ac:1: -1- AC_SUBST([htmldir], ['${docdir}']) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([htmldir]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^htmldir$]) -m4trace:configure.ac:1: -1- AC_SUBST([dvidir], ['${docdir}']) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([dvidir]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^dvidir$]) -m4trace:configure.ac:1: -1- AC_SUBST([pdfdir], ['${docdir}']) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([pdfdir]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^pdfdir$]) -m4trace:configure.ac:1: -1- AC_SUBST([psdir], ['${docdir}']) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([psdir]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^psdir$]) -m4trace:configure.ac:1: -1- AC_SUBST([libdir], ['${exec_prefix}/lib']) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([libdir]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^libdir$]) -m4trace:configure.ac:1: -1- AC_SUBST([localedir], ['${datarootdir}/locale']) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([localedir]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^localedir$]) -m4trace:configure.ac:1: -1- AC_SUBST([mandir], ['${datarootdir}/man']) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([mandir]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^mandir$]) -m4trace:configure.ac:1: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_NAME$]) -m4trace:configure.ac:1: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */ -@%:@undef PACKAGE_NAME]) -m4trace:configure.ac:1: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) -m4trace:configure.ac:1: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */ -@%:@undef PACKAGE_TARNAME]) -m4trace:configure.ac:1: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_VERSION$]) -m4trace:configure.ac:1: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */ -@%:@undef PACKAGE_VERSION]) -m4trace:configure.ac:1: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_STRING$]) -m4trace:configure.ac:1: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */ -@%:@undef PACKAGE_STRING]) -m4trace:configure.ac:1: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) -m4trace:configure.ac:1: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */ -@%:@undef PACKAGE_BUGREPORT]) -m4trace:configure.ac:1: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_URL]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^PACKAGE_URL$]) -m4trace:configure.ac:1: -1- AH_OUTPUT([PACKAGE_URL], [/* Define to the home page for this package. */ -@%:@undef PACKAGE_URL]) -m4trace:configure.ac:1: -1- AC_SUBST([DEFS]) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([DEFS]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^DEFS$]) -m4trace:configure.ac:1: -1- AC_SUBST([ECHO_C]) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([ECHO_C]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^ECHO_C$]) -m4trace:configure.ac:1: -1- AC_SUBST([ECHO_N]) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([ECHO_N]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^ECHO_N$]) -m4trace:configure.ac:1: -1- AC_SUBST([ECHO_T]) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([ECHO_T]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^ECHO_T$]) -m4trace:configure.ac:1: -1- AC_SUBST([LIBS]) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([LIBS]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^LIBS$]) -m4trace:configure.ac:1: -1- AC_SUBST([build_alias]) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([build_alias]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^build_alias$]) -m4trace:configure.ac:1: -1- AC_SUBST([host_alias]) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([host_alias]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^host_alias$]) -m4trace:configure.ac:1: -1- AC_SUBST([target_alias]) -m4trace:configure.ac:1: -1- AC_SUBST_TRACE([target_alias]) -m4trace:configure.ac:1: -1- m4_pattern_allow([^target_alias$]) -m4trace:configure.ac:3: -1- AC_SUBST([uname_found]) -m4trace:configure.ac:3: -1- AC_SUBST_TRACE([uname_found]) -m4trace:configure.ac:3: -1- m4_pattern_allow([^uname_found$]) -m4trace:configure.ac:12: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2615: AC_TRY_COMPILE is expanded from... -configure.ac:12: the top level]) -m4trace:configure.ac:12: -1- AC_SUBST([CC]) -m4trace:configure.ac:12: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.ac:12: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:12: -1- AC_SUBST([CFLAGS]) -m4trace:configure.ac:12: -1- AC_SUBST_TRACE([CFLAGS]) -m4trace:configure.ac:12: -1- m4_pattern_allow([^CFLAGS$]) -m4trace:configure.ac:12: -1- AC_SUBST([LDFLAGS]) -m4trace:configure.ac:12: -1- AC_SUBST_TRACE([LDFLAGS]) -m4trace:configure.ac:12: -1- m4_pattern_allow([^LDFLAGS$]) -m4trace:configure.ac:12: -1- AC_SUBST([LIBS]) -m4trace:configure.ac:12: -1- AC_SUBST_TRACE([LIBS]) -m4trace:configure.ac:12: -1- m4_pattern_allow([^LIBS$]) -m4trace:configure.ac:12: -1- AC_SUBST([CPPFLAGS]) -m4trace:configure.ac:12: -1- AC_SUBST_TRACE([CPPFLAGS]) -m4trace:configure.ac:12: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.ac:12: -1- AC_SUBST([CC]) -m4trace:configure.ac:12: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.ac:12: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:12: -1- AC_SUBST([CC]) -m4trace:configure.ac:12: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.ac:12: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:12: -1- AC_SUBST([CC]) -m4trace:configure.ac:12: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.ac:12: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:12: -1- AC_SUBST([CC]) -m4trace:configure.ac:12: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.ac:12: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:12: -1- AC_SUBST([ac_ct_CC]) -m4trace:configure.ac:12: -1- AC_SUBST_TRACE([ac_ct_CC]) -m4trace:configure.ac:12: -1- m4_pattern_allow([^ac_ct_CC$]) -m4trace:configure.ac:12: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext]) -m4trace:configure.ac:12: -1- AC_SUBST_TRACE([EXEEXT]) -m4trace:configure.ac:12: -1- m4_pattern_allow([^EXEEXT$]) -m4trace:configure.ac:12: -1- AC_SUBST([OBJEXT], [$ac_cv_objext]) -m4trace:configure.ac:12: -1- AC_SUBST_TRACE([OBJEXT]) -m4trace:configure.ac:12: -1- m4_pattern_allow([^OBJEXT$]) -m4trace:configure.ac:20: -1- AC_SUBST([OPENMP_CFLAGS]) -m4trace:configure.ac:20: -1- AC_SUBST_TRACE([OPENMP_CFLAGS]) -m4trace:configure.ac:20: -1- m4_pattern_allow([^OPENMP_CFLAGS$]) -m4trace:configure.ac:55: -1- AC_SUBST([GCCVERSION]) -m4trace:configure.ac:55: -1- AC_SUBST_TRACE([GCCVERSION]) -m4trace:configure.ac:55: -1- m4_pattern_allow([^GCCVERSION$]) -m4trace:configure.ac:106: -1- AC_SUBST([SILENT_RULE]) -m4trace:configure.ac:106: -1- AC_SUBST_TRACE([SILENT_RULE]) -m4trace:configure.ac:106: -1- m4_pattern_allow([^SILENT_RULE$]) -m4trace:configure.ac:107: -1- AC_SUBST([CC]) -m4trace:configure.ac:107: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.ac:107: -1- m4_pattern_allow([^CC$]) -m4trace:configure.ac:108: -1- AC_SUBST([CCFLAGS_NO_C]) -m4trace:configure.ac:108: -1- AC_SUBST_TRACE([CCFLAGS_NO_C]) -m4trace:configure.ac:108: -1- m4_pattern_allow([^CCFLAGS_NO_C$]) -m4trace:configure.ac:109: -1- AC_SUBST([LDCCFLAGS]) -m4trace:configure.ac:109: -1- AC_SUBST_TRACE([LDCCFLAGS]) -m4trace:configure.ac:109: -1- m4_pattern_allow([^LDCCFLAGS$]) -m4trace:configure.ac:110: -1- AC_SUBST([ARCREATE]) -m4trace:configure.ac:110: -1- AC_SUBST_TRACE([ARCREATE]) -m4trace:configure.ac:110: -1- m4_pattern_allow([^ARCREATE$]) -m4trace:configure.ac:112: -1- AC_CONFIG_FILES([config/config.auto]) -m4trace:configure.ac:112: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments. -You should run autoupdate.], []) -m4trace:configure.ac:112: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) -m4trace:configure.ac:112: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) -m4trace:configure.ac:112: -1- m4_pattern_allow([^LIB@&t@OBJS$]) -m4trace:configure.ac:112: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) -m4trace:configure.ac:112: -1- AC_SUBST_TRACE([LTLIBOBJS]) -m4trace:configure.ac:112: -1- m4_pattern_allow([^LTLIBOBJS$]) -m4trace:configure.ac:112: -1- AC_SUBST_TRACE([top_builddir]) -m4trace:configure.ac:112: -1- AC_SUBST_TRACE([top_build_prefix]) -m4trace:configure.ac:112: -1- AC_SUBST_TRACE([srcdir]) -m4trace:configure.ac:112: -1- AC_SUBST_TRACE([abs_srcdir]) -m4trace:configure.ac:112: -1- AC_SUBST_TRACE([top_srcdir]) -m4trace:configure.ac:112: -1- AC_SUBST_TRACE([abs_top_srcdir]) -m4trace:configure.ac:112: -1- AC_SUBST_TRACE([builddir]) -m4trace:configure.ac:112: -1- AC_SUBST_TRACE([abs_builddir]) -m4trace:configure.ac:112: -1- AC_SUBST_TRACE([abs_top_builddir]) diff --git a/external/cosmotool/external/sharp/c_utils/c_utils.c b/external/cosmotool/external/sharp/c_utils/c_utils.c deleted file mode 100644 index 96bd765..0000000 --- a/external/cosmotool/external/sharp/c_utils/c_utils.c +++ /dev/null @@ -1,81 +0,0 @@ -/* - * This file is part of libc_utils. - * - * libc_utils is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libc_utils is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libc_utils; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libc_utils is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/* - * Convenience functions - * - * Copyright (C) 2008, 2009, 2010, 2011, 2012 Max-Planck-Society - * Author: Martin Reinecke - */ - -#include -#include "c_utils.h" - -void util_fail_ (const char *file, int line, const char *func, const char *msg) - { - fprintf(stderr,"%s, %i (%s):\n%s\n",file,line,func,msg); - exit(1); - } -void util_warn_ (const char *file, int line, const char *func, const char *msg) - { - fprintf(stderr,"%s, %i (%s):\n%s\n",file,line,func,msg); - } - -/* This function tries to avoid allocations with a total size close to a high - power of two (called the "critical stride" here), by adding a few more bytes - if necssary. This lowers the probability that two arrays differ by a multiple - of the critical stride in their starting address, which in turn lowers the - risk of cache line contention. */ -static size_t manipsize(size_t sz) - { - const size_t critical_stride=4096, cacheline=64, overhead=32; - if (sz < (critical_stride/2)) return sz; - if (((sz+overhead)%critical_stride)>(2*cacheline)) return sz; - return sz+2*cacheline; - } - -#ifdef __SSE__ -#include -void *util_malloc_ (size_t sz) - { - void *res; - if (sz==0) return NULL; - res = _mm_malloc(manipsize(sz),16); - UTIL_ASSERT(res,"_mm_malloc() failed"); - return res; - } -void util_free_ (void *ptr) - { if ((ptr)!=NULL) _mm_free(ptr); } -#else -void *util_malloc_ (size_t sz) - { - void *res; - if (sz==0) return NULL; - res = malloc(manipsize(sz)); - UTIL_ASSERT(res,"malloc() failed"); - return res; - } -void util_free_ (void *ptr) - { if ((ptr)!=NULL) free(ptr); } -#endif diff --git a/external/cosmotool/external/sharp/c_utils/c_utils.h b/external/cosmotool/external/sharp/c_utils/c_utils.h deleted file mode 100644 index 768d2b7..0000000 --- a/external/cosmotool/external/sharp/c_utils/c_utils.h +++ /dev/null @@ -1,147 +0,0 @@ -/* - * This file is part of libc_utils. - * - * libc_utils is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libc_utils is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libc_utils; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libc_utils is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/*! \file c_utils.h - * Convenience functions - * - * Copyright (C) 2008, 2009, 2010, 2011 Max-Planck-Society - * \author Martin Reinecke - * \note This file should only be included from .c files, NOT from .h files. - */ - -#ifndef PLANCK_C_UTILS_H -#define PLANCK_C_UTILS_H - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -void util_fail_ (const char *file, int line, const char *func, const char *msg); -void util_warn_ (const char *file, int line, const char *func, const char *msg); -void *util_malloc_ (size_t sz); -void util_free_ (void *ptr); - -#if defined (__GNUC__) -#define UTIL_FUNC_NAME__ __func__ -#else -#define UTIL_FUNC_NAME__ "unknown" -#endif - -/*! \def UTIL_ASSERT(cond,msg) - If \a cond is false, print an error message containing function name, - source file name and line number of the call, as well as \a msg; - then exit the program with an error status. */ -#define UTIL_ASSERT(cond,msg) \ - if(!(cond)) util_fail_(__FILE__,__LINE__,UTIL_FUNC_NAME__,msg) -/*! \def UTIL_WARN(cond,msg) - If \a cond is false, print an warning containing function name, - source file name and line number of the call, as well as \a msg. */ -#define UTIL_WARN(cond,msg) \ - if(!(cond)) util_warn_(__FILE__,__LINE__,UTIL_FUNC_NAME__,msg) -/*! \def UTIL_FAIL(msg) - Print an error message containing function name, - source file name and line number of the call, as well as \a msg; - then exit the program with an error status. */ -#define UTIL_FAIL(msg) \ - util_fail_(__FILE__,__LINE__,UTIL_FUNC_NAME__,msg) - -/*! \def ALLOC(ptr,type,num) - Allocate space for \a num objects of type \a type. Make sure that the - allocation succeeded, else stop the program with an error. Return the - resulting pointer in \a ptr. */ -#define ALLOC(ptr,type,num) \ - do { (ptr)=(type *)util_malloc_((num)*sizeof(type)); } while (0) -/*! \def RALLOC(type,num) - Allocate space for \a num objects of type \a type. Make sure that the - allocation succeeded, else stop the program with an error. Cast the - resulting pointer to \a (type*). */ -#define RALLOC(type,num) \ - ((type *)util_malloc_((num)*sizeof(type))) -/*! \def DEALLOC(ptr) - Deallocate \a ptr. It must have been allocated using \a ALLOC or - \a RALLOC. */ -#define DEALLOC(ptr) \ - do { util_free_(ptr); (ptr)=NULL; } while(0) -#define RESIZE(ptr,type,num) \ - do { util_free_(ptr); ALLOC(ptr,type,num); } while(0) -#define GROW(ptr,type,sz_old,sz_new) \ - do { \ - if ((sz_new)>(sz_old)) \ - { RESIZE(ptr,type,2*(sz_new));sz_old=2*(sz_new); } \ - } while(0) -/*! \def SET_ARRAY(ptr,i1,i2,val) - Set the entries \a ptr[i1] ... \a ptr[i2-1] to \a val. */ -#define SET_ARRAY(ptr,i1,i2,val) \ - do { \ - ptrdiff_t cnt_; \ - for (cnt_=(i1);cnt_<(i2);++cnt_) (ptr)[cnt_]=(val); \ - } while(0) -/*! \def COPY_ARRAY(src,dest,i1,i2) - Copy the entries \a src[i1] ... \a src[i2-1] to - \a dest[i1] ... \a dest[i2-1]. */ -#define COPY_ARRAY(src,dest,i1,i2) \ - do { \ - ptrdiff_t cnt_; \ - for (cnt_=(i1);cnt_<(i2);++cnt_) (dest)[cnt_]=(src)[cnt_]; \ - } while(0) - -#define ALLOC2D(ptr,type,num1,num2) \ - do { \ - size_t cnt_, num1_=(num1), num2_=(num2); \ - ALLOC(ptr,type *,num1_); \ - ALLOC(ptr[0],type,num1_*num2_); \ - for (cnt_=1; cnt_(b)) ? (a) : (b)) -#define IMIN(a,b) \ - (((a)<(b)) ? (a) : (b)) - -#define SWAP(a,b,type) \ - do { type tmp_=(a); (a)=(b); (b)=tmp_; } while(0) - -#define CHECK_STACK_ALIGN(align) \ - do { \ - double foo; \ - UTIL_WARN((((size_t)(&foo))&(align-1))==0, \ - "WARNING: stack not sufficiently aligned!"); \ - } while(0) - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/external/cosmotool/external/sharp/c_utils/memusage.c b/external/cosmotool/external/sharp/c_utils/memusage.c deleted file mode 100644 index 20bf0a2..0000000 --- a/external/cosmotool/external/sharp/c_utils/memusage.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * This file is part of libc_utils. - * - * libc_utils is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libc_utils is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libc_utils; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libc_utils is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/* - * Functionality for measuring memory consumption - * - * Copyright (C) 2012 Max-Planck-Society - * Author: Martin Reinecke - */ - -#include -#include -#include "memusage.h" - -double residentSetSize(void) - { - FILE *statm = fopen("/proc/self/statm","r"); - double res; - if (!statm) return -1.0; - fscanf(statm,"%*f %lf",&res); - fclose(statm); - return (res*4096); - } - -double VmHWM(void) - { - char word[1024]; - FILE *f = fopen("/proc/self/status", "r"); - double res; - if (!f) return -1.0; - while(1) - { - if (fscanf (f,"%1023s",word)<0) - { fclose(f); return -1.0; } - if (!strncmp(word, "VmHWM:", 6)) - { - fscanf(f,"%lf",&res); - fscanf(f,"%2s",word); - if (strncmp(word, "kB", 2)) - { fclose(f); return -1.0; } - res *=1024; - fclose(f); - return res; - } - } - } diff --git a/external/cosmotool/external/sharp/c_utils/memusage.h b/external/cosmotool/external/sharp/c_utils/memusage.h deleted file mode 100644 index fa0ac43..0000000 --- a/external/cosmotool/external/sharp/c_utils/memusage.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * This file is part of libc_utils. - * - * libc_utils is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libc_utils is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libc_utils; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libc_utils is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/*! \file memusage.h - * Functionality for measuring memory consumption - * - * Copyright (C) 2012 Max-Planck-Society - * \author Martin Reinecke - */ - -#ifndef PLANCK_MEMUSAGE_H -#define PLANCK_MEMUSAGE_H - -#ifdef __cplusplus -extern "C" { -#endif - -/*! Returns the current resident set size in bytes. - \note Currently only supported on Linux. Returns -1 if unsupported. */ -double residentSetSize(void); - -/*! Returns the high water mark of the resident set size in bytes. - \note Currently only supported on Linux. Returns -1 if unsupported. */ -double VmHWM(void); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/external/cosmotool/external/sharp/c_utils/planck.make b/external/cosmotool/external/sharp/c_utils/planck.make deleted file mode 100644 index 4f0ccb1..0000000 --- a/external/cosmotool/external/sharp/c_utils/planck.make +++ /dev/null @@ -1,18 +0,0 @@ -PKG:=c_utils - -SD:=$(SRCROOT)/$(PKG) -OD:=$(BLDROOT)/$(PKG) - -FULL_INCLUDE+= -I$(SD) - -HDR_$(PKG):=$(SD)/*.h -LIB_$(PKG):=$(LIBDIR)/libc_utils.a - -OBJ:=c_utils.o walltime_c.o memusage.o -OBJ:=$(OBJ:%=$(OD)/%) - -$(OBJ): $(HDR_$(PKG)) | $(OD)_mkdir -$(LIB_$(PKG)): $(OBJ) - -all_hdr+=$(HDR_$(PKG)) -all_lib+=$(LIB_$(PKG)) diff --git a/external/cosmotool/external/sharp/c_utils/walltime_c.c b/external/cosmotool/external/sharp/c_utils/walltime_c.c deleted file mode 100644 index c9dce3a..0000000 --- a/external/cosmotool/external/sharp/c_utils/walltime_c.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - * This file is part of libc_utils. - * - * libc_utils is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libc_utils is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libc_utils; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libc_utils is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/* - * Functionality for reading wall clock time - * - * Copyright (C) 2010, 2011 Max-Planck-Society - * Author: Martin Reinecke - */ - -#if defined (_OPENMP) -#include -#elif defined (USE_MPI) -#include "mpi.h" -#else -#include -#include -#endif - -#include "walltime_c.h" - -double wallTime(void) - { -#if defined (_OPENMP) - return omp_get_wtime(); -#elif defined (USE_MPI) - return MPI_Wtime(); -#else - struct timeval t; - gettimeofday(&t, NULL); - return t.tv_sec + 1e-6*t.tv_usec; -#endif - } diff --git a/external/cosmotool/external/sharp/c_utils/walltime_c.h b/external/cosmotool/external/sharp/c_utils/walltime_c.h deleted file mode 100644 index c291f17..0000000 --- a/external/cosmotool/external/sharp/c_utils/walltime_c.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * This file is part of libc_utils. - * - * libc_utils is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libc_utils is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libc_utils; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libc_utils is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/*! \file walltime_c.h - * Functionality for reading wall clock time - * - * Copyright (C) 2010 Max-Planck-Society - * \author Martin Reinecke - */ - -#ifndef PLANCK_WALLTIME_C_H -#define PLANCK_WALLTIME_C_H - -#ifdef __cplusplus -extern "C" { -#endif - -/*! Returns an approximation of the current wall time (in seconds). - The first available of the following timers will be used: -
    -
  • \a omp_get_wtime(), if OpenMP is available -
  • \a MPI_Wtime(), if MPI is available -
  • \a gettimeofday() otherwise -
- \note Only useful for measuring time differences. - \note This function has an execution time between 10 and 100 nanoseconds. */ -double wallTime(void); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/external/cosmotool/external/sharp/config/config.auto.in b/external/cosmotool/external/sharp/config/config.auto.in deleted file mode 100644 index 32b340b..0000000 --- a/external/cosmotool/external/sharp/config/config.auto.in +++ /dev/null @@ -1,9 +0,0 @@ -@SILENT_RULE@ - -CC=@CC@ -CL=@CC@ -CCFLAGS_NO_C=@CCFLAGS_NO_C@ -CCFLAGS=$(CCFLAGS_NO_C) -c -CLFLAGS=-L. -L$(LIBDIR) @LDCCFLAGS@ -lm - -ARCREATE=@ARCREATE@ diff --git a/external/cosmotool/external/sharp/config/rules.common b/external/cosmotool/external/sharp/config/rules.common deleted file mode 100644 index 419584d..0000000 --- a/external/cosmotool/external/sharp/config/rules.common +++ /dev/null @@ -1,31 +0,0 @@ -BLDROOT = $(SRCROOT)/build.$(SHARP_TARGET) -PREFIX = $(SRCROOT)/$(SHARP_TARGET) -BINDIR = $(PREFIX)/bin -INCDIR = $(PREFIX)/include -LIBDIR = $(PREFIX)/lib -DOCDIR = $(SRCROOT)/doc - -# do not use any suffix rules -.SUFFIXES: -# do not use any default rules -.DEFAULT: - -echo_config: - @echo using configuration \'$(SHARP_TARGET)\' - -$(BLDROOT)/%.o : $(SRCROOT)/%.c | echo_config - @echo "# compiling $*.c" - cd $(@D) && $(CC) $(FULL_INCLUDE) -I$(BLDROOT) $(CCFLAGS) $< - -$(BLDROOT)/%.o : $(SRCROOT)/%.cc | echo_config - @echo "# compiling $*.cc" - cd $(@D) && $(CXX) $(FULL_INCLUDE) -I$(BLDROOT) $(CXXCFLAGS) $< - -%_mkdir: - @if [ ! -d $* ]; then mkdir -p $* ; fi - -clean: - rm -rf $(BLDROOT) $(PREFIX) $(DOCDIR) autom4te.cache/ config.log config.status - -distclean: clean - rm -f config/config.auto diff --git a/external/cosmotool/external/sharp/configure b/external/cosmotool/external/sharp/configure deleted file mode 100755 index c3b5075..0000000 --- a/external/cosmotool/external/sharp/configure +++ /dev/null @@ -1,3974 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68. -# -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= -PACKAGE_URL= - -ac_unique_file="config/config.auto.in" -ac_subst_vars='LTLIBOBJS -LIBOBJS -ARCREATE -LDCCFLAGS -CCFLAGS_NO_C -SILENT_RULE -GCCVERSION -OPENMP_CFLAGS -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -uname_found -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_openmp -enable_noisy_make -enable_mpi -enable_debug -enable_pic -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures this package to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF -_ACEOF -fi - -if test -n "$ac_init_help"; then - - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-openmp do not use OpenMP - --enable-noisy-make enable detailed make output - --enable-mpi enable generation of MPI-parallel code - --enable-debug enable generation of debugging symbols - --enable-pic enable generation of position independent code - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to the package provider. -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -configure -generated by GNU Autoconf 2.68 - -Copyright (C) 2010 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -# Extract the first word of "uname", so it can be a program name with args. -set dummy uname; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_uname_found+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$uname_found"; then - ac_cv_prog_uname_found="$uname_found" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_uname_found="1" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_prog_uname_found" && ac_cv_prog_uname_found="0" -fi -fi -uname_found=$ac_cv_prog_uname_found -if test -n "$uname_found"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $uname_found" >&5 -$as_echo "$uname_found" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -if test $uname_found -eq 0 ; then - echo "No uname found; setting system type to unknown." - system="unknown" -else - system=`uname -s`-`uname -r` -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __INTEL_COMPILER -choke me -#endif - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ICC=yes -else - ICC=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ICC = yes; then GCC=no; fi -CCTYPE=unknown -if test $GCC = yes; then CCTYPE=gcc; fi -if test $ICC = yes; then CCTYPE=icc; fi - - OPENMP_CFLAGS= - # Check whether --enable-openmp was given. -if test "${enable_openmp+set}" = set; then : - enableval=$enable_openmp; -fi - - if test "$enable_openmp" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to support OpenMP" >&5 -$as_echo_n "checking for $CC option to support OpenMP... " >&6; } -if ${ac_cv_prog_c_openmp+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifndef _OPENMP - choke me -#endif -#include -int main () { return omp_get_num_threads (); } - -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_prog_c_openmp='none needed' -else - ac_cv_prog_c_openmp='unsupported' - for ac_option in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp; do - ac_save_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS $ac_option" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifndef _OPENMP - choke me -#endif -#include -int main () { return omp_get_num_threads (); } - -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_prog_c_openmp=$ac_option -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - CFLAGS=$ac_save_CFLAGS - if test "$ac_cv_prog_c_openmp" != unsupported; then - break - fi - done -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_c_openmp" >&5 -$as_echo "$ac_cv_prog_c_openmp" >&6; } - case $ac_cv_prog_c_openmp in #( - "none needed" | unsupported) - ;; #( - *) - OPENMP_CFLAGS=$ac_cv_prog_c_openmp ;; - esac - fi - - - -SILENT_RULE=".SILENT:" -# Check whether --enable-noisy-make was given. -if test "${enable_noisy_make+set}" = set; then : - enableval=$enable_noisy_make; if test "$enableval" = yes; then - SILENT_RULE="" - fi -fi - - -ENABLE_MPI=no -# Check whether --enable-mpi was given. -if test "${enable_mpi+set}" = set; then : - enableval=$enable_mpi; if test "$enableval" = yes; then - ENABLE_MPI=yes - fi -fi - - -ENABLE_DEBUG=no -# Check whether --enable-debug was given. -if test "${enable_debug+set}" = set; then : - enableval=$enable_debug; if test "$enableval" = yes; then - ENABLE_DEBUG=yes - fi -fi - - -ENABLE_PIC=no -# Check whether --enable-pic was given. -if test "${enable_pic+set}" = set; then : - enableval=$enable_pic; if test "$enableval" = yes; then - ENABLE_PIC=yes - fi -fi - - -case $CCTYPE in - gcc) - CCFLAGS="-O3 -fno-tree-vectorize -ffast-math -fomit-frame-pointer -std=c99 -pedantic -Wextra -Wall -Wno-unknown-pragmas -Wshadow -Wmissing-prototypes -Wfatal-errors" - GCCVERSION="`$CC -dumpversion 2>&1`" - echo "Using gcc version $GCCVERSION" - - case $system in - Darwin-*) - ;; - *) - CCFLAGS="$CCFLAGS -ffunction-sections -fdata-sections" - ;; - esac - - gcc43=`echo $GCCVERSION | grep -c '4\.[3456789]'` - - if test $gcc43 -gt 0; then - CCFLAGS="$CCFLAGS -march=native" - fi - ;; - icc) - CCFLAGS="-O3 -xHOST -std=c99 -ip -Wbrief -Wall -vec-report0 -openmp-report0 -wd383,981,1419,1572" - ;; - *) - CCFLAGS="-O2" - # Don't do anything now - ;; -esac - -case $system in - Darwin-*) - ARCREATE="libtool -static -o" - ;; - *) - ARCREATE="ar cr" - ;; -esac - -CCFLAGS="$CCFLAGS $OPENMP_CFLAGS" - -if test $ENABLE_DEBUG = yes; then - CCFLAGS="$CCFLAGS -g" -fi - -if test $ENABLE_PIC = yes; then - CCFLAGS="$CCFLAGS -fPIC" -fi - -if test $ENABLE_MPI = yes; then - CCFLAGS="$CCFLAGS -DUSE_MPI" -fi - -CCFLAGS_NO_C="$CCFLAGS $CPPFLAGS" - -LDCCFLAGS="$LDFLAGS $CCFLAGS" - - - - - - - -ac_config_files="$ac_config_files config/config.auto" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -ac_script=' -:mline -/\\$/{ - N - s,\\\n,, - b mline -} -t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g -t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g -t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` - - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - -Configuration files: -$config_files - -Report bugs to the package provider." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -config.status -configured by $0, generated by GNU Autoconf 2.68, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2010 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config/config.auto") CONFIG_FILES="$CONFIG_FILES config/config.auto" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - - -eval set X " :F $CONFIG_FILES " -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - - - - esac - -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - diff --git a/external/cosmotool/external/sharp/configure.ac b/external/cosmotool/external/sharp/configure.ac deleted file mode 100644 index 443e5bb..0000000 --- a/external/cosmotool/external/sharp/configure.ac +++ /dev/null @@ -1,112 +0,0 @@ -AC_INIT(config/config.auto.in) - -AC_CHECK_PROG([uname_found],[uname],[1],[0]) -if test $uname_found -eq 0 ; then - echo "No uname found; setting system type to unknown." - system="unknown" -else - system=`uname -s`-`uname -r` -fi -AC_LANG([C]) - -AC_TRY_COMPILE([], [@%:@ifndef __INTEL_COMPILER -choke me -@%:@endif], [ICC=[yes]], [ICC=[no]]) - -if test $ICC = yes; then GCC=no; fi -CCTYPE=unknown -if test $GCC = yes; then CCTYPE=gcc; fi -if test $ICC = yes; then CCTYPE=icc; fi -AC_OPENMP - -SILENT_RULE=".SILENT:" -AC_ARG_ENABLE(noisy-make, - [ --enable-noisy-make enable detailed make output], - [if test "$enableval" = yes; then - SILENT_RULE="" - fi]) - -ENABLE_MPI=no -AC_ARG_ENABLE(mpi, - [ --enable-mpi enable generation of MPI-parallel code], - [if test "$enableval" = yes; then - ENABLE_MPI=yes - fi]) - -ENABLE_DEBUG=no -AC_ARG_ENABLE(debug, - [ --enable-debug enable generation of debugging symbols], - [if test "$enableval" = yes; then - ENABLE_DEBUG=yes - fi]) - -ENABLE_PIC=no -AC_ARG_ENABLE(pic, - [ --enable-pic enable generation of position independent code], - [if test "$enableval" = yes; then - ENABLE_PIC=yes - fi]) - -case $CCTYPE in - gcc) - CCFLAGS="-O3 -fno-tree-vectorize -ffast-math -fomit-frame-pointer -std=c99 -pedantic -Wextra -Wall -Wno-unknown-pragmas -Wshadow -Wmissing-prototypes -Wfatal-errors" - GCCVERSION="`$CC -dumpversion 2>&1`" - echo "Using gcc version $GCCVERSION" - AC_SUBST(GCCVERSION) - case $system in - Darwin-*) - ;; - *) - CCFLAGS="$CCFLAGS -ffunction-sections -fdata-sections" - ;; - esac - changequote(,) - gcc43=`echo $GCCVERSION | grep -c '4\.[3456789]'` - changequote([,]) - if test $gcc43 -gt 0; then - CCFLAGS="$CCFLAGS -march=native" - fi - ;; - icc) - CCFLAGS="-O3 -xHOST -std=c99 -ip -Wbrief -Wall -vec-report0 -openmp-report0 -wd383,981,1419,1572" - ;; - *) - CCFLAGS="-O2" - # Don't do anything now - ;; -esac - -case $system in - Darwin-*) - ARCREATE="libtool -static -o" - ;; - *) - ARCREATE="ar cr" - ;; -esac - -CCFLAGS="$CCFLAGS $OPENMP_CFLAGS" - -if test $ENABLE_DEBUG = yes; then - CCFLAGS="$CCFLAGS -g" -fi - -if test $ENABLE_PIC = yes; then - CCFLAGS="$CCFLAGS -fPIC" -fi - -if test $ENABLE_MPI = yes; then - CCFLAGS="$CCFLAGS -DUSE_MPI" -fi - -CCFLAGS_NO_C="$CCFLAGS $CPPFLAGS" - -LDCCFLAGS="$LDFLAGS $CCFLAGS" - -AC_SUBST(SILENT_RULE) -AC_SUBST(CC) -AC_SUBST(CCFLAGS_NO_C) -AC_SUBST(LDCCFLAGS) -AC_SUBST(ARCREATE) - -AC_OUTPUT(config/config.auto) diff --git a/external/cosmotool/external/sharp/docsrc/c_utils.dox b/external/cosmotool/external/sharp/docsrc/c_utils.dox deleted file mode 100644 index daf432f..0000000 --- a/external/cosmotool/external/sharp/docsrc/c_utils.dox +++ /dev/null @@ -1,290 +0,0 @@ -# Doxyfile 1.8.1 - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -DOXYFILE_ENCODING = UTF-8 -PROJECT_NAME = "LevelS C support library" -PROJECT_NUMBER = 0.1 -PROJECT_BRIEF = -PROJECT_LOGO = -OUTPUT_DIRECTORY = . -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -BRIEF_MEMBER_DESC = NO -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = NO -STRIP_FROM_PATH = -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = NO -QT_AUTOBRIEF = NO -MULTILINE_CPP_IS_BRIEF = NO -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 8 -ALIASES = -TCL_SUBST = -OPTIMIZE_OUTPUT_FOR_C = YES -OPTIMIZE_OUTPUT_JAVA = NO -OPTIMIZE_FOR_FORTRAN = NO -OPTIMIZE_OUTPUT_VHDL = NO -EXTENSION_MAPPING = -MARKDOWN_SUPPORT = YES -BUILTIN_STL_SUPPORT = NO -CPP_CLI_SUPPORT = NO -SIP_SUPPORT = NO -IDL_PROPERTY_SUPPORT = YES -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES -INLINE_GROUPED_CLASSES = NO -INLINE_SIMPLE_STRUCTS = NO -TYPEDEF_HIDES_STRUCT = NO -SYMBOL_CACHE_SIZE = 0 -LOOKUP_CACHE_SIZE = 0 -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = NO -EXTRACT_PRIVATE = NO -EXTRACT_PACKAGE = NO -EXTRACT_STATIC = NO -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -EXTRACT_ANON_NSPACES = NO -HIDE_UNDOC_MEMBERS = YES -HIDE_UNDOC_CLASSES = YES -HIDE_FRIEND_COMPOUNDS = YES -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = YES -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -FORCE_LOCAL_INCLUDES = NO -INLINE_INFO = YES -SORT_MEMBER_DOCS = NO -SORT_BRIEF_DOCS = NO -SORT_MEMBERS_CTORS_1ST = NO -SORT_GROUP_NAMES = NO -SORT_BY_SCOPE_NAME = NO -STRICT_PROTO_MATCHING = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_FILES = YES -SHOW_NAMESPACES = YES -FILE_VERSION_FILTER = -LAYOUT_FILE = -CITE_BIB_FILES = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = YES -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = NO -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = ../c_utils -INPUT_ENCODING = UTF-8 -FILE_PATTERNS = *.h \ - *.c \ - *.dox -RECURSIVE = YES -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXCLUDE_SYMBOLS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -FILTER_SOURCE_PATTERNS = -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = YES -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = NO -REFERENCED_BY_RELATION = NO -REFERENCES_RELATION = NO -REFERENCES_LINK_SOURCE = YES -USE_HTAGS = NO -VERBATIM_HEADERS = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = YES -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = htmldoc -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = footer.html -HTML_STYLESHEET = -HTML_EXTRA_FILES = -HTML_COLORSTYLE_HUE = 220 -HTML_COLORSTYLE_SAT = 100 -HTML_COLORSTYLE_GAMMA = 80 -HTML_TIMESTAMP = YES -HTML_DYNAMIC_SECTIONS = NO -HTML_INDEX_NUM_ENTRIES = 100 -GENERATE_DOCSET = NO -DOCSET_FEEDNAME = "Doxygen generated docs" -DOCSET_BUNDLE_ID = org.doxygen.Project -DOCSET_PUBLISHER_ID = org.doxygen.Publisher -DOCSET_PUBLISHER_NAME = Publisher -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -CHM_INDEX_ENCODING = -BINARY_TOC = NO -TOC_EXPAND = NO -GENERATE_QHP = NO -QCH_FILE = -QHP_NAMESPACE = org.doxygen.Project -QHP_VIRTUAL_FOLDER = doc -QHP_CUST_FILTER_NAME = -QHP_CUST_FILTER_ATTRS = -QHP_SECT_FILTER_ATTRS = -QHG_LOCATION = -GENERATE_ECLIPSEHELP = NO -ECLIPSE_DOC_ID = org.doxygen.Project -DISABLE_INDEX = NO -GENERATE_TREEVIEW = NO -ENUM_VALUES_PER_LINE = 4 -TREEVIEW_WIDTH = 250 -EXT_LINKS_IN_WINDOW = NO -FORMULA_FONTSIZE = 10 -FORMULA_TRANSPARENT = YES -USE_MATHJAX = NO -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest -MATHJAX_EXTENSIONS = -SEARCHENGINE = NO -SERVER_BASED_SEARCH = NO -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = YES -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -LATEX_FOOTER = -PDF_HYPERLINKS = YES -USE_PDFLATEX = YES -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -LATEX_SOURCE_CODE = NO -LATEX_BIB_STYLE = plain -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = c_utils.tag -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = YES -MSCGEN_PATH = -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = NO -DOT_NUM_THREADS = 0 -DOT_FONTNAME = FreeSans -DOT_FONTSIZE = 10 -DOT_FONTPATH = -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -GROUP_GRAPHS = YES -UML_LOOK = NO -UML_LIMIT_NUM_FIELDS = 10 -TEMPLATE_RELATIONS = YES -INCLUDE_GRAPH = NO -INCLUDED_BY_GRAPH = NO -CALL_GRAPH = NO -CALLER_GRAPH = NO -GRAPHICAL_HIERARCHY = NO -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -INTERACTIVE_SVG = NO -DOT_PATH = -DOTFILE_DIRS = -MSCFILE_DIRS = -DOT_GRAPH_MAX_NODES = 50 -MAX_DOT_GRAPH_DEPTH = 0 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES diff --git a/external/cosmotool/external/sharp/docsrc/footer.html b/external/cosmotool/external/sharp/docsrc/footer.html deleted file mode 100644 index 6f5dbf0..0000000 --- a/external/cosmotool/external/sharp/docsrc/footer.html +++ /dev/null @@ -1,5 +0,0 @@ -
-Generated on $datetime for $projectname -
- - diff --git a/external/cosmotool/external/sharp/docsrc/index_code.html b/external/cosmotool/external/sharp/docsrc/index_code.html deleted file mode 100644 index d8a001d..0000000 --- a/external/cosmotool/external/sharp/docsrc/index_code.html +++ /dev/null @@ -1,15 +0,0 @@ - - -Libsharp source code documentation - -

Libsharp source code documentation

- -

C interfaces

- - - - diff --git a/external/cosmotool/external/sharp/docsrc/libfftpack.dox b/external/cosmotool/external/sharp/docsrc/libfftpack.dox deleted file mode 100644 index 7ff2c23..0000000 --- a/external/cosmotool/external/sharp/docsrc/libfftpack.dox +++ /dev/null @@ -1,290 +0,0 @@ -# Doxyfile 1.8.1 - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -DOXYFILE_ENCODING = UTF-8 -PROJECT_NAME = "LevelS FFT library" -PROJECT_NUMBER = 0.1 -PROJECT_BRIEF = -PROJECT_LOGO = -OUTPUT_DIRECTORY = . -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -BRIEF_MEMBER_DESC = NO -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = NO -STRIP_FROM_PATH = -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = NO -QT_AUTOBRIEF = NO -MULTILINE_CPP_IS_BRIEF = NO -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 8 -ALIASES = -TCL_SUBST = -OPTIMIZE_OUTPUT_FOR_C = YES -OPTIMIZE_OUTPUT_JAVA = NO -OPTIMIZE_FOR_FORTRAN = NO -OPTIMIZE_OUTPUT_VHDL = NO -EXTENSION_MAPPING = -MARKDOWN_SUPPORT = YES -BUILTIN_STL_SUPPORT = NO -CPP_CLI_SUPPORT = NO -SIP_SUPPORT = NO -IDL_PROPERTY_SUPPORT = YES -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES -INLINE_GROUPED_CLASSES = NO -INLINE_SIMPLE_STRUCTS = NO -TYPEDEF_HIDES_STRUCT = NO -SYMBOL_CACHE_SIZE = 0 -LOOKUP_CACHE_SIZE = 0 -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = NO -EXTRACT_PRIVATE = NO -EXTRACT_PACKAGE = NO -EXTRACT_STATIC = NO -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -EXTRACT_ANON_NSPACES = NO -HIDE_UNDOC_MEMBERS = YES -HIDE_UNDOC_CLASSES = YES -HIDE_FRIEND_COMPOUNDS = YES -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = YES -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -FORCE_LOCAL_INCLUDES = NO -INLINE_INFO = YES -SORT_MEMBER_DOCS = NO -SORT_BRIEF_DOCS = NO -SORT_MEMBERS_CTORS_1ST = NO -SORT_GROUP_NAMES = NO -SORT_BY_SCOPE_NAME = NO -STRICT_PROTO_MATCHING = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_FILES = YES -SHOW_NAMESPACES = YES -FILE_VERSION_FILTER = -LAYOUT_FILE = -CITE_BIB_FILES = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = YES -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = NO -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = ../libfftpack -INPUT_ENCODING = UTF-8 -FILE_PATTERNS = *.h \ - *.c \ - *.dox -RECURSIVE = YES -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXCLUDE_SYMBOLS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -FILTER_SOURCE_PATTERNS = -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = YES -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = NO -REFERENCED_BY_RELATION = NO -REFERENCES_RELATION = NO -REFERENCES_LINK_SOURCE = YES -USE_HTAGS = NO -VERBATIM_HEADERS = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = YES -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = htmldoc -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = footer.html -HTML_STYLESHEET = -HTML_EXTRA_FILES = -HTML_COLORSTYLE_HUE = 220 -HTML_COLORSTYLE_SAT = 100 -HTML_COLORSTYLE_GAMMA = 80 -HTML_TIMESTAMP = YES -HTML_DYNAMIC_SECTIONS = NO -HTML_INDEX_NUM_ENTRIES = 100 -GENERATE_DOCSET = NO -DOCSET_FEEDNAME = "Doxygen generated docs" -DOCSET_BUNDLE_ID = org.doxygen.Project -DOCSET_PUBLISHER_ID = org.doxygen.Publisher -DOCSET_PUBLISHER_NAME = Publisher -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -CHM_INDEX_ENCODING = -BINARY_TOC = NO -TOC_EXPAND = NO -GENERATE_QHP = NO -QCH_FILE = -QHP_NAMESPACE = org.doxygen.Project -QHP_VIRTUAL_FOLDER = doc -QHP_CUST_FILTER_NAME = -QHP_CUST_FILTER_ATTRS = -QHP_SECT_FILTER_ATTRS = -QHG_LOCATION = -GENERATE_ECLIPSEHELP = NO -ECLIPSE_DOC_ID = org.doxygen.Project -DISABLE_INDEX = NO -GENERATE_TREEVIEW = NO -ENUM_VALUES_PER_LINE = 4 -TREEVIEW_WIDTH = 250 -EXT_LINKS_IN_WINDOW = NO -FORMULA_FONTSIZE = 10 -FORMULA_TRANSPARENT = YES -USE_MATHJAX = NO -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest -MATHJAX_EXTENSIONS = -SEARCHENGINE = NO -SERVER_BASED_SEARCH = NO -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = YES -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -LATEX_FOOTER = -PDF_HYPERLINKS = YES -USE_PDFLATEX = YES -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -LATEX_SOURCE_CODE = NO -LATEX_BIB_STYLE = plain -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = c_utils.tag=../c_utils -GENERATE_TAGFILE = libfftpack.tag -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = YES -MSCGEN_PATH = -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = NO -DOT_NUM_THREADS = 0 -DOT_FONTNAME = FreeSans -DOT_FONTSIZE = 10 -DOT_FONTPATH = -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -GROUP_GRAPHS = YES -UML_LOOK = NO -UML_LIMIT_NUM_FIELDS = 10 -TEMPLATE_RELATIONS = YES -INCLUDE_GRAPH = NO -INCLUDED_BY_GRAPH = NO -CALL_GRAPH = NO -CALLER_GRAPH = NO -GRAPHICAL_HIERARCHY = NO -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -INTERACTIVE_SVG = NO -DOT_PATH = -DOTFILE_DIRS = -MSCFILE_DIRS = -DOT_GRAPH_MAX_NODES = 50 -MAX_DOT_GRAPH_DEPTH = 0 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES diff --git a/external/cosmotool/external/sharp/docsrc/libsharp.dox b/external/cosmotool/external/sharp/docsrc/libsharp.dox deleted file mode 100644 index b476ab4..0000000 --- a/external/cosmotool/external/sharp/docsrc/libsharp.dox +++ /dev/null @@ -1,291 +0,0 @@ -# Doxyfile 1.8.1 - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -DOXYFILE_ENCODING = UTF-8 -PROJECT_NAME = "LevelS SHT library" -PROJECT_NUMBER = 0.1 -PROJECT_BRIEF = -PROJECT_LOGO = -OUTPUT_DIRECTORY = . -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -BRIEF_MEMBER_DESC = NO -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = NO -STRIP_FROM_PATH = -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = NO -QT_AUTOBRIEF = NO -MULTILINE_CPP_IS_BRIEF = NO -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 8 -ALIASES = -TCL_SUBST = -OPTIMIZE_OUTPUT_FOR_C = YES -OPTIMIZE_OUTPUT_JAVA = NO -OPTIMIZE_FOR_FORTRAN = NO -OPTIMIZE_OUTPUT_VHDL = NO -EXTENSION_MAPPING = -MARKDOWN_SUPPORT = YES -BUILTIN_STL_SUPPORT = NO -CPP_CLI_SUPPORT = NO -SIP_SUPPORT = NO -IDL_PROPERTY_SUPPORT = YES -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES -INLINE_GROUPED_CLASSES = NO -INLINE_SIMPLE_STRUCTS = NO -TYPEDEF_HIDES_STRUCT = NO -SYMBOL_CACHE_SIZE = 0 -LOOKUP_CACHE_SIZE = 0 -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = NO -EXTRACT_PRIVATE = NO -EXTRACT_PACKAGE = NO -EXTRACT_STATIC = NO -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -EXTRACT_ANON_NSPACES = NO -HIDE_UNDOC_MEMBERS = YES -HIDE_UNDOC_CLASSES = YES -HIDE_FRIEND_COMPOUNDS = YES -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = YES -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -FORCE_LOCAL_INCLUDES = NO -INLINE_INFO = YES -SORT_MEMBER_DOCS = NO -SORT_BRIEF_DOCS = NO -SORT_MEMBERS_CTORS_1ST = NO -SORT_GROUP_NAMES = NO -SORT_BY_SCOPE_NAME = NO -STRICT_PROTO_MATCHING = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_FILES = YES -SHOW_NAMESPACES = YES -FILE_VERSION_FILTER = -LAYOUT_FILE = -CITE_BIB_FILES = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = YES -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = NO -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = ../libsharp -INPUT_ENCODING = UTF-8 -FILE_PATTERNS = *.h \ - *.c \ - *.dox -RECURSIVE = YES -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXCLUDE_SYMBOLS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -FILTER_SOURCE_PATTERNS = -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = YES -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = NO -REFERENCED_BY_RELATION = NO -REFERENCES_RELATION = NO -REFERENCES_LINK_SOURCE = YES -USE_HTAGS = NO -VERBATIM_HEADERS = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = YES -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = htmldoc -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = footer.html -HTML_STYLESHEET = -HTML_EXTRA_FILES = -HTML_COLORSTYLE_HUE = 220 -HTML_COLORSTYLE_SAT = 100 -HTML_COLORSTYLE_GAMMA = 80 -HTML_TIMESTAMP = YES -HTML_DYNAMIC_SECTIONS = NO -HTML_INDEX_NUM_ENTRIES = 100 -GENERATE_DOCSET = NO -DOCSET_FEEDNAME = "Doxygen generated docs" -DOCSET_BUNDLE_ID = org.doxygen.Project -DOCSET_PUBLISHER_ID = org.doxygen.Publisher -DOCSET_PUBLISHER_NAME = Publisher -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -CHM_INDEX_ENCODING = -BINARY_TOC = NO -TOC_EXPAND = NO -GENERATE_QHP = NO -QCH_FILE = -QHP_NAMESPACE = org.doxygen.Project -QHP_VIRTUAL_FOLDER = doc -QHP_CUST_FILTER_NAME = -QHP_CUST_FILTER_ATTRS = -QHP_SECT_FILTER_ATTRS = -QHG_LOCATION = -GENERATE_ECLIPSEHELP = NO -ECLIPSE_DOC_ID = org.doxygen.Project -DISABLE_INDEX = NO -GENERATE_TREEVIEW = NO -ENUM_VALUES_PER_LINE = 4 -TREEVIEW_WIDTH = 250 -EXT_LINKS_IN_WINDOW = NO -FORMULA_FONTSIZE = 10 -FORMULA_TRANSPARENT = YES -USE_MATHJAX = NO -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest -MATHJAX_EXTENSIONS = -SEARCHENGINE = NO -SERVER_BASED_SEARCH = NO -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = YES -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -LATEX_FOOTER = -PDF_HYPERLINKS = YES -USE_PDFLATEX = YES -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -LATEX_SOURCE_CODE = NO -LATEX_BIB_STYLE = plain -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = libfftpack.tag=../libfftpack \ - c_utils.tag=../c_utils -GENERATE_TAGFILE = libsharp.tag -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = YES -MSCGEN_PATH = -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = NO -DOT_NUM_THREADS = 0 -DOT_FONTNAME = FreeSans -DOT_FONTSIZE = 10 -DOT_FONTPATH = -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -GROUP_GRAPHS = YES -UML_LOOK = NO -UML_LIMIT_NUM_FIELDS = 10 -TEMPLATE_RELATIONS = YES -INCLUDE_GRAPH = NO -INCLUDED_BY_GRAPH = NO -CALL_GRAPH = NO -CALLER_GRAPH = NO -GRAPHICAL_HIERARCHY = NO -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -INTERACTIVE_SVG = NO -DOT_PATH = -DOTFILE_DIRS = -MSCFILE_DIRS = -DOT_GRAPH_MAX_NODES = 50 -MAX_DOT_GRAPH_DEPTH = 0 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES diff --git a/external/cosmotool/external/sharp/docsrc/planck.make b/external/cosmotool/external/sharp/docsrc/planck.make deleted file mode 100644 index 0d0a462..0000000 --- a/external/cosmotool/external/sharp/docsrc/planck.make +++ /dev/null @@ -1,20 +0,0 @@ -PKG:=docsrc - -docsrc_idx: $(DOCDIR)_mkdir - cp $(SRCROOT)/docsrc/index_code.html $(DOCDIR)/index.html - -docsrc_code_doc: $(DOCDIR)_mkdir docsrc_idx - cd $(SRCROOT)/docsrc; \ - for i in c_utils libfftpack libsharp; do \ - doxygen $${i}.dox; \ - rm -rf $(DOCDIR)/$${i}; mv htmldoc $(DOCDIR)/$${i}; \ - done; \ - rm *.tag; - -docsrc_clean: - cd $(SRCROOT)/docsrc; \ - rm -f *.tag - cd $(SRCROOT)/docsrc; \ - rm -rf htmldoc - -doc: docsrc_code_doc diff --git a/external/cosmotool/external/sharp/libfftpack/README b/external/cosmotool/external/sharp/libfftpack/README deleted file mode 100644 index 2c7e7cb..0000000 --- a/external/cosmotool/external/sharp/libfftpack/README +++ /dev/null @@ -1,34 +0,0 @@ -ls_fft description: - -This package is intended to calculate one-dimensional real or complex FFTs -with high accuracy and good efficiency even for lengths containing large -prime factors. -The code is written in C, but a Fortran wrapper exists as well. - -Before any FFT is executed, a plan must be generated for it. Plan creation -is designed to be fast, so that there is no significant overhead if the -plan is only used once or a few times. - -The main component of the code is based on Paul N. Swarztrauber's FFTPACK in the -double precision incarnation by Hugh C. Pumphrey -(http://www.netlib.org/fftpack/dp.tgz). - -I replaced the iterative sine and cosine calculations in radfg() and radbg() -by an exact calculation, which slightly improves the transform accuracy for -real FFTs with lengths containing large prime factors. - -Since FFTPACK becomes quite slow for FFT lengths with large prime factors -(in the worst case of prime lengths it reaches O(n*n) complexity), I -implemented Bluestein's algorithm, which computes a FFT of length n by -several FFTs of length n2>=2*n-1 and a convolution. Since n2 can be chosen -to be highly composite, this algorithm is more efficient if n has large -prime factors. The longer FFTs themselves are then computed using the FFTPACK -routines. -Bluestein's algorithm was implemented according to the description at -http://en.wikipedia.org/wiki/Bluestein's_FFT_algorithm. - -Thread-safety: -All routines can be called concurrently; all information needed by ls_fft -is stored in the plan variable. However, using the same plan variable on -multiple threads simultaneously is not supported and will lead to data -corruption. diff --git a/external/cosmotool/external/sharp/libfftpack/bluestein.c b/external/cosmotool/external/sharp/libfftpack/bluestein.c deleted file mode 100644 index 2e2005c..0000000 --- a/external/cosmotool/external/sharp/libfftpack/bluestein.c +++ /dev/null @@ -1,173 +0,0 @@ -/* - * This file is part of libfftpack. - * - * libfftpack is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libfftpack is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libfftpack; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libfftpack is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/* - * Copyright (C) 2005, 2006, 2007, 2008 Max-Planck-Society - * \author Martin Reinecke - */ - -#include -#include -#include "fftpack.h" -#include "bluestein.h" - -/* returns the sum of all prime factors of n */ -size_t prime_factor_sum (size_t n) - { - size_t result=0,x,limit,tmp; - while (((tmp=(n>>1))<<1)==n) - { result+=2; n=tmp; } - - limit=(size_t)sqrt(n+0.01); - for (x=3; x<=limit; x+=2) - while ((tmp=(n/x))*x==n) - { - result+=x; - n=tmp; - limit=(size_t)sqrt(n+0.01); - } - if (n>1) result+=n; - - return result; - } - -/* returns the smallest composite of 2, 3 and 5 which is >= n */ -static size_t good_size(size_t n) - { - size_t f2, f23, f235, bestfac=2*n; - if (n<=6) return n; - - for (f2=1; f2=n) bestfac=f235; - return bestfac; - } - -void bluestein_i (size_t n, double **tstorage, size_t *worksize) - { - static const double pi=3.14159265358979323846; - size_t n2=good_size(n*2-1); - size_t m, coeff; - double angle, xn2; - double *bk, *bkf, *work; - double pibyn=pi/n; - *worksize=2+2*n+8*n2+16; - *tstorage = RALLOC(double,2+2*n+8*n2+16); - ((size_t *)(*tstorage))[0]=n2; - bk = *tstorage+2; - bkf = *tstorage+2+2*n; - work= *tstorage+2+2*(n+n2); - -/* initialize b_k */ - bk[0] = 1; - bk[1] = 0; - - coeff=0; - for (m=1; m=2*n) coeff-=2*n; - angle = pibyn*coeff; - bk[2*m] = cos(angle); - bk[2*m+1] = sin(angle); - } - -/* initialize the zero-padded, Fourier transformed b_k. Add normalisation. */ - xn2 = 1./n2; - bkf[0] = bk[0]*xn2; - bkf[1] = bk[1]*xn2; - for (m=2; m<2*n; m+=2) - { - bkf[m] = bkf[2*n2-m] = bk[m] *xn2; - bkf[m+1] = bkf[2*n2-m+1] = bk[m+1] *xn2; - } - for (m=2*n;m<=(2*n2-2*n+1);++m) - bkf[m]=0.; - cffti (n2,work); - cfftf (n2,bkf,work); - } - -void bluestein (size_t n, double *data, double *tstorage, int isign) - { - size_t n2=*((size_t *)tstorage); - size_t m; - double *bk, *bkf, *akf, *work; - bk = tstorage+2; - bkf = tstorage+2+2*n; - work= tstorage+2+2*(n+n2); - akf = tstorage+2+2*n+6*n2+16; - -/* initialize a_k and FFT it */ - if (isign>0) - for (m=0; m<2*n; m+=2) - { - akf[m] = data[m]*bk[m] - data[m+1]*bk[m+1]; - akf[m+1] = data[m]*bk[m+1] + data[m+1]*bk[m]; - } - else - for (m=0; m<2*n; m+=2) - { - akf[m] = data[m]*bk[m] + data[m+1]*bk[m+1]; - akf[m+1] =-data[m]*bk[m+1] + data[m+1]*bk[m]; - } - for (m=2*n; m<2*n2; ++m) - akf[m]=0; - - cfftf (n2,akf,work); - -/* do the convolution */ - if (isign>0) - for (m=0; m<2*n2; m+=2) - { - double im = -akf[m]*bkf[m+1] + akf[m+1]*bkf[m]; - akf[m ] = akf[m]*bkf[m] + akf[m+1]*bkf[m+1]; - akf[m+1] = im; - } - else - for (m=0; m<2*n2; m+=2) - { - double im = akf[m]*bkf[m+1] + akf[m+1]*bkf[m]; - akf[m ] = akf[m]*bkf[m] - akf[m+1]*bkf[m+1]; - akf[m+1] = im; - } - - -/* inverse FFT */ - cfftb (n2,akf,work); - -/* multiply by b_k* */ - if (isign>0) - for (m=0; m<2*n; m+=2) - { - data[m] = bk[m] *akf[m] - bk[m+1]*akf[m+1]; - data[m+1] = bk[m+1]*akf[m] + bk[m] *akf[m+1]; - } - else - for (m=0; m<2*n; m+=2) - { - data[m] = bk[m] *akf[m] + bk[m+1]*akf[m+1]; - data[m+1] =-bk[m+1]*akf[m] + bk[m] *akf[m+1]; - } - } diff --git a/external/cosmotool/external/sharp/libfftpack/bluestein.h b/external/cosmotool/external/sharp/libfftpack/bluestein.h deleted file mode 100644 index 91e5b28..0000000 --- a/external/cosmotool/external/sharp/libfftpack/bluestein.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * This file is part of libfftpack. - * - * libfftpack is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libfftpack is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libfftpack; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libfftpack is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/* - * Copyright (C) 2005 Max-Planck-Society - * \author Martin Reinecke - */ - -#ifndef PLANCK_BLUESTEIN_H -#define PLANCK_BLUESTEIN_H - -#include "c_utils.h" - -#ifdef __cplusplus -extern "C" { -#endif - -size_t prime_factor_sum (size_t n); - -void bluestein_i (size_t n, double **tstorage, size_t *worksize); -void bluestein (size_t n, double *data, double *tstorage, int isign); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/external/cosmotool/external/sharp/libfftpack/fftpack.c b/external/cosmotool/external/sharp/libfftpack/fftpack.c deleted file mode 100644 index 6d09d06..0000000 --- a/external/cosmotool/external/sharp/libfftpack/fftpack.c +++ /dev/null @@ -1,833 +0,0 @@ -/* - * This file is part of libfftpack. - * - * libfftpack is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libfftpack is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libfftpack; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libfftpack is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/* - fftpack.c : A set of FFT routines in C. - Algorithmically based on Fortran-77 FFTPACK by Paul N. Swarztrauber - (Version 4, 1985). - - C port by Martin Reinecke (2010) - */ - -#include -#include -#include -#include "fftpack.h" - -#define WA(x,i) wa[(i)+(x)*ido] -#define CH(a,b,c) ch[(a)+ido*((b)+l1*(c))] -#define CC(a,b,c) cc[(a)+ido*((b)+cdim*(c))] -#define PM(a,b,c,d) { a=c+d; b=c-d; } -#define PMC(a,b,c,d) { a.r=c.r+d.r; a.i=c.i+d.i; b.r=c.r-d.r; b.i=c.i-d.i; } -#define ADDC(a,b,c) { a.r=b.r+c.r; a.i=b.i+c.i; } -#define SCALEC(a,b) { a.r*=b; a.i*=b; } -#define CONJFLIPC(a) { double tmp_=a.r; a.r=-a.i; a.i=tmp_; } -/* (a+ib) = conj(c+id) * (e+if) */ -#define MULPM(a,b,c,d,e,f) { a=c*e+d*f; b=c*f-d*e; } - -typedef struct { - double r,i; -} cmplx; - -#define CONCAT(a,b) a ## b - -#define X(arg) CONCAT(passb,arg) -#define BACKWARD -#include "fftpack_inc.c" -#undef BACKWARD -#undef X - -#define X(arg) CONCAT(passf,arg) -#include "fftpack_inc.c" -#undef X - -#undef CC -#undef CH -#define CC(a,b,c) cc[(a)+ido*((b)+l1*(c))] -#define CH(a,b,c) ch[(a)+ido*((b)+cdim*(c))] - -static void radf2 (size_t ido, size_t l1, const double *cc, double *ch, - const double *wa) - { - const size_t cdim=2; - size_t i, k, ic; - double ti2, tr2; - - for (k=0; k=2*ip) aidx-=2*ip; - ar2=csarr[aidx]; - ai2=csarr[aidx+1]; - for(ik=0; ik=2*ip) aidx-=2*ip; - ar2=csarr[aidx]; - ai2=csarr[aidx+1]; - for(ik=0; ik0) ? passb4(ido, l1, p1, p2, wa+iw) - : passf4(ido, l1, p1, p2, wa+iw); - else if(ip==2) - (isign>0) ? passb2(ido, l1, p1, p2, wa+iw) - : passf2(ido, l1, p1, p2, wa+iw); - else if(ip==3) - (isign>0) ? passb3(ido, l1, p1, p2, wa+iw) - : passf3(ido, l1, p1, p2, wa+iw); - else if(ip==5) - (isign>0) ? passb5(ido, l1, p1, p2, wa+iw) - : passf5(ido, l1, p1, p2, wa+iw); - else if(ip==6) - (isign>0) ? passb6(ido, l1, p1, p2, wa+iw) - : passf6(ido, l1, p1, p2, wa+iw); - else - (isign>0) ? passbg(ido, ip, l1, p1, p2, wa+iw) - : passfg(ido, ip, l1, p1, p2, wa+iw); - SWAP(p1,p2,cmplx *); - l1=l2; - iw+=(ip-1)*ido; - } - if (p1!=c) - memcpy (c,p1,n*sizeof(cmplx)); - } - -void cfftf(size_t n, double c[], double wsave[]) - { - if (n!=1) - cfft1(n, (cmplx*)c, (cmplx*)wsave, (cmplx*)(wsave+2*n), - (size_t*)(wsave+4*n),-1); - } - -void cfftb(size_t n, double c[], double wsave[]) - { - if (n!=1) - cfft1(n, (cmplx*)c, (cmplx*)wsave, (cmplx*)(wsave+2*n), - (size_t*)(wsave+4*n),+1); - } - -static void factorize (size_t n, const size_t *pf, size_t npf, size_t *ifac) - { - size_t nl=n, nf=0, ntry=0, j=0, i; - -startloop: - j++; - ntry = (j<=npf) ? pf[j-1] : ntry+2; - do - { - size_t nq=nl / ntry; - size_t nr=nl-ntry*nq; - if (nr!=0) - goto startloop; - nf++; - ifac[nf+1]=ntry; - nl=nq; - if ((ntry==2) && (nf!=1)) - { - for (i=nf+1; i>2; --i) - ifac[i]=ifac[i-1]; - ifac[2]=2; - } - } - while(nl!=1); - ifac[0]=n; - ifac[1]=nf; - } - -static void cffti1(size_t n, double wa[], size_t ifac[]) - { - static const size_t ntryh[5]={4,6,3,2,5}; - static const double twopi=6.28318530717958647692; - size_t j, k, fi; - - double argh=twopi/n; - size_t i=0, l1=1; - factorize (n,ntryh,5,ifac); - for(k=1; k<=ifac[1]; k++) - { - size_t ip=ifac[k+1]; - size_t ido=n/(l1*ip); - for(j=1; j6) - { - wa[is ]=wa[i ]; - wa[is+1]=wa[i+1]; - } - } - l1*=ip; - } - } - -void cffti(size_t n, double wsave[]) - { if (n!=1) cffti1(n, wsave+2*n,(size_t*)(wsave+4*n)); } - - -/*---------------------------------------------------------------------- - rfftf1, rfftb1, rfftf, rfftb, rffti1, rffti. Real FFTs. - ----------------------------------------------------------------------*/ - -static void rfftf1(size_t n, double c[], double ch[], const double wa[], - const size_t ifac[]) - { - size_t k1, l1=n, nf=ifac[1], iw=n-1; - double *p1=ch, *p2=c; - - for(k1=1; k1<=nf;++k1) - { - size_t ip=ifac[nf-k1+2]; - size_t ido=n / l1; - l1 /= ip; - iw-=(ip-1)*ido; - SWAP (p1,p2,double *); - if(ip==4) - radf4(ido, l1, p1, p2, wa+iw); - else if(ip==2) - radf2(ido, l1, p1, p2, wa+iw); - else if(ip==3) - radf3(ido, l1, p1, p2, wa+iw); - else if(ip==5) - radf5(ido, l1, p1, p2, wa+iw); - else - { - if (ido==1) - SWAP (p1,p2,double *); - radfg(ido, ip, l1, ido*l1, p1, p2, wa+iw); - SWAP (p1,p2,double *); - } - } - if (p1==c) - memcpy (c,ch,n*sizeof(double)); - } - -static void rfftb1(size_t n, double c[], double ch[], const double wa[], - const size_t ifac[]) - { - size_t k1, l1=1, nf=ifac[1], iw=0; - double *p1=c, *p2=ch; - - for(k1=1; k1<=nf; k1++) - { - size_t ip = ifac[k1+1], - ido= n/(ip*l1); - if(ip==4) - radb4(ido, l1, p1, p2, wa+iw); - else if(ip==2) - radb2(ido, l1, p1, p2, wa+iw); - else if(ip==3) - radb3(ido, l1, p1, p2, wa+iw); - else if(ip==5) - radb5(ido, l1, p1, p2, wa+iw); - else - { - radbg(ido, ip, l1, ido*l1, p1, p2, wa+iw); - if (ido!=1) - SWAP (p1,p2,double *); - } - SWAP (p1,p2,double *); - l1*=ip; - iw+=(ip-1)*ido; - } - if (p1!=c) - memcpy (c,ch,n*sizeof(double)); - } - -void rfftf(size_t n, double r[], double wsave[]) - { if(n!=1) rfftf1(n, r, wsave, wsave+n,(size_t*)(wsave+2*n)); } - -void rfftb(size_t n, double r[], double wsave[]) - { if(n!=1) rfftb1(n, r, wsave, wsave+n,(size_t*)(wsave+2*n)); } - -static void rffti1(size_t n, double wa[], size_t ifac[]) - { - static const size_t ntryh[4]={4,2,3,5}; - static const double twopi=6.28318530717958647692; - size_t i, j, k, fi; - - double argh=twopi/n; - size_t is=0, l1=1; - factorize (n,ntryh,4,ifac); - for (k=1; kip) iang-=ip; - abr.r += ccl[l ].r*wal[iang].r; - abr.i += ccl[l ].i*wal[iang].r; - abi.r += ccl[lc].r*wal[iang].i; - abi.i += ccl[lc].i*wal[iang].i; - } -#ifndef BACKWARD - { abi.i=-abi.i; abi.r=-abi.r; } -#endif - CONJFLIPC(abi) - PMC(CH(i,k,j),CH(i,k,jc),abr,abi) - } - } - - DEALLOC(tarr); - - if (ido==1) return; - - for (j=1; j -
  • \ref fftgroup "Programming interface" - - */ diff --git a/external/cosmotool/external/sharp/libfftpack/ls_fft.c b/external/cosmotool/external/sharp/libfftpack/ls_fft.c deleted file mode 100644 index b1c0c96..0000000 --- a/external/cosmotool/external/sharp/libfftpack/ls_fft.c +++ /dev/null @@ -1,291 +0,0 @@ -/* - * This file is part of libfftpack. - * - * libfftpack is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libfftpack is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libfftpack; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libfftpack is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/* - * Copyright (C) 2005 Max-Planck-Society - * \author Martin Reinecke - */ - -#include -#include -#include -#include "bluestein.h" -#include "fftpack.h" -#include "ls_fft.h" - -complex_plan make_complex_plan (size_t length) - { - complex_plan plan = RALLOC(complex_plan_i,1); - size_t pfsum = prime_factor_sum(length); - double comp1 = (double)(length*pfsum); - double comp2 = 2*3*length*log(3.*length); - comp2*=3.; /* fudge factor that appears to give good overall performance */ - plan->length=length; - plan->bluestein = (comp2bluestein) - bluestein_i (length,&(plan->work),&(plan->worksize)); - else - { - plan->worksize=4*length+15; - plan->work=RALLOC(double,4*length+15); - cffti(length, plan->work); - } - return plan; - } - -complex_plan copy_complex_plan (complex_plan plan) - { - if (!plan) return NULL; - { - complex_plan newplan = RALLOC(complex_plan_i,1); - *newplan = *plan; - newplan->work=RALLOC(double,newplan->worksize); - memcpy(newplan->work,plan->work,sizeof(double)*newplan->worksize); - return newplan; - } - } - -void kill_complex_plan (complex_plan plan) - { - DEALLOC(plan->work); - DEALLOC(plan); - } - -void complex_plan_forward (complex_plan plan, double *data) - { - if (plan->bluestein) - bluestein (plan->length, data, plan->work, -1); - else - cfftf (plan->length, data, plan->work); - } - -void complex_plan_backward (complex_plan plan, double *data) - { - if (plan->bluestein) - bluestein (plan->length, data, plan->work, 1); - else - cfftb (plan->length, data, plan->work); - } - - -real_plan make_real_plan (size_t length) - { - real_plan plan = RALLOC(real_plan_i,1); - size_t pfsum = prime_factor_sum(length); - double comp1 = .5*length*pfsum; - double comp2 = 2*3*length*log(3.*length); - comp2*=3; /* fudge factor that appears to give good overall performance */ - plan->length=length; - plan->bluestein = (comp2bluestein) - bluestein_i (length,&(plan->work),&(plan->worksize)); - else - { - plan->worksize=2*length+15; - plan->work=RALLOC(double,2*length+15); - rffti(length, plan->work); - } - return plan; - } - -real_plan copy_real_plan (real_plan plan) - { - if (!plan) return NULL; - { - real_plan newplan = RALLOC(real_plan_i,1); - *newplan = *plan; - newplan->work=RALLOC(double,newplan->worksize); - memcpy(newplan->work,plan->work,sizeof(double)*newplan->worksize); - return newplan; - } - } - -void kill_real_plan (real_plan plan) - { - DEALLOC(plan->work); - DEALLOC(plan); - } - -void real_plan_forward_fftpack (real_plan plan, double *data) - { - if (plan->bluestein) - { - size_t m; - size_t n=plan->length; - double *tmp = RALLOC(double,2*n); - for (m=0; mwork,-1); - data[0] = tmp[0]; - memcpy (data+1, tmp+2, (n-1)*sizeof(double)); - DEALLOC(tmp); - } - else - rfftf (plan->length, data, plan->work); - } - -static void fftpack2halfcomplex (double *data, size_t n) - { - size_t m; - double *tmp = RALLOC(double,n); - tmp[0]=data[0]; - for (m=1; m<(n+1)/2; ++m) - { - tmp[m]=data[2*m-1]; - tmp[n-m]=data[2*m]; - } - if (!(n&1)) - tmp[n/2]=data[n-1]; - memcpy (data,tmp,n*sizeof(double)); - DEALLOC(tmp); - } - -static void halfcomplex2fftpack (double *data, size_t n) - { - size_t m; - double *tmp = RALLOC(double,n); - tmp[0]=data[0]; - for (m=1; m<(n+1)/2; ++m) - { - tmp[2*m-1]=data[m]; - tmp[2*m]=data[n-m]; - } - if (!(n&1)) - tmp[n-1]=data[n/2]; - memcpy (data,tmp,n*sizeof(double)); - DEALLOC(tmp); - } - -void real_plan_forward_fftw (real_plan plan, double *data) - { - real_plan_forward_fftpack (plan, data); - fftpack2halfcomplex (data,plan->length); - } - -void real_plan_backward_fftpack (real_plan plan, double *data) - { - if (plan->bluestein) - { - size_t m; - size_t n=plan->length; - double *tmp = RALLOC(double,2*n); - tmp[0]=data[0]; - tmp[1]=0.; - memcpy (tmp+2,data+1, (n-1)*sizeof(double)); - if ((n&1)==0) tmp[n+1]=0.; - for (m=2; mwork, 1); - for (m=0; mlength, data, plan->work); - } - -void real_plan_backward_fftw (real_plan plan, double *data) - { - halfcomplex2fftpack (data,plan->length); - real_plan_backward_fftpack (plan, data); - } - -void real_plan_forward_c (real_plan plan, double *data) - { - size_t m; - size_t n=plan->length; - - if (plan->bluestein) - { - for (m=1; m<2*n; m+=2) - data[m]=0; - bluestein (plan->length, data, plan->work, -1); - data[1]=0; - for (m=2; mwork); - data[0] = data[1]; - data[1] = 0; - for (m=2; mlength; - - if (plan->bluestein) - { - size_t m; - data[1]=0; - for (m=2; mlength, data, plan->work, 1); - for (m=1; m<2*n; m+=2) - data[m]=0; - } - else - { - ptrdiff_t m; - data[1] = data[0]; - rfftb (n, data+1, plan->work); - for (m=n-1; m>=0; --m) - { - data[2*m] = data[m+1]; - data[2*m+1] = 0.; - } - } - } diff --git a/external/cosmotool/external/sharp/libfftpack/ls_fft.h b/external/cosmotool/external/sharp/libfftpack/ls_fft.h deleted file mode 100644 index 8675454..0000000 --- a/external/cosmotool/external/sharp/libfftpack/ls_fft.h +++ /dev/null @@ -1,162 +0,0 @@ -/* - * This file is part of libfftpack. - * - * libfftpack is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libfftpack is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libfftpack; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libfftpack is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/*! \file ls_fft.h - * Interface for the LevelS FFT package. - * - * Copyright (C) 2004 Max-Planck-Society - * \author Martin Reinecke - */ - -#ifndef PLANCK_LS_FFT_H -#define PLANCK_LS_FFT_H - -#include "c_utils.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/*!\defgroup fftgroup FFT interface -This package is intended to calculate one-dimensional real or complex FFTs -with high accuracy and good efficiency even for lengths containing large -prime factors. -The code is written in C, but a Fortran wrapper exists as well. - -Before any FFT is executed, a plan must be generated for it. Plan creation -is designed to be fast, so that there is no significant overhead if the -plan is only used once or a few times. - -The main component of the code is based on Paul N. Swarztrauber's FFTPACK in the -double precision incarnation by Hugh C. Pumphrey -(http://www.netlib.org/fftpack/dp.tgz). - -I replaced the iterative sine and cosine calculations in radfg() and radbg() -by an exact calculation, which slightly improves the transform accuracy for -real FFTs with lengths containing large prime factors. - -Since FFTPACK becomes quite slow for FFT lengths with large prime factors -(in the worst case of prime lengths it reaches \f$\mathcal{O}(n^2)\f$ -complexity), I implemented Bluestein's algorithm, which computes a FFT of length -\f$n\f$ by several FFTs of length \f$n_2\ge 2n-1\f$ and a convolution. Since -\f$n_2\f$ can be chosen to be highly composite, this algorithm is more efficient -if \f$n\f$ has large prime factors. The longer FFTs themselves are then computed -using the FFTPACK routines. -Bluestein's algorithm was implemented according to the description on Wikipedia -( -http://en.wikipedia.org/wiki/Bluestein%27s_FFT_algorithm). - -\b Thread-safety: -All routines can be called concurrently; all information needed by -ls_fft is stored in the plan variable. However, using the same plan -variable on multiple threads simultaneously is not supported and will lead to -data corruption. -*/ -/*! \{ */ - -typedef struct - { - double *work; - size_t length, worksize; - int bluestein; - } complex_plan_i; - -/*! The opaque handle type for complex-FFT plans. */ -typedef complex_plan_i * complex_plan; - -/*! Returns a plan for a complex FFT with \a length elements. */ -complex_plan make_complex_plan (size_t length); -/*! Constructs a copy of \a plan. */ -complex_plan copy_complex_plan (complex_plan plan); -/*! Destroys a plan for a complex FFT. */ -void kill_complex_plan (complex_plan plan); -/*! Computes a complex forward FFT on \a data, using \a plan. - \a Data has the form r0, i0, r1, i1, ..., - r[length-1], i[length-1]. */ -void complex_plan_forward (complex_plan plan, double *data); -/*! Computes a complex backward FFT on \a data, using \a plan. - \a Data has the form r0, i0, r1, i1, ..., - r[length-1], i[length-1]. */ -void complex_plan_backward (complex_plan plan, double *data); - -typedef struct - { - double *work; - size_t length, worksize; - int bluestein; - } real_plan_i; - -/*! The opaque handle type for real-FFT plans. */ -typedef real_plan_i * real_plan; - -/*! Returns a plan for a real FFT with \a length elements. */ -real_plan make_real_plan (size_t length); -/*! Constructs a copy of \a plan. */ -real_plan copy_real_plan (real_plan plan); -/*! Destroys a plan for a real FFT. */ -void kill_real_plan (real_plan plan); -/*! Computes a real forward FFT on \a data, using \a plan - and assuming the FFTPACK storage scheme: - - on entry, \a data has the form r0, r1, ..., r[length-1]; - - on exit, it has the form r0, r1, i1, r2, i2, ... - (a total of \a length values). */ -void real_plan_forward_fftpack (real_plan plan, double *data); -/*! Computes a real forward FFT on \a data, using \a plan - and assuming the FFTPACK storage scheme: - - on entry, \a data has the form r0, r1, i1, r2, i2, ... - (a total of \a length values); - - on exit, it has the form r0, r1, ..., r[length-1]. */ -void real_plan_backward_fftpack (real_plan plan, double *data); -/*! Computes a real forward FFT on \a data, using \a plan - and assuming the FFTW halfcomplex storage scheme: - - on entry, \a data has the form r0, r1, ..., r[length-1]; - - on exit, it has the form r0, r1, r2, ..., i2, i1. */ -void real_plan_forward_fftw (real_plan plan, double *data); -/*! Computes a real backward FFT on \a data, using \a plan - and assuming the FFTW halfcomplex storage scheme: - - on entry, \a data has the form r0, r1, r2, ..., i2, i1. - - on exit, it has the form r0, r1, ..., r[length-1]. */ -void real_plan_backward_fftw (real_plan plan, double *data); -/*! Computes a real forward FFT on \a data, using \a plan - and assuming a full-complex storage scheme: - - on entry, \a data has the form r0, [ignored], r1, [ignored], ..., - r[length-1], [ignored]; - - on exit, it has the form r0, i0, r1, i1, ..., - r[length-1], i[length-1]. - */ -void real_plan_forward_c (real_plan plan, double *data); -/*! Computes a real backward FFT on \a data, using \a plan - and assuming a full-complex storage scheme: - - on entry, \a data has the form r0, i0, r1, i1, ..., - r[length-1], i[length-1]; - - on exit, it has the form r0, 0, r1, 0, ..., r[length-1], 0. */ -void real_plan_backward_c (real_plan plan, double *data); - -/*! \} */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/external/cosmotool/external/sharp/libfftpack/planck.make b/external/cosmotool/external/sharp/libfftpack/planck.make deleted file mode 100644 index c171367..0000000 --- a/external/cosmotool/external/sharp/libfftpack/planck.make +++ /dev/null @@ -1,21 +0,0 @@ -PKG:=libfftpack - -SD:=$(SRCROOT)/$(PKG) -OD:=$(BLDROOT)/$(PKG) - -FULL_INCLUDE+= -I$(SD) - -HDR_$(PKG):=$(SD)/*.h -LIB_$(PKG):=$(LIBDIR)/libfftpack.a -OBJ:=fftpack.o bluestein.o ls_fft.o -OBJ:=$(OBJ:%=$(OD)/%) - -ODEP:=$(HDR_$(PKG)) $(HDR_c_utils) - -$(OD)/fftpack.o: $(SD)/fftpack_inc.c - -$(OBJ): $(ODEP) | $(OD)_mkdir -$(LIB_$(PKG)): $(OBJ) - -all_hdr+=$(HDR_$(PKG)) -all_lib+=$(LIB_$(PKG)) diff --git a/external/cosmotool/external/sharp/libsharp/libsharp.dox b/external/cosmotool/external/sharp/libsharp/libsharp.dox deleted file mode 100644 index 810abd0..0000000 --- a/external/cosmotool/external/sharp/libsharp/libsharp.dox +++ /dev/null @@ -1,94 +0,0 @@ -/*! \mainpage libsharp documentation - - */ - -/*! \page introduction Introduction to libsharp - - "SHARP" is an acronym for Performant Spherical Harmonic Transforms. - All user-visible data types and functions in this library start with - the prefix "sharp_", or with "sharps_" and "sharpd_" for single- and - double precision variants, respectively. - - libsharp's main functionality is the conversion between maps - on the sphere and spherical harmonic coefficients (or a_lm). - A map is defined as a set of rings, which in turn consist of - individual pixels that -
      -
    • all have the same colatitude and
    • -
    • are uniformly spaced in azimuthal direction.
    • -
    - Consequently, a ring is completely defined by -
      -
    • its colatitute (in radians)
    • -
    • the number of pixels it contains
    • -
    • the azimuth (in radians) of the first pixel in the ring
    • -
    • the weight that must be multiplied to every pixel during a map - analysis (typically the solid angle of a pixel in the ring)
    • -
    • the offset of the first ring pixel in the map array
    • -
    • the stride between consecutive pixels in the ring.
    • -
    - The map array is a one-dimensional array of type float or - double, which contains the values of all map pixels. It is assumed - that the pixels of every ring are stored inside this array in order of - increasing azimuth and with the specified stride. Note however that the rings - themselves can be stored in any order inside the array. - - The a_lm array is a one-dimensional array of type complex float or - complex double, which contains all spherical harmonic coefficients - for a full or partial set of m quantum numbers with 0<=m<=mmax and m<=l<=lmax. - There is only one constraint on the internal structure of the array, which is: - - Index[a_l+1,m] = Index[a_l,m] + stride - - That means that coefficients with identical m but different l - can be interpreted as a one-dimensional array in l with a unique - stride. - - Several functions are provided for efficient index computation in this array; - they are documented \ref almgroup "here". - - Information about a pixelisation of the sphere is stored in objects of - type sharp_geom_info. It is possible to create such an object for any - supported pixelisation by using the function sharp_make_geometry_info(); - however, several easier-to-use functions are \ref geominfogroup "supplied" - for generating often-used pixelisations like ECP grids, Gaussian grids, - and Healpix grids. - - Currently, SHARP supports the following kinds of transforms: -
      -
    • scalar a_lm to map
    • -
    • scalar map to a_lm
    • - -
    • spin a_lm to map
    • -
    • spin map to a_lm
    • -
    • scalar a_lm to maps of first derivatives
    • -
    - - SHARP supports shared-memory parallelisation via OpenMP; this feature will - be automatically enabled if the compiler supports it. - - SHARP will also make use of SSE2 and AVX instructions when compiled for a - platform known to support them. - - Support for MPI-parallel transforms is also available; in this mode, - every MPI task must provide a unique subset of the map and a_lm coefficients. - - The spherical harmonic transforms can be executed on double-precision and - single-precision maps and a_lm, but for accuracy reasons the computations - will always be performed in double precision. As a consequence, - single-precision transforms will most likely not be faster than their - double-precision counterparts, but they will require significantly less - memory. - - Two example and benchmark programs are distributed with SHARP: -
      -
    • sharp_test.c checks the accuracy of the (iterative) map analysis - algorithm
    • -
    • sharp_bench.c determines the quickest transform strategy for a given - SHT
    • -
    -*/ diff --git a/external/cosmotool/external/sharp/libsharp/planck.make b/external/cosmotool/external/sharp/libsharp/planck.make deleted file mode 100644 index 0ecf992..0000000 --- a/external/cosmotool/external/sharp/libsharp/planck.make +++ /dev/null @@ -1,29 +0,0 @@ -PKG:=libsharp - -SD:=$(SRCROOT)/$(PKG) -OD:=$(BLDROOT)/$(PKG) - -FULL_INCLUDE+= -I$(SD) - -HDR_$(PKG):=$(SD)/*.h -LIB_$(PKG):=$(LIBDIR)/libsharp.a -BIN:=sharp_test sharp_acctest sharp_test_mpi sharp_bench sharp_bench2 -LIBOBJ:=sharp_ylmgen_c.o sharp.o sharp_announce.o sharp_geomhelpers.o sharp_almhelpers.o sharp_core.o -ALLOBJ:=$(LIBOBJ) sharp_test.o sharp_acctest.o sharp_test_mpi.o sharp_bench.o sharp_bench2.o -LIBOBJ:=$(LIBOBJ:%=$(OD)/%) -ALLOBJ:=$(ALLOBJ:%=$(OD)/%) - -ODEP:=$(HDR_$(PKG)) $(HDR_libfftpack) $(HDR_c_utils) -$(OD)/sharp_core.o: $(SD)/sharp_inchelper1.inc.c $(SD)/sharp_core_inc.c $(SD)/sharp_core_inc2.c $(SD)/sharp_core_inc3.c -$(OD)/sharp.o: $(SD)/sharp_mpi.c -BDEP:=$(LIB_$(PKG)) $(LIB_libfftpack) $(LIB_c_utils) - -$(LIB_$(PKG)): $(LIBOBJ) - -$(ALLOBJ): $(ODEP) | $(OD)_mkdir -BIN:=$(BIN:%=$(BINDIR)/%) -$(BIN): $(BINDIR)/% : $(OD)/%.o $(BDEP) - -all_hdr+=$(HDR_$(PKG)) -all_lib+=$(LIB_$(PKG)) -all_cbin+=$(BIN) diff --git a/external/cosmotool/external/sharp/libsharp/sharp.c b/external/cosmotool/external/sharp/libsharp/sharp.c deleted file mode 100644 index c089ecb..0000000 --- a/external/cosmotool/external/sharp/libsharp/sharp.c +++ /dev/null @@ -1,669 +0,0 @@ -/* - * This file is part of libsharp. - * - * libsharp is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libsharp is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libsharp; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libsharp is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/*! \file sharp.c - * Spherical transform library - * - * Copyright (C) 2006-2012 Max-Planck-Society - * \author Martin Reinecke - */ - -#include -#include "ls_fft.h" -#include "sharp_ylmgen_c.h" -#include "sharp_internal.h" -#include "c_utils.h" -#include "sharp_core.h" -#include "sharp_vecutil.h" -#include "walltime_c.h" -#include "sharp_almhelpers.h" -#include "sharp_geomhelpers.h" - -typedef complex double dcmplx; -typedef complex float fcmplx; - -static void get_chunk_info (int ndata, int nmult, int *nchunks, int *chunksize) - { - static const int chunksize_min=500, nchunks_max=10; - *chunksize = IMAX(chunksize_min,(ndata+nchunks_max-1)/nchunks_max); - *chunksize = ((*chunksize+nmult-1)/nmult)*nmult; - *nchunks = (ndata+*chunksize-1) / *chunksize; - } - -typedef struct - { - double s; - int i; - } idxhelper; - -static int idx_compare (const void *xa, const void *xb) - { - const idxhelper *a=xa, *b=xb; - return (a->s > b->s) ? -1 : (a->s < b->s) ? 1 : 0; - } - -typedef struct - { - double phi0_; - dcmplx *shiftarr, *work; - int s_shift, s_work; - real_plan plan; - int norot; - } ringhelper; - -static void ringhelper_init (ringhelper *self) - { - static ringhelper rh_null = { 0, NULL, NULL, 0, 0, NULL, 0 }; - *self = rh_null; - } - -static void ringhelper_destroy (ringhelper *self) - { - if (self->plan) kill_real_plan(self->plan); - DEALLOC(self->shiftarr); - DEALLOC(self->work); - ringhelper_init(self); - } - -static void ringhelper_update (ringhelper *self, int nph, int mmax, double phi0) - { - self->norot = (fabs(phi0)<1e-14); - if (!(self->norot)) - if ((mmax!=self->s_shift-1) || (!FAPPROX(phi0,self->phi0_,1e-12))) - { - RESIZE (self->shiftarr,dcmplx,mmax+1); - self->s_shift = mmax+1; - self->phi0_ = phi0; - for (int m=0; m<=mmax; ++m) - self->shiftarr[m] = cos(m*phi0) + _Complex_I*sin(m*phi0); - } - if (!self->plan) self->plan=make_real_plan(nph); - if (nph!=(int)self->plan->length) - { - kill_real_plan(self->plan); - self->plan=make_real_plan(nph); - } - GROW(self->work,dcmplx,self->s_work,nph); - } - -static int ringinfo_compare (const void *xa, const void *xb) - { - const sharp_ringinfo *a=xa, *b=xb; - return (a->sth < b->sth) ? -1 : (a->sth > b->sth) ? 1 : 0; - } -static int ringpair_compare (const void *xa, const void *xb) - { - const sharp_ringpair *a=xa, *b=xb; - if (a->r1.nph==b->r1.nph) - return (a->r1.phi0 < b->r1.phi0) ? -1 : - ((a->r1.phi0 > b->r1.phi0) ? 1 : - (a->r1.cth>b->r1.cth ? -1 : 1)); - return (a->r1.nphr1.nph) ? -1 : 1; - } - -void sharp_make_general_alm_info (int lmax, int nm, int stride, const int *mval, - const ptrdiff_t *mstart, sharp_alm_info **alm_info) - { - sharp_alm_info *info = RALLOC(sharp_alm_info,1); - info->lmax = lmax; - info->nm = nm; - info->mval = RALLOC(int,nm); - info->mvstart = RALLOC(ptrdiff_t,nm); - info->stride = stride; - for (int mi=0; mimval[mi] = mval[mi]; - info->mvstart[mi] = mstart[mi]; - } - *alm_info = info; - } - -void sharp_make_alm_info (int lmax, int mmax, int stride, - const ptrdiff_t *mstart, sharp_alm_info **alm_info) - { - int *mval=RALLOC(int,mmax+1); - for (int i=0; i<=mmax; ++i) - mval[i]=i; - sharp_make_general_alm_info (lmax, mmax+1, stride, mval, mstart, alm_info); - DEALLOC(mval); - } - -ptrdiff_t sharp_alm_index (const sharp_alm_info *self, int l, int mi) - { return self->mvstart[mi]+self->stride*l; } - -void sharp_destroy_alm_info (sharp_alm_info *info) - { - DEALLOC (info->mval); - DEALLOC (info->mvstart); - DEALLOC (info); - } - -void sharp_make_geom_info (int nrings, const int *nph, const ptrdiff_t *ofs, - const int *stride, const double *phi0, const double *theta, - const double *weight, sharp_geom_info **geom_info) - { - sharp_geom_info *info = RALLOC(sharp_geom_info,1); - sharp_ringinfo *infos = RALLOC(sharp_ringinfo,nrings); - - int pos=0; - info->pair=RALLOC(sharp_ringpair,nrings); - info->npairs=0; - *geom_info = info; - - for (int m=0; mpair[info->npairs].r1=infos[pos]; - if ((pos0) // make sure northern ring is in r1 - info->pair[info->npairs].r2=infos[pos+1]; - else - { - info->pair[info->npairs].r1=infos[pos+1]; - info->pair[info->npairs].r2=infos[pos]; - } - ++pos; - } - else - info->pair[info->npairs].r2.nph=-1; - ++pos; - ++info->npairs; - } - DEALLOC(infos); - - qsort(info->pair,info->npairs,sizeof(sharp_ringpair),ringpair_compare); - } - -void sharp_destroy_geom_info (sharp_geom_info *geom_info) - { - DEALLOC (geom_info->pair); - DEALLOC (geom_info); - } - -static int sharp_get_mmax (int *mval, int nm) - { - int *mcheck=RALLOC(int,nm); - SET_ARRAY(mcheck,0,nm,0); - for (int i=0; i=0) && (m_curnph; - int stride = info->stride; - - ringhelper_update (self, nph, mmax, info->phi0); - self->work[0]=phase[0]; - SET_ARRAY(self->work,1,nph,0.); - -#if 0 - if (self->norot) - for (int m=1; m<=mmax; ++m) - { - int idx1 = m%nph; - int idx2 = nph-1-((m-1)%nph); - self->work[idx1]+=phase[m*pstride]; - self->work[idx2]+=conj(phase[m*pstride]); - } - else - for (int m=1; m<=mmax; ++m) - { - int idx1 = m%nph; - int idx2 = nph-1-((m-1)%nph); - dcmplx tmp = phase[m*pstride]*self->shiftarr[m]; - self->work[idx1]+=tmp; - self->work[idx2]+=conj(tmp); - } -#else - int idx1=1, idx2=nph-1; - for (int m=1; m<=mmax; ++m) - { - dcmplx tmp = phase[m*pstride]; - if(!self->norot) tmp*=self->shiftarr[m]; - self->work[idx1]+=tmp; - self->work[idx2]+=conj(tmp); - if (++idx1>=nph) idx1=0; - if (--idx2<0) idx2=nph-1; - } -#endif - real_plan_backward_c (self->plan, (double *)(self->work)); - if (fde==DOUBLE) - for (int m=0; mofs] += creal(self->work[m]); - else - for (int m=0; mofs] += (float)creal(self->work[m]); - } - -static void ringhelper_ring2phase (ringhelper *self, - const sharp_ringinfo *info, const void *data, int mmax, dcmplx *phase, - int pstride, sharp_fde fde) - { - int nph = info->nph; -#if 1 - int maxidx = mmax; /* Enable this for traditional Healpix compatibility */ -#else - int maxidx = IMIN(nph-1,mmax); -#endif - - ringhelper_update (self, nph, mmax, -info->phi0); - if (fde==DOUBLE) - for (int m=0; mwork[m] = ((double *)data)[info->ofs+m*info->stride]*info->weight; - else - for (int m=0; mwork[m] = ((float *)data)[info->ofs+m*info->stride]*info->weight; - - real_plan_forward_c (self->plan, (double *)self->work); - - if (self->norot) - for (int m=0; m<=maxidx; ++m) - phase[m*pstride] = self->work[m%nph]; - else - for (int m=0; m<=maxidx; ++m) - phase[m*pstride]=self->work[m%nph]*self->shiftarr[m]; - - for (int m=maxidx+1;m<=mmax; ++m) - phase[m*pstride]=0.; - } - -static void ringhelper_pair2phase (ringhelper *self, int mmax, - const sharp_ringpair *pair, const void *data, dcmplx *phase1, dcmplx *phase2, - int pstride, sharp_fde fde) - { - ringhelper_ring2phase (self, &(pair->r1), data, mmax, phase1, pstride, fde); - if (pair->r2.nph>0) - ringhelper_ring2phase (self, &(pair->r2), data, mmax, phase2, pstride, fde); - } - -static void ringhelper_phase2pair (ringhelper *self, int mmax, - const dcmplx *phase1, const dcmplx *phase2, int pstride, - const sharp_ringpair *pair, void *data, sharp_fde fde) - { - ringhelper_phase2ring (self, &(pair->r1), data, mmax, phase1, pstride, fde); - if (pair->r2.nph>0) - ringhelper_phase2ring (self, &(pair->r2), data, mmax, phase2, pstride, fde); - } - -static void fill_map (const sharp_geom_info *ginfo, void *map, double value, - sharp_fde fde) - { - for (int j=0;jnpairs;++j) - { - if (fde==DOUBLE) - { - for (int i=0;ipair[j].r1.nph;++i) - ((double *)map)[ginfo->pair[j].r1.ofs+i*ginfo->pair[j].r1.stride]=value; - for (int i=0;ipair[j].r2.nph;++i) - ((double *)map)[ginfo->pair[j].r2.ofs+i*ginfo->pair[j].r2.stride]=value; - } - else - { - for (int i=0;ipair[j].r1.nph;++i) - ((float *)map)[ginfo->pair[j].r1.ofs+i*ginfo->pair[j].r1.stride] - =(float)value; - for (int i=0;ipair[j].r2.nph;++i) - ((float *)map)[ginfo->pair[j].r2.ofs+i*ginfo->pair[j].r2.stride] - =(float)value; - } - } - } - -static void fill_alm (const sharp_alm_info *ainfo, void *alm, dcmplx value, - sharp_fde fde) - { - if (fde==DOUBLE) - for (int mi=0;minm;++mi) - for (int l=ainfo->mval[mi];l<=ainfo->lmax;++l) - ((dcmplx *)alm)[sharp_alm_index(ainfo,l,mi)] = value; - else - for (int mi=0;minm;++mi) - for (int l=ainfo->mval[mi];l<=ainfo->lmax;++l) - ((fcmplx *)alm)[sharp_alm_index(ainfo,l,mi)] = (fcmplx)value; - } - -static void init_output (sharp_job *job) - { - if (job->add_output) return; - if (job->type == SHARP_MAP2ALM) - for (int i=0; intrans*job->nalm; ++i) - fill_alm (job->ainfo,job->alm[i],0.,job->fde); - else - for (int i=0; intrans*job->nmaps; ++i) - fill_map (job->ginfo,job->map[i],0.,job->fde); - } - -static void alloc_phase (sharp_job *job, int nm, int ntheta) - { job->phase=RALLOC(dcmplx,2*job->ntrans*job->nmaps*nm*ntheta); } - -static void dealloc_phase (sharp_job *job) - { DEALLOC(job->phase); } - -//FIXME: set phase to zero if not SHARP_MAP2ALM? -static void map2phase (sharp_job *job, int mmax, int llim, int ulim) - { - if (job->type != SHARP_MAP2ALM) return; - int pstride = 2*job->ntrans*job->nmaps; -#pragma omp parallel -{ - ringhelper helper; - ringhelper_init(&helper); -#pragma omp for schedule(dynamic,1) - for (int ith=llim; ithntrans*job->nmaps; ++i) - ringhelper_pair2phase(&helper,mmax,&job->ginfo->pair[ith], job->map[i], - &job->phase[dim2+2*i], &job->phase[dim2+2*i+1], pstride, job->fde); - } - ringhelper_destroy(&helper); -} /* end of parallel region */ - } - -static void alloc_almtmp (sharp_job *job, int lmax) - { job->almtmp=RALLOC(dcmplx,job->ntrans*job->nalm*(lmax+1)); } - -static void dealloc_almtmp (sharp_job *job) - { DEALLOC(job->almtmp); } - -static void alm2almtmp (sharp_job *job, int lmax, int mi) - { - if (job->type!=SHARP_MAP2ALM) - for (int l=job->ainfo->mval[mi]; l<=lmax; ++l) - { - ptrdiff_t aidx = sharp_alm_index(job->ainfo,l,mi); - double fct = job->norm_l[l]; - for (int i=0; intrans*job->nalm; ++i) - if (job->fde==DOUBLE) - job->almtmp[job->ntrans*job->nalm*l+i] - = ((dcmplx *)job->alm[i])[aidx]*fct; - else - job->almtmp[job->ntrans*job->nalm*l+i] - = ((fcmplx *)job->alm[i])[aidx]*fct; - } - else - SET_ARRAY(job->almtmp,job->ntrans*job->nalm*job->ainfo->mval[mi], - job->ntrans*job->nalm*(lmax+1),0.); - } - -static void almtmp2alm (sharp_job *job, int lmax, int mi) - { - if (job->type != SHARP_MAP2ALM) return; - for (int l=job->ainfo->mval[mi]; l<=lmax; ++l) - { - ptrdiff_t aidx = sharp_alm_index(job->ainfo,l,mi); - for (int i=0;intrans*job->nalm;++i) - if (job->fde==DOUBLE) - ((dcmplx *)job->alm[i])[aidx] += - job->almtmp[job->ntrans*job->nalm*l+i]*job->norm_l[l]; - else - ((fcmplx *)job->alm[i])[aidx] += - (fcmplx)(job->almtmp[job->ntrans*job->nalm*l+i]*job->norm_l[l]); - } - } - -static void phase2map (sharp_job *job, int mmax, int llim, int ulim) - { - if (job->type == SHARP_MAP2ALM) return; - int pstride = 2*job->ntrans*job->nmaps; -#pragma omp parallel -{ - ringhelper helper; - ringhelper_init(&helper); -#pragma omp for schedule(dynamic,1) - for (int ith=llim; ithntrans*job->nmaps; ++i) - ringhelper_phase2pair(&helper,mmax,&job->phase[dim2+2*i], - &job->phase[dim2+2*i+1],pstride,&job->ginfo->pair[ith],job->map[i], - job->fde); - } - ringhelper_destroy(&helper); -} /* end of parallel region */ - } - -static void sharp_execute_job (sharp_job *job) - { - double timer=wallTime(); - job->opcnt=0; - int lmax = job->ainfo->lmax, - mmax=sharp_get_mmax(job->ainfo->mval, job->ainfo->nm); - - job->norm_l = (job->type==SHARP_ALM2MAP_DERIV1) ? - sharp_Ylmgen_get_d1norm (lmax) : - sharp_Ylmgen_get_norm (lmax, job->spin); - -/* clear output arrays if requested */ - init_output (job); - - int nchunks, chunksize; - get_chunk_info(job->ginfo->npairs,job->nv*VLEN,&nchunks,&chunksize); - alloc_phase (job,mmax+1,chunksize); - -/* chunk loop */ - for (int chunk=0; chunkginfo->npairs); - int *ispair = RALLOC(int,ulim-llim); - double *cth = RALLOC(double,ulim-llim), *sth = RALLOC(double,ulim-llim); - idxhelper *stmp = RALLOC(idxhelper,ulim-llim); - for (int i=0; iginfo->pair[i+llim].r2.nph>0; - cth[i] = job->ginfo->pair[i+llim].r1.cth; - sth[i] = job->ginfo->pair[i+llim].r1.sth; - stmp[i].s=sth[i]; - stmp[i].i=i; - } - qsort (stmp,ulim-llim,sizeof(idxhelper),idx_compare); - int *idx = RALLOC(int,ulim-llim); - for (int i=0; iphase where necessary */ - map2phase (job, mmax, llim, ulim); - -#pragma omp parallel -{ - sharp_job ljob = *job; - ljob.opcnt=0; - sharp_Ylmgen_C generator; - sharp_Ylmgen_init (&generator,lmax,mmax,ljob.spin); - alloc_almtmp(&ljob,lmax); - -#pragma omp for schedule(dynamic,1) - for (int mi=0; miainfo->nm; ++mi) - { -/* alm->alm_tmp where necessary */ - alm2almtmp (&ljob, lmax, mi); - - inner_loop (&ljob, ispair, cth, sth, llim, ulim, &generator, mi, idx); - -/* alm_tmp->alm where necessary */ - almtmp2alm (&ljob, lmax, mi); - } - - sharp_Ylmgen_destroy(&generator); - dealloc_almtmp(&ljob); - -#pragma omp critical - job->opcnt+=ljob.opcnt; -} /* end of parallel region */ - -/* phase->map where necessary */ - phase2map (job, mmax, llim, ulim); - - DEALLOC(ispair); - DEALLOC(cth); - DEALLOC(sth); - DEALLOC(idx); - } /* end of chunk loop */ - - DEALLOC(job->norm_l); - dealloc_phase (job); - job->time=wallTime()-timer; - } - -static void sharp_build_job_common (sharp_job *job, sharp_jobtype type, - int spin, int add_output, void *alm, void *map, - const sharp_geom_info *geom_info, const sharp_alm_info *alm_info, int ntrans, - int dp, int nv) - { - UTIL_ASSERT((ntrans>0),"bad number of simultaneous transforms"); - if (type==SHARP_ALM2MAP_DERIV1) spin=1; - UTIL_ASSERT((spin>=0)&&(spin<=30), "bad spin"); - job->type = type; - job->spin = spin; - job->norm_l = NULL; - job->add_output = add_output; - job->nmaps = (type==SHARP_ALM2MAP_DERIV1) ? 2 : ((spin>0) ? 2 : 1); - job->nalm = (type==SHARP_ALM2MAP_DERIV1) ? 1 : ((spin>0) ? 2 : 1); - job->ginfo = geom_info; - job->ainfo = alm_info; - job->nv = (nv==0) ? sharp_nv_oracle (type, spin, ntrans) : nv; - job->time = 0.; - job->opcnt = 0; - job->ntrans = ntrans; - job->alm=alm; - job->map=map; - job->fde=dp ? DOUBLE : FLOAT; - } - -void sharp_execute (sharp_jobtype type, int spin, int add_output, void *alm, - void *map, const sharp_geom_info *geom_info, const sharp_alm_info *alm_info, - int ntrans, int dp, int nv, double *time, unsigned long long *opcnt) - { - sharp_job job; - sharp_build_job_common (&job, type, spin, add_output, alm, map, geom_info, - alm_info, ntrans, dp, nv); - - sharp_execute_job (&job); - if (time!=NULL) *time = job.time; - if (opcnt!=NULL) *opcnt = job.opcnt; - } - -int sharp_get_nv_max (void) -{ return 6; } - -static int sharp_oracle (sharp_jobtype type, int spin, int ntrans) - { - int lmax=127; - int mmax=(lmax+1)/2; - int nrings=(lmax+1)/4; - int ppring=1; - - ptrdiff_t npix=(ptrdiff_t)nrings*ppring; - sharp_geom_info *tinfo; - sharp_make_gauss_geom_info (nrings, ppring, 1, ppring, &tinfo); - - ptrdiff_t nalms = ((mmax+1)*(mmax+2))/2 + (mmax+1)*(lmax-mmax); - int ncomp = ntrans*((spin==0) ? 1 : 2); - - double **map; - ALLOC2D(map,double,ncomp,npix); - SET_ARRAY(map[0],0,npix*ncomp,0.); - - sharp_alm_info *alms; - sharp_make_triangular_alm_info(lmax,mmax,1,&alms); - - dcmplx **alm; - ALLOC2D(alm,dcmplx,ncomp,nalms); - SET_ARRAY(alm[0],0,nalms*ncomp,0.); - - double time=1e30; - int nvbest=-1; - - for (int nv=1; nv<=sharp_get_nv_max(); ++nv) - { - double time_acc=0.; - double jtime; - int ntries=0; - do - { - sharp_execute(type,spin,0,&alm[0],&map[0],tinfo,alms,ntrans,1,nv,&jtime, - NULL); - - if (jtime0),"bad number of simultaneous transforms"); - UTIL_ASSERT((spin>=0)&&(spin<=30), "bad spin"); - ntrans=IMIN(ntrans,maxtr); - - if (nv_opt[ntrans-1][spin!=0][type]==0) - nv_opt[ntrans-1][spin!=0][type]=sharp_oracle(type,spin,ntrans); - return nv_opt[ntrans-1][spin!=0][type]; - } - -#ifdef USE_MPI -#include "sharp_mpi.c" -#endif diff --git a/external/cosmotool/external/sharp/libsharp/sharp.h b/external/cosmotool/external/sharp/libsharp/sharp.h deleted file mode 100644 index 9c5dd57..0000000 --- a/external/cosmotool/external/sharp/libsharp/sharp.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * This file is part of libsharp. - * - * libsharp is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libsharp is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libsharp; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libsharp is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/*! \file sharp.h - * Interface for the spherical transform library. - * - * Copyright (C) 2006-2012 Max-Planck-Society - * \author Martin Reinecke - */ - -#ifndef PLANCK_SHARP_H -#define PLANCK_SHARP_H - -#ifdef __cplusplus -#error This header file cannot be included from C++, only from C -#endif - -#include - -#include "sharp_lowlevel.h" - -#endif diff --git a/external/cosmotool/external/sharp/libsharp/sharp_acctest.c b/external/cosmotool/external/sharp/libsharp/sharp_acctest.c deleted file mode 100644 index 95a3bac..0000000 --- a/external/cosmotool/external/sharp/libsharp/sharp_acctest.c +++ /dev/null @@ -1,267 +0,0 @@ -/* - * This file is part of libsharp. - * - * libsharp is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libsharp is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libsharp; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libsharp is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/*! \file sharp_acctest.c - Systematic accuracy test for libsharp. - - Copyright (C) 2006-2012 Max-Planck-Society - \author Martin Reinecke -*/ - -#include -#include -#ifdef USE_MPI -#include "mpi.h" -#endif -#include "sharp.h" -#include "sharp_geomhelpers.h" -#include "sharp_almhelpers.h" -#include "c_utils.h" -#include "sharp_announce.h" -#include "sharp_core.h" - -typedef complex double dcmplx; - -static double drand (double min, double max) - { return min + (max-min)*rand()/(RAND_MAX+1.0); } - -static void random_alm (dcmplx *alm, sharp_alm_info *helper, int spin) - { - for (int mi=0;minm; ++mi) - { - int m=helper->mval[mi]; - for (int l=m;l<=helper->lmax; ++l) - { - if ((lmaxdiff) maxdiff=fabs(x); - if (fabs(y)>maxdiff) maxdiff=fabs(y); - } - sum=sqrt(sum/nalms); - sum2=sqrt(sum2/nalms); - UTIL_ASSERT((maxdiff<1e-10)&&(sum/sum2<1e-10),"error"); - } - } - -static void check_sign_scale(void) - { - int lmax=50; - int mmax=lmax; - sharp_geom_info *tinfo; - int nrings=lmax+1; - int ppring=2*lmax+2; - ptrdiff_t npix=(ptrdiff_t)nrings*ppring; - sharp_make_gauss_geom_info (nrings, ppring, 1, ppring, &tinfo); - - /* flip theta to emulate the "old" Gaussian grid geometry */ - for (int i=0; inpairs; ++i) - { - const double pi=3.141592653589793238462643383279502884197; - tinfo->pair[i].r1.cth=-tinfo->pair[i].r1.cth; - tinfo->pair[i].r2.cth=-tinfo->pair[i].r2.cth; - tinfo->pair[i].r1.theta=pi-tinfo->pair[i].r1.theta; - tinfo->pair[i].r2.theta=pi-tinfo->pair[i].r2.theta; - } - - sharp_alm_info *alms; - sharp_make_triangular_alm_info(lmax,mmax,1,&alms); - ptrdiff_t nalms = ((mmax+1)*(mmax+2))/2 + (mmax+1)*(lmax-mmax); - - for (int ntrans=1; ntrans<10; ++ntrans) - { - double **map; - ALLOC2D(map,double,2*ntrans,npix); - - dcmplx **alm; - ALLOC2D(alm,dcmplx,2*ntrans,nalms); - for (int i=0; i<2*ntrans; ++i) - for (int j=0; jlmax = lmax; - info->nm = mmax+1; - info->mval = RALLOC(int,mmax+1); - info->mvstart = RALLOC(ptrdiff_t,mmax+1); - info->stride = stride; - int tval = 2*lmax+1; - for (ptrdiff_t m=0; m<=mmax; ++m) - { - info->mval[m] = m; - info->mvstart[m] = stride*((m*(tval-m))>>1); - } - *alm_info = info; - } - -void sharp_make_rectangular_alm_info (int lmax, int mmax, int stride, - sharp_alm_info **alm_info) - { - sharp_alm_info *info = RALLOC(sharp_alm_info,1); - info->lmax = lmax; - info->nm = mmax+1; - info->mval = RALLOC(int,mmax+1); - info->mvstart = RALLOC(ptrdiff_t,mmax+1); - info->stride = stride; - for (ptrdiff_t m=0; m<=mmax; ++m) - { - info->mval[m] = m; - info->mvstart[m] = stride*m*(lmax+1); - } - *alm_info = info; - } diff --git a/external/cosmotool/external/sharp/libsharp/sharp_almhelpers.h b/external/cosmotool/external/sharp/libsharp/sharp_almhelpers.h deleted file mode 100644 index 9cf9534..0000000 --- a/external/cosmotool/external/sharp/libsharp/sharp_almhelpers.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * This file is part of libsharp. - * - * libsharp is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libsharp is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libsharp; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libsharp is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/*! \file sharp_almhelpers.h - * SHARP helper function for the creation of a_lm data structures - * - * Copyright (C) 2008-2011 Max-Planck-Society - * \author Martin Reinecke - */ - -#ifndef PLANCK_SHARP_ALMHELPERS_H -#define PLANCK_SHARP_ALMHELPERS_H - -#include "sharp_lowlevel.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/*! Initialises an a_lm data structure according to the scheme used by - Healpix_cxx. - \ingroup almgroup */ -void sharp_make_triangular_alm_info (int lmax, int mmax, int stride, - sharp_alm_info **alm_info); - -/*! Initialises an a_lm data structure according to the scheme used by - Fortran Healpix - \ingroup almgroup */ -void sharp_make_rectangular_alm_info (int lmax, int mmax, int stride, - sharp_alm_info **alm_info); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/external/cosmotool/external/sharp/libsharp/sharp_announce.c b/external/cosmotool/external/sharp/libsharp/sharp_announce.c deleted file mode 100644 index bc6ee50..0000000 --- a/external/cosmotool/external/sharp/libsharp/sharp_announce.c +++ /dev/null @@ -1,98 +0,0 @@ -/* - * This file is part of libc_utils. - * - * libc_utils is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libc_utils is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libc_utils; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libc_utils is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/*! \file sharp_announce.c - * Banner for module startup - * - * Copyright (C) 2012 Max-Planck-Society - * \author Martin Reinecke - */ - -#include -#include -#include -#ifdef _OPENMP -#include -#endif -#ifdef USE_MPI -#include -#endif - -#include "sharp_announce.h" -#include "sharp_vecutil.h" - -static void OpenMP_status(void) - { -#ifndef _OPENMP - printf("OpenMP: not supported by this binary\n"); -#else - int threads = omp_get_max_threads(); - if (threads>1) - printf("OpenMP active: max. %d threads.\n",threads); - else - printf("OpenMP active, but running with 1 thread only.\n"); -#endif - } - -static void MPI_status(void) - { -#ifndef USE_MPI - printf("MPI: not supported by this binary\n"); -#else - int tasks; - MPI_Comm_size(MPI_COMM_WORLD,&tasks); - if (tasks>1) - printf("MPI active with %d tasks.\n",tasks); - else - printf("MPI active, but running with 1 task only.\n"); -#endif - } - -static void vecmath_status(void) - { printf("Supported vector length: %d\n",VLEN); } - -void sharp_announce (const char *name) - { - size_t m, nlen=strlen(name); - printf("\n+-"); - for (m=0; m -#include -#ifdef USE_MPI -#include "mpi.h" -#endif -#include "sharp.h" -#include "sharp_geomhelpers.h" -#include "sharp_almhelpers.h" -#include "c_utils.h" -#include "sharp_announce.h" -#include "sharp_core.h" - -typedef complex double dcmplx; - -static void bench_sht (int spin, int nv, sharp_jobtype type, - int ntrans, double *time, unsigned long long *opcnt) - { - int lmax=2047; - int mmax=128; - int nrings=512; - int ppring=1024; - ptrdiff_t npix=(ptrdiff_t)nrings*ppring; - sharp_geom_info *tinfo; - sharp_make_gauss_geom_info (nrings, ppring, 1, ppring, &tinfo); - - ptrdiff_t nalms = ((mmax+1)*(mmax+2))/2 + (mmax+1)*(lmax-mmax); - int ncomp = ntrans*((spin==0) ? 1 : 2); - - double **map; - ALLOC2D(map,double,ncomp,npix); - SET_ARRAY(map[0],0,npix*ncomp,0.); - - sharp_alm_info *alms; - sharp_make_triangular_alm_info(lmax,mmax,1,&alms); - - dcmplx **alm; - ALLOC2D(alm,dcmplx,ncomp,nalms); - SET_ARRAY(alm[0],0,nalms*ncomp,0.); - - int nruns=0; - *time=1e30; - *opcnt=1000000000000000; - do - { - double jtime; - unsigned long long jopcnt; - sharp_execute(type,spin,0,&alm[0],&map[0],tinfo,alms,ntrans,1,nv,&jtime, - &jopcnt); - - if (jopcnt<*opcnt) *opcnt=jopcnt; - if (jtime<*time) *time=jtime; - } - while (++nruns < 4); - - DEALLOC2D(map); - DEALLOC2D(alm); - - sharp_destroy_alm_info(alms); - sharp_destroy_geom_info(tinfo); - } - -int main(void) - { -#ifdef USE_MPI - MPI_Init(NULL,NULL); -#endif - sharp_module_startup("sharp_bench",1,1,"",1); - - printf("Benchmarking SHTs.\n\n"); - FILE *fp=fopen("sharp_oracle.inc","w"); - UTIL_ASSERT(fp, "failed to open oracle file for writing"); - fprintf(fp,"static const int maxtr = 6;\n"); - fprintf(fp,"static const int nv_opt[6][2][3] = {\n"); - - const char *shtname[]={"map2alm","alm2map","a2mder1"}; - - for (int ntr=1; ntr<=6; ++ntr) - { - fprintf(fp,"{"); - for (int spin=0; spin<=2; spin+=2) - { - fprintf(fp,"{"); - for (sharp_jobtype type=SHARP_MAP2ALM; type<=SHARP_ALM2MAP_DERIV1; ++type) - { - if ((type==SHARP_ALM2MAP_DERIV1) && (spin==0)) - fprintf(fp,"-1"); - else - { - int nvbest=-1, nvoracle=sharp_nv_oracle(type,spin,ntr); - unsigned long long opmin=1000000000000000, op; - double tmin=1e30; - double *time=RALLOC(double,sharp_get_nv_max()+1); - for (int nv=1; nv<=sharp_get_nv_max(); ++nv) - { - bench_sht (spin,nv,type,ntr,&time[nv],&op); - if (op - -#if (defined(_OPENMP) && defined(USE_MPI)) - -#include -#include -#include -#include -#include "sharp_mpi.h" -#include "sharp.h" -#include "sharp_vecutil.h" -#include "sharp_geomhelpers.h" -#include "sharp_almhelpers.h" -#include "c_utils.h" -#include "sharp_announce.h" -#include "sharp_core.h" -#include "memusage.h" - -typedef complex double dcmplx; - -int ntasks, mytask; - -static unsigned long long totalops (unsigned long long val) - { - unsigned long long tmp; - MPI_Allreduce (&val, &tmp,1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, MPI_COMM_WORLD); - return tmp; - } - -static double maxTime (double val) - { - double tmp; - MPI_Allreduce (&val, &tmp,1, MPI_DOUBLE, MPI_MAX, MPI_COMM_WORLD); - return tmp; - } - -static double totalMem (double val) - { - double tmp; - MPI_Allreduce (&val, &tmp,1, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD); - return tmp; - } - -static void reduce_alm_info(sharp_alm_info *ainfo) - { - int nmnew=0; - ptrdiff_t ofs = 0; - for (int i=mytask; inm; i+=ntasks,++nmnew) - { - ainfo->mval[nmnew]=ainfo->mval[i]; - ainfo->mvstart[nmnew]=ofs-ainfo->mval[nmnew]; - ofs+=ainfo->lmax-ainfo->mval[nmnew]+1; - } - ainfo->nm=nmnew; - } - -static void reduce_geom_info(sharp_geom_info *ginfo) - { - int npairsnew=0; - ptrdiff_t ofs = 0; - for (int i=mytask; inpairs; i+=ntasks,++npairsnew) - { - ginfo->pair[npairsnew]=ginfo->pair[i]; - ginfo->pair[npairsnew].r1.ofs=ofs; - ofs+=ginfo->pair[npairsnew].r1.nph; - ginfo->pair[npairsnew].r2.ofs=ofs; - if (ginfo->pair[npairsnew].r2.nph>0) ofs+=ginfo->pair[npairsnew].r2.nph; - } - ginfo->npairs=npairsnew; - } - -static ptrdiff_t get_nalms(const sharp_alm_info *ainfo) - { - ptrdiff_t res=0; - for (int i=0; inm; ++i) - res += ainfo->lmax-ainfo->mval[i]+1; - return res; - } - -static ptrdiff_t get_npix(const sharp_geom_info *ginfo) - { - ptrdiff_t res=0; - for (int i=0; inpairs; ++i) - { - res += ginfo->pair[i].r1.nph; - if (ginfo->pair[i].r2.nph>0) res += ginfo->pair[i].r2.nph; - } - return res; - } - -int main(int argc, char **argv) - { - MPI_Init(NULL,NULL); - MPI_Comm_size(MPI_COMM_WORLD,&ntasks); - MPI_Comm_rank(MPI_COMM_WORLD,&mytask); - int master=(mytask==0); - - sharp_module_startup("sharp_bench2",argc,7, - " ",0); - - int lmax=atoi(argv[2]); - sharp_jobtype jtype = (strcmp(argv[4],"a2m")==0) ? - SHARP_ALM2MAP : SHARP_MAP2ALM; - int spin=atoi(argv[5]); - int ntrans=atoi(argv[6]); - - sharp_geom_info *tinfo; - ptrdiff_t npix=0; - int geom2=0; - if (strcmp(argv[1],"gauss")==0) - { - int nrings=geom2=lmax+1; - int ppring=atoi(argv[3]); - sharp_make_gauss_geom_info (nrings, ppring, 1, ppring, &tinfo); - } - else if (strcmp(argv[1],"ecp")==0) - { - int nrings=geom2=2*lmax+2; - int ppring=atoi(argv[3]); - sharp_make_ecp_geom_info (nrings, ppring, 0., 1, ppring, &tinfo); - } - else if (strcmp(argv[1],"healpix")==0) - { - int nside=atoi(argv[3]); - if (nside<1) nside=1; - geom2=4*nside-1; - sharp_make_healpix_geom_info (nside, 1, &tinfo); - } - else - UTIL_FAIL("unknown grid geometry"); - - reduce_geom_info(tinfo); - npix=get_npix(tinfo); - - int mmax=lmax; - int ncomp = ntrans*((spin==0) ? 1 : 2); - - double **map; - ALLOC2D(map,double,ncomp,npix); - - sharp_alm_info *alms; - sharp_make_triangular_alm_info(lmax,mmax,1,&alms); - - reduce_alm_info(alms); - ptrdiff_t nalms=get_nalms(alms); - - dcmplx **alm; - ALLOC2D(alm,dcmplx,ncomp,nalms); - - for (int n=0; n -#include -#include "sharp_vecsupport.h" - -#define UNSAFE_CODE - -#if (VLEN==1) - -static inline complex double vhsum_cmplx(Tv a, Tv b) - { return a+_Complex_I*b; } - -static inline void vhsum_cmplx2 (Tv a, Tv b, Tv c, Tv d, - complex double * restrict c1, complex double * restrict c2) - { *c1 += a+_Complex_I*b; *c2 += c+_Complex_I*d; } - -#endif - -#if (VLEN==2) - -static inline complex double vhsum_cmplx (Tv a, Tv b) - { -#if defined(__SSE3__) - Tv tmp = _mm_hadd_pd(a,b); -#else - Tv tmp = vadd(_mm_shuffle_pd(a,b,_MM_SHUFFLE2(0,1)), - _mm_shuffle_pd(a,b,_MM_SHUFFLE2(1,0))); -#endif - union {Tv v; complex double c; } u; - u.v=tmp; return u.c; - } - -static inline void vhsum_cmplx2 (Tv a, Tv b, Tv c, - Tv d, complex double * restrict c1, complex double * restrict c2) - { -#ifdef UNSAFE_CODE -#if defined(__SSE3__) - vaddeq(*((__m128d *)c1),_mm_hadd_pd(a,b)); - vaddeq(*((__m128d *)c2),_mm_hadd_pd(c,d)); -#else - vaddeq(*((__m128d *)c1),vadd(_mm_shuffle_pd(a,b,_MM_SHUFFLE2(0,1)), - _mm_shuffle_pd(a,b,_MM_SHUFFLE2(1,0)))); - vaddeq(*((__m128d *)c2),vadd(_mm_shuffle_pd(c,d,_MM_SHUFFLE2(0,1)), - _mm_shuffle_pd(c,d,_MM_SHUFFLE2(1,0)))); -#endif -#else - union {Tv v; complex double c; } u1, u2; -#if defined(__SSE3__) - u1.v = _mm_hadd_pd(a,b); u2.v=_mm_hadd_pd(c,d); -#else - u1.v = vadd(_mm_shuffle_pd(a,b,_MM_SHUFFLE2(0,1)), - _mm_shuffle_pd(a,b,_MM_SHUFFLE2(1,0))); - u2.v = vadd(_mm_shuffle_pd(c,d,_MM_SHUFFLE2(0,1)), - _mm_shuffle_pd(c,d,_MM_SHUFFLE2(1,0))); -#endif - *c1+=u1.c; *c2+=u2.c; -#endif - } - -#endif - -#if (VLEN==4) - -static inline complex double vhsum_cmplx (Tv a, Tv b) - { - Tv tmp=_mm256_hadd_pd(a,b); - Tv tmp2=_mm256_permute2f128_pd(tmp,tmp,1); - tmp=_mm256_add_pd(tmp,tmp2); -#ifdef UNSAFE_CODE - complex double ret; - *((__m128d *)&ret)=_mm256_extractf128_pd(tmp, 0); - return ret; -#else - union {Tv v; complex double c[2]; } u; - u.v=tmp; return u.c[0]; -#endif - } - -static inline void vhsum_cmplx2 (Tv a, Tv b, Tv c, Tv d, - complex double * restrict c1, complex double * restrict c2) - { - Tv tmp1=_mm256_hadd_pd(a,b), tmp2=_mm256_hadd_pd(c,d); - Tv tmp3=_mm256_permute2f128_pd(tmp1,tmp2,49), - tmp4=_mm256_permute2f128_pd(tmp1,tmp2,32); - tmp1=vadd(tmp3,tmp4); -#ifdef UNSAFE_CODE - *((__m128d *)c1)=_mm_add_pd(*((__m128d *)c1),_mm256_extractf128_pd(tmp1, 0)); - *((__m128d *)c2)=_mm_add_pd(*((__m128d *)c2),_mm256_extractf128_pd(tmp1, 1)); -#else - union {Tv v; complex double c[2]; } u; - u.v=tmp1; - *c1+=u.c[0]; *c2+=u.c[1]; -#endif - } - -#endif - -#endif diff --git a/external/cosmotool/external/sharp/libsharp/sharp_core.c b/external/cosmotool/external/sharp/libsharp/sharp_core.c deleted file mode 100644 index 1d48a6f..0000000 --- a/external/cosmotool/external/sharp/libsharp/sharp_core.c +++ /dev/null @@ -1,239 +0,0 @@ -/* - * This file is part of libsharp. - * - * libsharp is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libsharp is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libsharp; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libsharp is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/*! \file sharp_core.c - * Computational core - * - * Copyright (C) 2012 Max-Planck-Society - * \author Martin Reinecke - */ - -#include -#include -#include -#include "sharp_vecsupport.h" -#include "sharp_complex_hacks.h" -#include "sharp_ylmgen_c.h" -#include "sharp.h" -#include "sharp_core.h" -#include "c_utils.h" - -typedef complex double dcmplx; - -#define MAXJOB_SPECIAL 2 - -#define XCONCAT2(a,b) a##_##b -#define CONCAT2(a,b) XCONCAT2(a,b) -#define XCONCAT3(a,b,c) a##_##b##_##c -#define CONCAT3(a,b,c) XCONCAT3(a,b,c) - -#define nvec 1 -#include "sharp_inchelper1.inc.c" -#undef nvec - -#define nvec 2 -#include "sharp_inchelper1.inc.c" -#undef nvec - -#define nvec 3 -#include "sharp_inchelper1.inc.c" -#undef nvec - -#define nvec 4 -#include "sharp_inchelper1.inc.c" -#undef nvec - -#define nvec 5 -#include "sharp_inchelper1.inc.c" -#undef nvec - -#define nvec 6 -#include "sharp_inchelper1.inc.c" -#undef nvec - -void inner_loop (sharp_job *job, const int *ispair,const double *cth, - const double *sth, int llim, int ulim, sharp_Ylmgen_C *gen, int mi, - const int *idx) - { - int njobs=job->ntrans; - if (njobs<=MAXJOB_SPECIAL) - { - switch (njobs*16+job->nv) - { -#if (MAXJOB_SPECIAL>=1) - case 0x11: - CONCAT3(inner_loop,1,1) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x12: - CONCAT3(inner_loop,2,1) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x13: - CONCAT3(inner_loop,3,1) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x14: - CONCAT3(inner_loop,4,1) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x15: - CONCAT3(inner_loop,5,1) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x16: - CONCAT3(inner_loop,6,1) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; -#endif -#if (MAXJOB_SPECIAL>=2) - case 0x21: - CONCAT3(inner_loop,1,2) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x22: - CONCAT3(inner_loop,2,2) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x23: - CONCAT3(inner_loop,3,2) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x24: - CONCAT3(inner_loop,4,2) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x25: - CONCAT3(inner_loop,5,2) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x26: - CONCAT3(inner_loop,6,2) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; -#endif -#if (MAXJOB_SPECIAL>=3) - case 0x31: - CONCAT3(inner_loop,1,3) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x32: - CONCAT3(inner_loop,2,3) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x33: - CONCAT3(inner_loop,3,3) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x34: - CONCAT3(inner_loop,4,3) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x35: - CONCAT3(inner_loop,5,3) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x36: - CONCAT3(inner_loop,6,3) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; -#endif -#if (MAXJOB_SPECIAL>=4) - case 0x41: - CONCAT3(inner_loop,1,4) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x42: - CONCAT3(inner_loop,2,4) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x43: - CONCAT3(inner_loop,3,4) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x44: - CONCAT3(inner_loop,4,4) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x45: - CONCAT3(inner_loop,5,4) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x46: - CONCAT3(inner_loop,6,4) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; -#endif -#if (MAXJOB_SPECIAL>=5) - case 0x51: - CONCAT3(inner_loop,1,5) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x52: - CONCAT3(inner_loop,2,5) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x53: - CONCAT3(inner_loop,3,5) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x54: - CONCAT3(inner_loop,4,5) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x55: - CONCAT3(inner_loop,5,5) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x56: - CONCAT3(inner_loop,6,5) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; -#endif -#if (MAXJOB_SPECIAL>=6) - case 0x61: - CONCAT3(inner_loop,1,6) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x62: - CONCAT3(inner_loop,2,6) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x63: - CONCAT3(inner_loop,3,6) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x64: - CONCAT3(inner_loop,4,6) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x65: - CONCAT3(inner_loop,5,6) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; - case 0x66: - CONCAT3(inner_loop,6,6) (job, ispair,cth,sth,llim,ulim,gen,mi,idx); - return; -#endif - } - } -#if (MAXJOB_SPECIAL<6) - else - { - switch (job->nv) - { - case 1: - CONCAT2(inner_loop,1) - (job, ispair,cth,sth,llim,ulim,gen,mi,idx,job->ntrans); - return; - case 2: - CONCAT2(inner_loop,2) - (job, ispair,cth,sth,llim,ulim,gen,mi,idx,job->ntrans); - return; - case 3: - CONCAT2(inner_loop,3) - (job, ispair,cth,sth,llim,ulim,gen,mi,idx,job->ntrans); - return; - case 4: - CONCAT2(inner_loop,4) - (job, ispair,cth,sth,llim,ulim,gen,mi,idx,job->ntrans); - return; - case 5: - CONCAT2(inner_loop,5) - (job, ispair,cth,sth,llim,ulim,gen,mi,idx,job->ntrans); - return; - case 6: - CONCAT2(inner_loop,6) - (job, ispair,cth,sth,llim,ulim,gen,mi,idx,job->ntrans); - return; - } - } -#endif - UTIL_FAIL("Incorrect vector parameters"); - } diff --git a/external/cosmotool/external/sharp/libsharp/sharp_core.h b/external/cosmotool/external/sharp/libsharp/sharp_core.h deleted file mode 100644 index 17b5881..0000000 --- a/external/cosmotool/external/sharp/libsharp/sharp_core.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * This file is part of libsharp. - * - * libsharp is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libsharp is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libsharp; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libsharp is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/*! \file sharp_core.h - * Interface for the computational core - * - * Copyright (C) 2012 Max-Planck-Society - * \author Martin Reinecke - */ - -#ifndef PLANCK_SHARP_CORE_H -#define PLANCK_SHARP_CORE_H - -#include "sharp_internal.h" -#include "sharp_ylmgen_c.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void inner_loop (sharp_job *job, const int *ispair,const double *cth, - const double *sth, int llim, int ulim, sharp_Ylmgen_C *gen, int mi, - const int *idx); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/external/cosmotool/external/sharp/libsharp/sharp_core_inc.c b/external/cosmotool/external/sharp/libsharp/sharp_core_inc.c deleted file mode 100644 index e87c817..0000000 --- a/external/cosmotool/external/sharp/libsharp/sharp_core_inc.c +++ /dev/null @@ -1,288 +0,0 @@ -/* - * This file is part of libsharp. - * - * libsharp is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libsharp is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libsharp; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libsharp is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/*! \file sharp_core_inc.c - * Type-dependent code for the computational core - * - * Copyright (C) 2012 Max-Planck-Society - * \author Martin Reinecke - */ - -typedef struct - { Tv v[nvec]; } Tb; - -typedef union - { Tb b; double s[VLEN*nvec]; } Y(Tbu); - -typedef struct - { Tb r, i; } Y(Tbri); - -typedef struct - { Tb qr, qi, ur, ui; } Y(Tbqu); - -typedef struct - { double r[VLEN*nvec], i[VLEN*nvec]; } Y(Tsri); - -typedef struct - { double qr[VLEN*nvec],qi[VLEN*nvec],ur[VLEN*nvec],ui[VLEN*nvec]; } Y(Tsqu); - -typedef union - { Y(Tbri) b; Y(Tsri)s; } Y(Tburi); - -typedef union - { Y(Tbqu) b; Y(Tsqu)s; } Y(Tbuqu); - -static inline Tb Y(Tbconst)(double val) - { - Tv v=vload(val); - Tb res; - for (int i=0; iv[i],v); } - -static inline Tb Y(Tbprod)(Tb a, Tb b) - { Tb r; for (int i=0; iv[i],b.v[i]); } - -static inline void Y(Tbnormalize) (Tb * restrict val, Tb * restrict scale, - double maxval) - { - const Tv vfsmall=vload(sharp_fsmall), vfbig=vload(sharp_fbig); - const Tv vfmin=vload(sharp_fsmall*maxval), vfmax=vload(maxval); - for (int i=0;iv[i]),vfmax); - while (vanyTrue(mask)) - { - vmuleq(val->v[i],vblend(mask,vfsmall,vone)); - vaddeq(scale->v[i],vblend(mask,vone,vzero)); - mask = vgt(vabs(val->v[i]),vfmax); - } - mask = vand(vlt(vabs(val->v[i]),vfmin),vne(val->v[i],vzero)); - while (vanyTrue(mask)) - { - vmuleq(val->v[i],vblend(mask,vfbig,vone)); - vsubeq(scale->v[i],vblend(mask,vone,vzero)); - mask = vand(vlt(vabs(val->v[i]),vfmin),vne(val->v[i],vzero)); - } - } - } - -static inline void Y(mypow) (Tb val, int npow, Tb * restrict resd, - Tb * restrict ress) - { - Tb scale=Y(Tbconst)(0.), scaleint=Y(Tbconst)(0.), res=Y(Tbconst)(1.); - - Y(Tbnormalize)(&val,&scaleint,sharp_fbighalf); - - do - { - if (npow&1) - { - for (int i=0; i>=1); - - *resd=res; - *ress=scale; - } - -static inline int Y(rescale) (Tb * restrict lam1, Tb * restrict lam2, - Tb * restrict scale) - { - int did_scale=0; - for (int i=0;iv[i]),vload(sharp_ftol)); - if (vanyTrue(mask)) - { - did_scale=1; - Tv fact = vblend(mask,vload(sharp_fsmall),vone); - vmuleq(lam1->v[i],fact); vmuleq(lam2->v[i],fact); - vaddeq(scale->v[i],vblend(mask,vone,vzero)); - } - } - return did_scale; - } - -static inline int Y(TballLt)(Tb a,double b) - { - Tv vb=vload(b); - Tv res=vlt(a.v[0],vb); - for (int i=1; im; - Tb lam_1=Y(Tbconst)(0.), lam_2, scale; - Y(mypow) (sth,l,&lam_2,&scale); - Y(Tbmuleq1) (&lam_2,(gen->m&1) ? -gen->mfac[gen->m]:gen->mfac[gen->m]); - Y(Tbnormalize)(&lam_2,&scale,sharp_ftol); - - int below_limit = Y(TballLt)(scale,sharp_limscale); - while (below_limit) - { - if (l+2>gen->lmax) {*l_=gen->lmax+1;return;} - Tv r0=vload(gen->rf[l].f[0]),r1=vload(gen->rf[l].f[1]); - for (int i=0; irf[l+1].f[0]); r1=vload(gen->rf[l+1].f[1]); - for (int i=0; iv[i] = vsub(vmul(vsub(cth.v[i],fx1),vmul(fx0,ryp->v[i])), - vmul(fx2,rxp->v[i])); - rxm->v[i] = vsub(vmul(vadd(cth.v[i],fx1),vmul(fx0,rym->v[i])), - vmul(fx2,rxm->v[i])); - } - } - -static void Y(iter_to_ieee_spin) (const Tb cth, int *l_, - Tb * rec1p_, Tb * rec1m_, Tb * rec2p_, Tb * rec2m_, - Tb * scalep_, Tb * scalem_, const sharp_Ylmgen_C * restrict gen) - { - const sharp_ylmgen_dbl3 * restrict fx = gen->fx; - Tb cth2, sth2; - for (int i=0; icosPow,&ccp,&ccps); Y(mypow)(sth2,gen->sinPow,&ssp,&ssps); - Y(mypow)(cth2,gen->sinPow,&csp,&csps); Y(mypow)(sth2,gen->cosPow,&scp,&scps); - - Tb rec2p, rec2m, scalep, scalem; - Tb rec1p=Y(Tbconst)(0.), rec1m=Y(Tbconst)(0.); - Tv prefac=vload(gen->prefac[gen->m]), - prescale=vload(gen->fscale[gen->m]); - for (int i=0; ipreMinus_p) - rec2p.v[i]=vneg(rec2p.v[i]); - if (gen->preMinus_m) - rec2m.v[i]=vneg(rec2m.v[i]); - if (gen->s&1) - rec2p.v[i]=vneg(rec2p.v[i]); - } - Y(Tbnormalize)(&rec2m,&scalem,sharp_ftol); - Y(Tbnormalize)(&rec2p,&scalep,sharp_ftol); - - int l=gen->mhi; - - int below_limit = Y(TballLt)(scalep,sharp_limscale) - && Y(TballLt)(scalem,sharp_limscale); - while (below_limit) - { - if (l+2>gen->lmax) {*l_=gen->lmax+1;return;} - Y(rec_step)(&rec1p,&rec1m,&rec2p,&rec2m,cth,fx[l+1]); - Y(rec_step)(&rec2p,&rec2m,&rec1p,&rec1m,cth,fx[l+2]); - if (Y(rescale)(&rec1p,&rec2p,&scalep) | Y(rescale)(&rec1m,&rec2m,&scalem)) - below_limit = Y(TballLt)(scalep,sharp_limscale) - && Y(TballLt)(scalem,sharp_limscale); - l+=2; - } - - *l_=l; - *rec1p_=rec1p; *rec2p_=rec2p; *scalep_=scalep; - *rec1m_=rec1m; *rec2m_=rec2m; *scalem_=scalem; - } diff --git a/external/cosmotool/external/sharp/libsharp/sharp_core_inc2.c b/external/cosmotool/external/sharp/libsharp/sharp_core_inc2.c deleted file mode 100644 index 7672eff..0000000 --- a/external/cosmotool/external/sharp/libsharp/sharp_core_inc2.c +++ /dev/null @@ -1,810 +0,0 @@ -/* - * This file is part of libsharp. - * - * libsharp is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libsharp is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libsharp; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libsharp is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/*! \file sharp_core_inc2.c - * Type-dependent code for the computational core - * - * Copyright (C) 2012 Max-Planck-Society - * \author Martin Reinecke - */ - -typedef struct - { Y(Tbri) j[njobs]; } Z(Tbrij); -typedef union - { Z(Tbrij) b; Y(Tsri) j[njobs]; } Z(Tburij); -typedef struct - { Y(Tbqu) j[njobs]; } Z(Tbquj); -typedef union - { Z(Tbquj) b; Y(Tsqu) j[njobs]; } Z(Tbuquj); - -static void Z(alm2map_kernel) (const Tb cth, Z(Tbrij) * restrict p1, - Z(Tbrij) * restrict p2, Tb lam_1, Tb lam_2, - const sharp_ylmgen_dbl2 * restrict rf, const dcmplx * restrict alm, - int l, int lmax) - { -#if (njobs>1) - while (lj[j].r.v[i],lam_2.v[i],ar2,lam_4.v[i],ar4); - vfmaaeq(p1->j[j].i.v[i],lam_2.v[i],ai2,lam_4.v[i],ai4); - } - Tv ar3=vload(creal(alm[njobs*(l+1)+j])), - ai3=vload(cimag(alm[njobs*(l+1)+j])), - ar1=vload(creal(alm[njobs*(l+3)+j])), - ai1=vload(cimag(alm[njobs*(l+3)+j])); - for (int i=0; ij[j].r.v[i],lam_3.v[i],ar3,lam_1.v[i],ar1); - vfmaaeq(p2->j[j].i.v[i],lam_3.v[i],ai3,lam_1.v[i],ai1); - } - } - r0=vload(rf[l+3].f[0]);r1=vload(rf[l+3].f[1]); - for (int i=0; ij[j].r.v[i],lam_2.v[i],ar); - vfmaeq(p1->j[j].i.v[i],lam_2.v[i],ai); - } - ar=vload(creal(alm[njobs*(l+1)+j])); - ai=vload(cimag(alm[njobs*(l+1)+j])); - for (int i=0; ij[j].r.v[i],lam_1.v[i],ar); - vfmaeq(p2->j[j].i.v[i],lam_1.v[i],ai); - } - } - r0=vload(rf[l+1].f[0]);r1=vload(rf[l+1].f[1]); - for (int i=0; ij[j].r.v[i],lam_2.v[i],ar); - vfmaeq(p1->j[j].i.v[i],lam_2.v[i],ai); - } - } - } - } - -static void Z(map2alm_kernel) (const Tb cth, const Z(Tbrij) * restrict p1, - const Z(Tbrij) * restrict p2, Tb lam_1, Tb lam_2, - const sharp_ylmgen_dbl2 * restrict rf, dcmplx * restrict alm, int l, int lmax) - { - while (lj[j].r.v[i]); - vfmaeq(ti1,lam_2.v[i],p1->j[j].i.v[i]); - } - for (int i=0; ij[j].r.v[i]); - vfmaeq(ti2,lam_1.v[i],p2->j[j].i.v[i]); - } - vhsum_cmplx2(tr1,ti1,tr2,ti2,&alm[l*njobs+j],&alm[(l+1)*njobs+j]); - } - r0=vload(rf[l+1].f[0]);r1=vload(rf[l+1].f[1]); - for (int i=0; ij[j].r.v[i]); - vfmaeq(tim,lam_2.v[i],p1->j[j].i.v[i]); - } - alm[l*njobs+j]+=vhsum_cmplx(tre,tim); - } - } - } - -static void Z(calc_alm2map) (const Tb cth, const Tb sth, - const sharp_Ylmgen_C *gen, sharp_job *job, Z(Tbrij) * restrict p1, - Z(Tbrij) * restrict p2, int *done) - { - int l,lmax=gen->lmax; - Tb lam_1,lam_2,scale; - Y(iter_to_ieee) (sth,cth,&l,&lam_1,&lam_2,&scale,gen); - job->opcnt += (l-gen->m) * 4*VLEN*nvec; - if (l>lmax) { *done=1; return; } - job->opcnt += (lmax+1-l) * (4+4*njobs)*VLEN*nvec; - - Tb corfac; - Y(getCorfac)(scale,&corfac,gen->cf); - const sharp_ylmgen_dbl2 * restrict rf = gen->rf; - const dcmplx * restrict alm=job->almtmp; - int full_ieee = Y(TballGe)(scale,sharp_minscale); - while (!full_ieee) - { - for (int j=0; jj[j].r.v[i],tmp,ar); - vfmaeq(p1->j[j].i.v[i],tmp,ai); - } - } - if (++l>lmax) break; - Tv r0=vload(rf[l-1].f[0]),r1=vload(rf[l-1].f[1]); - for (int i=0; ij[j].r.v[i],tmp,ar); - vfmaeq(p2->j[j].i.v[i],tmp,ai); - } - } - if (++l>lmax) break; - r0=vload(rf[l-1].f[0]); r1=vload(rf[l-1].f[1]); - for (int i=0; icf); - full_ieee = Y(TballGe)(scale,sharp_minscale); - } - } - if (l>lmax) { *done=1; return; } - - Y(Tbmuleq)(&lam_1,corfac); Y(Tbmuleq)(&lam_2,corfac); - Z(alm2map_kernel) (cth, p1, p2, lam_1, lam_2, rf, alm, l, lmax); - } - -static void Z(calc_map2alm) (const Tb cth, const Tb sth, - const sharp_Ylmgen_C *gen, sharp_job *job, const Z(Tbrij) * restrict p1, - const Z(Tbrij) * restrict p2, int *done) - { - int lmax=gen->lmax; - Tb lam_1,lam_2,scale; - int l=gen->m; - Y(iter_to_ieee) (sth,cth,&l,&lam_1,&lam_2,&scale,gen); - job->opcnt += (l-gen->m) * 4*VLEN*nvec; - if (l>lmax) { *done=1; return; } - job->opcnt += (lmax+1-l) * (4+4*njobs)*VLEN*nvec; - - const sharp_ylmgen_dbl2 * restrict rf = gen->rf; - Tb corfac; - Y(getCorfac)(scale,&corfac,gen->cf); - dcmplx * restrict alm=job->almtmp; - int full_ieee = Y(TballGe)(scale,sharp_minscale); - while (!full_ieee) - { - for (int j=0; jj[j].r.v[i]); - vfmaeq(tim,tmp,p1->j[j].i.v[i]); - } - alm[l*njobs+j]+=vhsum_cmplx(tre,tim); - } - if (++l>lmax) { *done=1; return; } - Tv r0=vload(rf[l-1].f[0]),r1=vload(rf[l-1].f[1]); - for (int i=0; ij[j].r.v[i]); - vfmaeq(tim,tmp,p2->j[j].i.v[i]); - } - alm[l*njobs+j]+=vhsum_cmplx(tre,tim); - } - if (++l>lmax) { *done=1; return; } - r0=vload(rf[l-1].f[0]); r1=vload(rf[l-1].f[1]); - for (int i=0; icf); - full_ieee = Y(TballGe)(scale,sharp_minscale); - } - } - - Y(Tbmuleq)(&lam_1,corfac); Y(Tbmuleq)(&lam_2,corfac); - Z(map2alm_kernel) (cth, p1, p2, lam_1, lam_2, rf, alm, l, lmax); - } - -static inline void Z(saddstep) (Z(Tbquj) * restrict px, Z(Tbquj) * restrict py, - const Tb rxp, const Tb rxm, const dcmplx * restrict alm) - { - for (int j=0; jj[j].qr.v[i],agr,lw); - vfmaeq(px->j[j].qi.v[i],agi,lw); - vfmaeq(px->j[j].ur.v[i],acr,lw); - vfmaeq(px->j[j].ui.v[i],aci,lw); - } - for (int i=0; ij[j].qr.v[i],aci,lx); - vfmaeq(py->j[j].qi.v[i],acr,lx); - vfmaeq(py->j[j].ur.v[i],agi,lx); - vfmseq(py->j[j].ui.v[i],agr,lx); - } - } - } - -static inline void Z(saddstepb) (Z(Tbquj) * restrict p1, Z(Tbquj) * restrict p2, - const Tb r1p, const Tb r1m, const Tb r2p, const Tb r2m, - const dcmplx * restrict alm1, const dcmplx * restrict alm2) - { - for (int j=0; jj[j].qr.v[i],agr1,lw1,aci2,lx2); - vfmaaeq(p1->j[j].qi.v[i],agi1,lw1,acr2,lx2); - vfmaaeq(p1->j[j].ur.v[i],acr1,lw1,agi2,lx2); - vfmaseq(p1->j[j].ui.v[i],aci1,lw1,agr2,lx2); - } - for (int i=0; ij[j].qr.v[i],agr2,lw2,aci1,lx1); - vfmaaeq(p2->j[j].qi.v[i],agi2,lw2,acr1,lx1); - vfmaaeq(p2->j[j].ur.v[i],acr2,lw2,agi1,lx1); - vfmaseq(p2->j[j].ui.v[i],aci2,lw2,agr1,lx1); - } - } - } - -static inline void Z(saddstep2) (const Z(Tbquj) * restrict px, - const Z(Tbquj) * restrict py, const Tb * restrict rxp, - const Tb * restrict rxm, dcmplx * restrict alm) - { - for (int j=0; jv[i],rxm->v[i]); - vfmaeq(agr,px->j[j].qr.v[i],lw); - vfmaeq(agi,px->j[j].qi.v[i],lw); - vfmaeq(acr,px->j[j].ur.v[i],lw); - vfmaeq(aci,px->j[j].ui.v[i],lw); - } - for (int i=0; iv[i],rxp->v[i]); - vfmseq(agr,py->j[j].ui.v[i],lx); - vfmaeq(agi,py->j[j].ur.v[i],lx); - vfmaeq(acr,py->j[j].qi.v[i],lx); - vfmseq(aci,py->j[j].qr.v[i],lx); - } - vhsum_cmplx2(agr,agi,acr,aci,&alm[2*j],&alm[2*j+1]); - } - } - -static void Z(alm2map_spin_kernel) (Tb cth, Z(Tbquj) * restrict p1, - Z(Tbquj) * restrict p2, Tb rec1p, Tb rec1m, Tb rec2p, Tb rec2m, - const sharp_ylmgen_dbl3 * restrict fx, const dcmplx * restrict alm, int l, - int lmax) - { - while (l1) - Z(saddstepb)(p1,p2,rec1p,rec1m,rec2p,rec2m,&alm[2*njobs*l], - &alm[2*njobs*(l+1)]); -#else - Z(saddstep)(p1, p2, rec2p, rec2m, &alm[2*njobs*l]); - Z(saddstep)(p2, p1, rec1p, rec1m, &alm[2*njobs*(l+1)]); -#endif - fx0=vload(fx[l+2].f[0]);fx1=vload(fx[l+2].f[1]); - fx2=vload(fx[l+2].f[2]); - for (int i=0; ilmax; - Tb rec1p, rec1m, rec2p, rec2m, scalem, scalep; - Y(iter_to_ieee_spin) (cth,&l,&rec1p,&rec1m,&rec2p,&rec2m,&scalep,&scalem,gen); - job->opcnt += (l-gen->m) * 10*VLEN*nvec; - if (l>lmax) - { *done=1; return; } - job->opcnt += (lmax+1-l) * (12+16*njobs)*VLEN*nvec; - - const sharp_ylmgen_dbl3 * restrict fx = gen->fx; - Tb corfacp,corfacm; - Y(getCorfac)(scalep,&corfacp,gen->cf); - Y(getCorfac)(scalem,&corfacm,gen->cf); - const dcmplx * restrict alm=job->almtmp; - int full_ieee = Y(TballGe)(scalep,sharp_minscale) - && Y(TballGe)(scalem,sharp_minscale); - while (!full_ieee) - { - Z(saddstep)(p1, p2, - Y(Tbprod)(rec2p,corfacp), Y(Tbprod)(rec2m,corfacm), &alm[2*njobs*l]); - if (++l>lmax) break; - Y(rec_step)(&rec1p,&rec1m,&rec2p,&rec2m,cth,fx[l]); - Z(saddstep)(p2, p1, - Y(Tbprod)(rec1p,corfacp), Y(Tbprod)(rec1m,corfacm), &alm[2*njobs*l]); - if (++l>lmax) break; - Y(rec_step)(&rec2p,&rec2m,&rec1p,&rec1m,cth,fx[l]); - if (Y(rescale)(&rec1p,&rec2p,&scalep) | Y(rescale)(&rec1m,&rec2m,&scalem)) - { - Y(getCorfac)(scalep,&corfacp,gen->cf); - Y(getCorfac)(scalem,&corfacm,gen->cf); - full_ieee = Y(TballGe)(scalep,sharp_minscale) - && Y(TballGe)(scalem,sharp_minscale); - } - } - - if (l>lmax) - { *done=1; return; } - - Y(Tbmuleq)(&rec1p,corfacp); Y(Tbmuleq)(&rec2p,corfacp); - Y(Tbmuleq)(&rec1m,corfacm); Y(Tbmuleq)(&rec2m,corfacm); - Z(alm2map_spin_kernel) (cth,p1,p2, - rec1p, rec1m, rec2p, rec2m, fx, alm, l, lmax); - } - -static void Z(calc_map2alm_spin) (Tb cth, const sharp_Ylmgen_C * restrict gen, - sharp_job *job, const Z(Tbquj) * restrict p1, const Z(Tbquj) * restrict p2, - int *done) - { - int l, lmax=gen->lmax; - Tb rec1p, rec1m, rec2p, rec2m, scalem, scalep; - Y(iter_to_ieee_spin) (cth,&l,&rec1p,&rec1m,&rec2p,&rec2m,&scalep,&scalem,gen); - job->opcnt += (l-gen->m) * 10*VLEN*nvec; - if (l>lmax) { *done=1; return; } - job->opcnt += (lmax+1-l) * (12+16*njobs)*VLEN*nvec; - - const sharp_ylmgen_dbl3 * restrict fx = gen->fx; - Tb corfacp,corfacm; - Y(getCorfac)(scalep,&corfacp,gen->cf); - Y(getCorfac)(scalem,&corfacm,gen->cf); - dcmplx * restrict alm=job->almtmp; - int full_ieee = Y(TballGe)(scalep,sharp_minscale) - && Y(TballGe)(scalem,sharp_minscale); - while (!full_ieee) - { - Tb t1=Y(Tbprod)(rec2p,corfacp), t2=Y(Tbprod)(rec2m,corfacm); - Z(saddstep2)(p1, p2, &t1, &t2, &alm[2*njobs*l]); - if (++l>lmax) { *done=1; return; } - Y(rec_step)(&rec1p,&rec1m,&rec2p,&rec2m,cth,fx[l]); - t1=Y(Tbprod)(rec1p,corfacp); t2=Y(Tbprod)(rec1m,corfacm); - Z(saddstep2)(p2, p1, &t1, &t2, &alm[2*njobs*l]); - if (++l>lmax) { *done=1; return; } - Y(rec_step)(&rec2p,&rec2m,&rec1p,&rec1m,cth,fx[l]); - if (Y(rescale)(&rec1p,&rec2p,&scalep) | Y(rescale)(&rec1m,&rec2m,&scalem)) - { - Y(getCorfac)(scalep,&corfacp,gen->cf); - Y(getCorfac)(scalem,&corfacm,gen->cf); - full_ieee = Y(TballGe)(scalep,sharp_minscale) - && Y(TballGe)(scalem,sharp_minscale); - } - } - - Y(Tbmuleq)(&rec1p,corfacp); Y(Tbmuleq)(&rec2p,corfacp); - Y(Tbmuleq)(&rec1m,corfacm); Y(Tbmuleq)(&rec2m,corfacm); - Z(map2alm_spin_kernel) (cth,p1,p2,rec1p,rec1m,rec2p,rec2m,fx,alm,l,lmax); - } - -static inline void Z(saddstep_d) (Z(Tbquj) * restrict px, - Z(Tbquj) * restrict py, const Tb rxp, const Tb rxm, - const dcmplx * restrict alm) - { - for (int j=0; jj[j].qr.v[i],ar,lw); - vfmaeq(px->j[j].qi.v[i],ai,lw); - } - for (int i=0; ij[j].ur.v[i],ai,lx); - vfmseq(py->j[j].ui.v[i],ar,lx); - } - } - } - -static void Z(alm2map_deriv1_kernel) (Tb cth, Z(Tbquj) * restrict p1, - Z(Tbquj) * restrict p2, Tb rec1p, Tb rec1m, Tb rec2p, Tb rec2m, - const sharp_ylmgen_dbl3 * restrict fx, const dcmplx * restrict alm, int l, - int lmax) - { - while (llmax; - Tb rec1p, rec1m, rec2p, rec2m, scalem, scalep; - Y(iter_to_ieee_spin) (cth,&l,&rec1p,&rec1m,&rec2p,&rec2m,&scalep,&scalem,gen); - job->opcnt += (l-gen->m) * 10*VLEN*nvec; - if (l>lmax) - { *done=1; return; } - job->opcnt += (lmax+1-l) * (12+8*njobs)*VLEN*nvec; - - const sharp_ylmgen_dbl3 * restrict fx = gen->fx; - Tb corfacp,corfacm; - Y(getCorfac)(scalep,&corfacp,gen->cf); - Y(getCorfac)(scalem,&corfacm,gen->cf); - const dcmplx * restrict alm=job->almtmp; - int full_ieee = Y(TballGe)(scalep,sharp_minscale) - && Y(TballGe)(scalem,sharp_minscale); - while (!full_ieee) - { - Z(saddstep_d)(p1, p2, Y(Tbprod)(rec2p,corfacp), Y(Tbprod)(rec2m,corfacm), - &alm[njobs*l]); - if (++l>lmax) break; - Y(rec_step)(&rec1p,&rec1m,&rec2p,&rec2m,cth,fx[l]); - Z(saddstep_d)(p2, p1, Y(Tbprod)(rec1p,corfacp), Y(Tbprod)(rec1m,corfacm), - &alm[njobs*l]); - if (++l>lmax) break; - Y(rec_step)(&rec2p,&rec2m,&rec1p,&rec1m,cth,fx[l]); - if (Y(rescale)(&rec1p,&rec2p,&scalep) | Y(rescale)(&rec1m,&rec2m,&scalem)) - { - Y(getCorfac)(scalep,&corfacp,gen->cf); - Y(getCorfac)(scalem,&corfacm,gen->cf); - full_ieee = Y(TballGe)(scalep,sharp_minscale) - && Y(TballGe)(scalem,sharp_minscale); - } - } - - if (l>lmax) - { *done=1; return; } - - Y(Tbmuleq)(&rec1p,corfacp); Y(Tbmuleq)(&rec2p,corfacp); - Y(Tbmuleq)(&rec1m,corfacm); Y(Tbmuleq)(&rec2m,corfacm); - Z(alm2map_deriv1_kernel) (cth, p1, p2, rec1p, rec1m, rec2p, rec2m, fx, alm, l, - lmax); - } - -#define VZERO(var) do { memset(&(var),0,sizeof(var)); } while(0) - -static void Z(inner_loop) (sharp_job *job, const int *ispair, - const double *cth_, const double *sth_, int llim, int ulim, - sharp_Ylmgen_C *gen, int mi, const int *idx) - { - const int nval=nvec*VLEN; - const int m = job->ainfo->mval[mi]; - sharp_Ylmgen_prepare (gen, m); - - switch (job->type) - { - case SHARP_ALM2MAP: - case SHARP_ALM2MAP_DERIV1: - { - if (job->spin==0) - { - int done=0; - for (int ith=0; ith=ulim-llim) itot=ulim-llim-1; - itot=idx[itot]; - cth.s[i]=cth_[itot]; sth.s[i]=sth_[itot]; - } - Z(calc_alm2map) (cth.b,sth.b,gen,job,&p1.b,&p2.b,&done); - } - - for (int i=0; iainfo->nm+mi)); - complex double r1 = p1.j[j].r[i] + p1.j[j].i[i]*_Complex_I, - r2 = p2.j[j].r[i] + p2.j[j].i[i]*_Complex_I; - job->phase[phas_idx] = r1+r2; - if (ispair[itot]) - job->phase[phas_idx+1] = r1-r2; - } - } - } - } - } - else - { - int done=0; - for (int ith=0; ith=ulim-llim) itot=ulim-llim-1; - itot=idx[itot]; - cth.s[i]=cth_[itot]; - } - (job->type==SHARP_ALM2MAP) ? - Z(calc_alm2map_spin ) (cth.b,gen,job,&p1.b,&p2.b,&done) : - Z(calc_alm2map_deriv1) (cth.b,gen,job,&p1.b,&p2.b,&done); - } - - for (int i=0; iainfo->nm+mi)); - complex double q1 = p1.j[j].qr[i] + p1.j[j].qi[i]*_Complex_I, - q2 = p2.j[j].qr[i] + p2.j[j].qi[i]*_Complex_I, - u1 = p1.j[j].ur[i] + p1.j[j].ui[i]*_Complex_I, - u2 = p2.j[j].ur[i] + p2.j[j].ui[i]*_Complex_I; - job->phase[phas_idx] = q1+q2; - job->phase[phas_idx+2] = u1+u2; - if (ispair[itot]) - { - dcmplx *phQ = &(job->phase[phas_idx+1]), - *phU = &(job->phase[phas_idx+3]); - *phQ = q1-q2; - *phU = u1-u2; - if ((gen->mhi-gen->m+gen->s)&1) - { *phQ=-(*phQ); *phU=-(*phU); } - } - } - } - } - } - } - break; - } - case SHARP_MAP2ALM: - { - if (job->spin==0) - { - int done=0; - for (int ith=0; (ith=ulim-llim) itot=ulim-llim-1; - itot=idx[itot]; - cth.s[i]=cth_[itot]; sth.s[i]=sth_[itot]; - if (i+ithainfo->nm+mi)); - dcmplx ph1=job->phase[phas_idx]; - dcmplx ph2=ispair[itot] ? job->phase[phas_idx+1] : 0.; - p1.j[j].r[i]=creal(ph1+ph2); p1.j[j].i[i]=cimag(ph1+ph2); - p2.j[j].r[i]=creal(ph1-ph2); p2.j[j].i[i]=cimag(ph1-ph2); - } - } - } - Z(calc_map2alm)(cth.b,sth.b,gen,job,&p1.b,&p2.b,&done); - } - } - else - { - int done=0; - for (int ith=0; (ith=ulim-llim) itot=ulim-llim-1; - itot=idx[itot]; - cth.s[i]=cth_[itot]; - if (i+ithainfo->nm+mi)); - dcmplx p1Q=job->phase[phas_idx], - p1U=job->phase[phas_idx+2], - p2Q=ispair[itot] ? job->phase[phas_idx+1]:0., - p2U=ispair[itot] ? job->phase[phas_idx+3]:0.; - if ((gen->mhi-gen->m+gen->s)&1) - { p2Q=-p2Q; p2U=-p2U; } - p1.j[j].qr[i]=creal(p1Q+p2Q); p1.j[j].qi[i]=cimag(p1Q+p2Q); - p1.j[j].ur[i]=creal(p1U+p2U); p1.j[j].ui[i]=cimag(p1U+p2U); - p2.j[j].qr[i]=creal(p1Q-p2Q); p2.j[j].qi[i]=cimag(p1Q-p2Q); - p2.j[j].ur[i]=creal(p1U-p2U); p2.j[j].ui[i]=cimag(p1U-p2U); - } - } - } - Z(calc_map2alm_spin) (cth.b,gen,job,&p1.b,&p2.b,&done); - } - } - break; - } - } - } - -#undef VZERO diff --git a/external/cosmotool/external/sharp/libsharp/sharp_core_inc3.c b/external/cosmotool/external/sharp/libsharp/sharp_core_inc3.c deleted file mode 100644 index e74bd51..0000000 --- a/external/cosmotool/external/sharp/libsharp/sharp_core_inc3.c +++ /dev/null @@ -1,800 +0,0 @@ -/* - * This file is part of libsharp. - * - * libsharp is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libsharp is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libsharp; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libsharp is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/*! \file sharp_core_inc3.c - * Type-dependent code for the computational core - * - * Copyright (C) 2012 Max-Planck-Society - * \author Martin Reinecke - */ - -static void Y(alm2map_kernel) (const Tb cth, Y(Tbri) * restrict p1, - Y(Tbri) * restrict p2, Tb lam_1, Tb lam_2, - const sharp_ylmgen_dbl2 * restrict rf, const dcmplx * restrict alm, - int l, int lmax, int njobs) - { - while (llmax; - Tb lam_1,lam_2,scale; - Y(iter_to_ieee) (sth,cth,&l,&lam_1,&lam_2,&scale,gen); - job->opcnt += (l-gen->m) * 4*VLEN*nvec; - if (l>lmax) { *done=1; return; } - job->opcnt += (lmax+1-l) * (4+4*njobs)*VLEN*nvec; - - Tb corfac; - Y(getCorfac)(scale,&corfac,gen->cf); - const sharp_ylmgen_dbl2 * restrict rf = gen->rf; - const dcmplx * restrict alm=job->almtmp; - int full_ieee = Y(TballGe)(scale,sharp_minscale); - while (!full_ieee) - { - for (int j=0; jlmax) break; - Tv r0=vload(rf[l-1].f[0]),r1=vload(rf[l-1].f[1]); - for (int i=0; ilmax) break; - r0=vload(rf[l-1].f[0]); r1=vload(rf[l-1].f[1]); - for (int i=0; icf); - full_ieee = Y(TballGe)(scale,sharp_minscale); - } - } - if (l>lmax) { *done=1; return; } - - Y(Tbmuleq)(&lam_1,corfac); Y(Tbmuleq)(&lam_2,corfac); - Y(alm2map_kernel) (cth, p1, p2, lam_1, lam_2, rf, alm, l, lmax, njobs); - } - -static void Y(calc_map2alm) (const Tb cth, const Tb sth, - const sharp_Ylmgen_C *gen, sharp_job *job, const Y(Tbri) * restrict p1, - const Y(Tbri) * restrict p2, int njobs, int *done) - { - int lmax=gen->lmax; - Tb lam_1,lam_2,scale; - int l=gen->m; - Y(iter_to_ieee) (sth,cth,&l,&lam_1,&lam_2,&scale,gen); - job->opcnt += (l-gen->m) * 4*VLEN*nvec; - if (l>lmax) { *done=1; return; } - job->opcnt += (lmax+1-l) * (4+4*njobs)*VLEN*nvec; - - const sharp_ylmgen_dbl2 * restrict rf = gen->rf; - Tb corfac; - Y(getCorfac)(scale,&corfac,gen->cf); - dcmplx * restrict alm=job->almtmp; - int full_ieee = Y(TballGe)(scale,sharp_minscale); - while (!full_ieee) - { - for (int j=0; jlmax) { *done=1; return; } - Tv r0=vload(rf[l-1].f[0]),r1=vload(rf[l-1].f[1]); - for (int i=0; ilmax) { *done=1; return; } - r0=vload(rf[l-1].f[0]); r1=vload(rf[l-1].f[1]); - for (int i=0; icf); - full_ieee = Y(TballGe)(scale,sharp_minscale); - } - } - - Y(Tbmuleq)(&lam_1,corfac); Y(Tbmuleq)(&lam_2,corfac); - Y(map2alm_kernel) (cth, p1, p2, lam_1, lam_2, rf, alm, l, lmax, njobs); - } - -static inline void Y(saddstep) (Y(Tbqu) * restrict px, Y(Tbqu) * restrict py, - const Tb rxp, const Tb rxm, const dcmplx * restrict alm, int njobs) - { - for (int j=0; jv[i],rxm->v[i]); - vfmaeq(agr,px[j].qr.v[i],lw); - vfmaeq(agi,px[j].qi.v[i],lw); - vfmaeq(acr,px[j].ur.v[i],lw); - vfmaeq(aci,px[j].ui.v[i],lw); - } - for (int i=0; iv[i],rxp->v[i]); - vfmseq(agr,py[j].ui.v[i],lx); - vfmaeq(agi,py[j].ur.v[i],lx); - vfmaeq(acr,py[j].qi.v[i],lx); - vfmseq(aci,py[j].qr.v[i],lx); - } - vhsum_cmplx2(agr,agi,acr,aci,&alm[2*j],&alm[2*j+1]); - } - } - -static void Y(alm2map_spin_kernel) (Tb cth, Y(Tbqu) * restrict p1, - Y(Tbqu) * restrict p2, Tb rec1p, Tb rec1m, Tb rec2p, Tb rec2m, - const sharp_ylmgen_dbl3 * restrict fx, const dcmplx * restrict alm, int l, - int lmax, int njobs) - { - while (llmax; - Tb rec1p, rec1m, rec2p, rec2m, scalem, scalep; - Y(iter_to_ieee_spin) (cth,&l,&rec1p,&rec1m,&rec2p,&rec2m,&scalep,&scalem,gen); - job->opcnt += (l-gen->m) * 10*VLEN*nvec; - if (l>lmax) - { *done=1; return; } - job->opcnt += (lmax+1-l) * (12+16*njobs)*VLEN*nvec; - - const sharp_ylmgen_dbl3 * restrict fx = gen->fx; - Tb corfacp,corfacm; - Y(getCorfac)(scalep,&corfacp,gen->cf); - Y(getCorfac)(scalem,&corfacm,gen->cf); - const dcmplx * restrict alm=job->almtmp; - int full_ieee = Y(TballGe)(scalep,sharp_minscale) - && Y(TballGe)(scalem,sharp_minscale); - while (!full_ieee) - { - Y(saddstep)(p1, p2, Y(Tbprod)(rec2p,corfacp), Y(Tbprod)(rec2m,corfacm), - &alm[2*njobs*l],njobs); - if (++l>lmax) break; - Y(rec_step)(&rec1p,&rec1m,&rec2p,&rec2m,cth,fx[l]); - Y(saddstep)(p2, p1, Y(Tbprod)(rec1p,corfacp), Y(Tbprod)(rec1m,corfacm), - &alm[2*njobs*l], njobs); - if (++l>lmax) break; - Y(rec_step)(&rec2p,&rec2m,&rec1p,&rec1m,cth,fx[l]); - if (Y(rescale)(&rec1p,&rec2p,&scalep) | Y(rescale)(&rec1m,&rec2m,&scalem)) - { - Y(getCorfac)(scalep,&corfacp,gen->cf); - Y(getCorfac)(scalem,&corfacm,gen->cf); - full_ieee = Y(TballGe)(scalep,sharp_minscale) - && Y(TballGe)(scalem,sharp_minscale); - } - } - - if (l>lmax) - { *done=1; return; } - - Y(Tbmuleq)(&rec1p,corfacp); Y(Tbmuleq)(&rec2p,corfacp); - Y(Tbmuleq)(&rec1m,corfacm); Y(Tbmuleq)(&rec2m,corfacm); - Y(alm2map_spin_kernel) (cth, p1, p2, rec1p, rec1m, rec2p, rec2m, fx, alm, l, - lmax, njobs); - } - -static void Y(calc_map2alm_spin) (Tb cth, const sharp_Ylmgen_C * restrict gen, - sharp_job *job, const Y(Tbqu) * restrict p1, const Y(Tbqu) * restrict p2, - int njobs, int *done) - { - int l, lmax=gen->lmax; - Tb rec1p, rec1m, rec2p, rec2m, scalem, scalep; - Y(iter_to_ieee_spin) (cth,&l,&rec1p,&rec1m,&rec2p,&rec2m,&scalep,&scalem,gen); - job->opcnt += (l-gen->m) * 10*VLEN*nvec; - if (l>lmax) { *done=1; return; } - job->opcnt += (lmax+1-l) * (12+16*njobs)*VLEN*nvec; - - const sharp_ylmgen_dbl3 * restrict fx = gen->fx; - Tb corfacp,corfacm; - Y(getCorfac)(scalep,&corfacp,gen->cf); - Y(getCorfac)(scalem,&corfacm,gen->cf); - dcmplx * restrict alm=job->almtmp; - int full_ieee = Y(TballGe)(scalep,sharp_minscale) - && Y(TballGe)(scalem,sharp_minscale); - while (!full_ieee) - { - Tb t1=Y(Tbprod)(rec2p,corfacp), t2=Y(Tbprod)(rec2m,corfacm); - Y(saddstep2)(p1, p2, &t1, &t2, &alm[2*njobs*l], njobs); - if (++l>lmax) { *done=1; return; } - Y(rec_step)(&rec1p,&rec1m,&rec2p,&rec2m,cth,fx[l]); - t1=Y(Tbprod)(rec1p,corfacp); t2=Y(Tbprod)(rec1m,corfacm); - Y(saddstep2)(p2, p1, &t1, &t2, &alm[2*njobs*l], njobs); - if (++l>lmax) { *done=1; return; } - Y(rec_step)(&rec2p,&rec2m,&rec1p,&rec1m,cth,fx[l]); - if (Y(rescale)(&rec1p,&rec2p,&scalep) | Y(rescale)(&rec1m,&rec2m,&scalem)) - { - Y(getCorfac)(scalep,&corfacp,gen->cf); - Y(getCorfac)(scalem,&corfacm,gen->cf); - full_ieee = Y(TballGe)(scalep,sharp_minscale) - && Y(TballGe)(scalem,sharp_minscale); - } - } - - Y(Tbmuleq)(&rec1p,corfacp); Y(Tbmuleq)(&rec2p,corfacp); - Y(Tbmuleq)(&rec1m,corfacm); Y(Tbmuleq)(&rec2m,corfacm); - Y(map2alm_spin_kernel)(cth,p1,p2,rec1p,rec1m,rec2p,rec2m,fx,alm,l,lmax,njobs); - } - -static inline void Y(saddstep_d) (Y(Tbqu) * restrict px, Y(Tbqu) * restrict py, - const Tb rxp, const Tb rxm, const dcmplx * restrict alm, int njobs) - { - for (int j=0; jlmax; - Tb rec1p, rec1m, rec2p, rec2m, scalem, scalep; - Y(iter_to_ieee_spin) (cth,&l,&rec1p,&rec1m,&rec2p,&rec2m,&scalep,&scalem,gen); - job->opcnt += (l-gen->m) * 10*VLEN*nvec; - if (l>lmax) - { *done=1; return; } - job->opcnt += (lmax+1-l) * (12+8*njobs)*VLEN*nvec; - - const sharp_ylmgen_dbl3 * restrict fx = gen->fx; - Tb corfacp,corfacm; - Y(getCorfac)(scalep,&corfacp,gen->cf); - Y(getCorfac)(scalem,&corfacm,gen->cf); - const dcmplx * restrict alm=job->almtmp; - int full_ieee = Y(TballGe)(scalep,sharp_minscale) - && Y(TballGe)(scalem,sharp_minscale); - while (!full_ieee) - { - Y(saddstep_d)(p1, p2, Y(Tbprod)(rec2p,corfacp), Y(Tbprod)(rec2m,corfacm), - &alm[njobs*l],njobs); - if (++l>lmax) break; - Y(rec_step)(&rec1p,&rec1m,&rec2p,&rec2m,cth,fx[l]); - Y(saddstep_d)(p2, p1, Y(Tbprod)(rec1p,corfacp), Y(Tbprod)(rec1m,corfacm), - &alm[njobs*l], njobs); - if (++l>lmax) break; - Y(rec_step)(&rec2p,&rec2m,&rec1p,&rec1m,cth,fx[l]); - if (Y(rescale)(&rec1p,&rec2p,&scalep) | Y(rescale)(&rec1m,&rec2m,&scalem)) - { - Y(getCorfac)(scalep,&corfacp,gen->cf); - Y(getCorfac)(scalem,&corfacm,gen->cf); - full_ieee = Y(TballGe)(scalep,sharp_minscale) - && Y(TballGe)(scalem,sharp_minscale); - } - } - - if (l>lmax) - { *done=1; return; } - - Y(Tbmuleq)(&rec1p,corfacp); Y(Tbmuleq)(&rec2p,corfacp); - Y(Tbmuleq)(&rec1m,corfacm); Y(Tbmuleq)(&rec2m,corfacm); - Y(alm2map_deriv1_kernel) (cth, p1, p2, rec1p, rec1m, rec2p, rec2m, fx, alm, l, - lmax, njobs); - } - - -#define VZERO(var) do { memset(&(var),0,sizeof(var)); } while(0) - -static void Y(inner_loop) (sharp_job *job, const int *ispair, - const double *cth_, const double *sth_, int llim, int ulim, - sharp_Ylmgen_C *gen, int mi, const int *idx, int njobs) - { - const int nval=nvec*VLEN; - const int m = job->ainfo->mval[mi]; - sharp_Ylmgen_prepare (gen, m); - - switch (job->type) - { - case SHARP_ALM2MAP: - case SHARP_ALM2MAP_DERIV1: - { - if (job->spin==0) - { - int done=0; - for (int ith=0; ith=ulim-llim) itot=ulim-llim-1; - itot=idx[itot]; - cth.s[i]=cth_[itot]; sth.s[i]=sth_[itot]; - } - Y(calc_alm2map) (cth.b,sth.b,gen,job,&p1[0].b,&p2[0].b,njobs,&done); - } - - for (int i=0; iainfo->nm+mi)); - complex double r1 = p1[j].s.r[i] + p1[j].s.i[i]*_Complex_I, - r2 = p2[j].s.r[i] + p2[j].s.i[i]*_Complex_I; - job->phase[phas_idx] = r1+r2; - if (ispair[itot]) - job->phase[phas_idx+1] = r1-r2; - } - } - } - } - } - else - { - int done=0; - for (int ith=0; ith=ulim-llim) itot=ulim-llim-1; - itot=idx[itot]; - cth.s[i]=cth_[itot]; - } - (job->type==SHARP_ALM2MAP) ? - Y(calc_alm2map_spin ) - (cth.b,gen,job,&p1[0].b,&p2[0].b,njobs,&done) : - Y(calc_alm2map_deriv1) - (cth.b,gen,job,&p1[0].b,&p2[0].b,njobs,&done); - } - - for (int i=0; iainfo->nm+mi)); - complex double q1 = p1[j].s.qr[i] + p1[j].s.qi[i]*_Complex_I, - q2 = p2[j].s.qr[i] + p2[j].s.qi[i]*_Complex_I, - u1 = p1[j].s.ur[i] + p1[j].s.ui[i]*_Complex_I, - u2 = p2[j].s.ur[i] + p2[j].s.ui[i]*_Complex_I; - job->phase[phas_idx] = q1+q2; - job->phase[phas_idx+2] = u1+u2; - if (ispair[itot]) - { - dcmplx *phQ = &(job->phase[phas_idx+1]), - *phU = &(job->phase[phas_idx+3]); - *phQ = q1-q2; - *phU = u1-u2; - if ((gen->mhi-gen->m+gen->s)&1) - { *phQ=-(*phQ); *phU=-(*phU); } - } - } - } - } - } - } - break; - } - case SHARP_MAP2ALM: - { - if (job->spin==0) - { - int done=0; - for (int ith=0; (ith=ulim-llim) itot=ulim-llim-1; - itot=idx[itot]; - cth.s[i]=cth_[itot]; sth.s[i]=sth_[itot]; - if (i+ithainfo->nm+mi)); - dcmplx ph1=job->phase[phas_idx]; - dcmplx ph2=ispair[itot] ? job->phase[phas_idx+1] : 0.; - p1[j].s.r[i]=creal(ph1+ph2); p1[j].s.i[i]=cimag(ph1+ph2); - p2[j].s.r[i]=creal(ph1-ph2); p2[j].s.i[i]=cimag(ph1-ph2); - } - } - } - Y(calc_map2alm)(cth.b,sth.b,gen,job,&p1[0].b,&p2[0].b,njobs,&done); - } - } - else - { - int done=0; - for (int ith=0; (ith=ulim-llim) itot=ulim-llim-1; - itot=idx[itot]; - cth.s[i]=cth_[itot]; - if (i+ithainfo->nm+mi)); - dcmplx p1Q=job->phase[phas_idx], - p1U=job->phase[phas_idx+2], - p2Q=ispair[itot] ? job->phase[phas_idx+1]:0., - p2U=ispair[itot] ? job->phase[phas_idx+3]:0.; - if ((gen->mhi-gen->m+gen->s)&1) - { p2Q=-p2Q; p2U=-p2U; } - p1[j].s.qr[i]=creal(p1Q+p2Q); p1[j].s.qi[i]=cimag(p1Q+p2Q); - p1[j].s.ur[i]=creal(p1U+p2U); p1[j].s.ui[i]=cimag(p1U+p2U); - p2[j].s.qr[i]=creal(p1Q-p2Q); p2[j].s.qi[i]=cimag(p1Q-p2Q); - p2[j].s.ur[i]=creal(p1U-p2U); p2[j].s.ui[i]=cimag(p1U-p2U); - } - } - } - Y(calc_map2alm_spin) (cth.b,gen,job,&p1[0].b,&p2[0].b,njobs,&done); - } - } - break; - } - } - } - -#undef VZERO diff --git a/external/cosmotool/external/sharp/libsharp/sharp_cxx.h b/external/cosmotool/external/sharp/libsharp/sharp_cxx.h deleted file mode 100644 index b5ed35f..0000000 --- a/external/cosmotool/external/sharp/libsharp/sharp_cxx.h +++ /dev/null @@ -1,140 +0,0 @@ -/* - * This file is part of libsharp. - * - * libsharp is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libsharp is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libsharp; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libsharp is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/*! \file sharp_cxx.h - * Spherical transform library - * - * Copyright (C) 2012 Max-Planck-Society - * \author Martin Reinecke - */ - -#ifndef PLANCK_SHARP_CXX_H -#define PLANCK_SHARP_CXX_H - -#include "sharp_lowlevel.h" -#include "sharp_geomhelpers.h" -#include "sharp_almhelpers.h" -#include "xcomplex.h" - -class sharp_base - { - protected: - sharp_alm_info *ainfo; - sharp_geom_info *ginfo; - - public: - sharp_base() - : ainfo(0), ginfo(0) {} - ~sharp_base() - { - sharp_destroy_geom_info(ginfo); - sharp_destroy_alm_info(ainfo); - } - - void set_general_geometry (int nrings, const int *nph, const ptrdiff_t *ofs, - const int *stride, const double *phi0, const double *theta, - const double *weight) - { - sharp_make_geom_info (nrings, nph, ofs, stride, phi0, theta, weight, - &ginfo); - } - - void set_ECP_geometry (int nrings, int nphi) - { sharp_make_ecp_geom_info (nrings, nphi, 0., 1, nphi, &ginfo); } - - void set_Gauss_geometry (int nrings, int nphi) - { sharp_make_gauss_geom_info (nrings, nphi, 1, nphi, &ginfo); } - - void set_Healpix_geometry (int nside) - { sharp_make_healpix_geom_info (nside, 1, &ginfo); } - - void set_weighted_Healpix_geometry (int nside, const double *weight) - { sharp_make_weighted_healpix_geom_info (nside, 1, weight, &ginfo); } - - void set_triangular_alm_info (int lmax, int mmax) - { sharp_make_triangular_alm_info (lmax, mmax, 1, &ainfo); } - }; - -template struct cxxjobhelper__ {}; - -template<> struct cxxjobhelper__ - { enum {val=1}; }; - -template<> struct cxxjobhelper__ - { enum {val=0}; }; - - -template class sharp_cxxjob: public sharp_base - { - private: - static void *conv (xcomplex *ptr) - { return reinterpret_cast(ptr); } - static void *conv (const xcomplex *ptr) - { return const_cast(reinterpret_cast(ptr)); } - static void *conv (T *ptr) - { return reinterpret_cast(ptr); } - static void *conv (const T *ptr) - { return const_cast(reinterpret_cast(ptr)); } - - public: - void alm2map (const xcomplex *alm, T *map, bool add) - { - void *aptr=conv(alm), *mptr=conv(map); - sharp_execute (SHARP_ALM2MAP, 0, add, &aptr, &mptr, ginfo, ainfo, 1, - cxxjobhelper__::val,0,0,0); - } - void alm2map_spin (const xcomplex *alm1, const xcomplex *alm2, - T *map1, T *map2, int spin, bool add) - { - void *aptr[2], *mptr[2]; - aptr[0]=conv(alm1); aptr[1]=conv(alm2); - mptr[0]=conv(map1); mptr[1]=conv(map2); - sharp_execute (SHARP_ALM2MAP, spin, add, aptr, mptr, ginfo, ainfo, 1, - cxxjobhelper__::val,0,0,0); - } - void alm2map_der1 (const xcomplex *alm, T *map1, T *map2, bool add) - { - void *aptr=conv(alm), *mptr[2]; - mptr[0]=conv(map1); mptr[1]=conv(map2); - sharp_execute (SHARP_ALM2MAP_DERIV1, 1, add,&aptr, mptr, ginfo, ainfo, - 1, cxxjobhelper__::val,0,0,0); - } - void map2alm (const T *map, xcomplex *alm, bool add) - { - void *aptr=conv(alm), *mptr=conv(map); - sharp_execute (SHARP_MAP2ALM, 0, add, &aptr, &mptr, ginfo, ainfo, 1, - cxxjobhelper__::val,0,0,0); - } - void map2alm_spin (const T *map1, const T *map2, xcomplex *alm1, - xcomplex *alm2, int spin, bool add) - { - void *aptr[2], *mptr[2]; - aptr[0]=conv(alm1); aptr[1]=conv(alm2); - mptr[0]=conv(map1); mptr[1]=conv(map2); - sharp_execute (SHARP_MAP2ALM, spin, add, aptr, mptr, ginfo, ainfo, 1, - cxxjobhelper__::val,0,0,0); - } - }; - -#endif diff --git a/external/cosmotool/external/sharp/libsharp/sharp_geomhelpers.c b/external/cosmotool/external/sharp/libsharp/sharp_geomhelpers.c deleted file mode 100644 index 2cecdcc..0000000 --- a/external/cosmotool/external/sharp/libsharp/sharp_geomhelpers.c +++ /dev/null @@ -1,222 +0,0 @@ -/* - * This file is part of libsharp. - * - * libsharp is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libsharp is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libsharp; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libsharp is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/*! \file sharp_geomhelpers.c - * Spherical transform library - * - * Copyright (C) 2006-2011 Max-Planck-Society - * \author Martin Reinecke - */ - -#include -#include "sharp_geomhelpers.h" -#include "c_utils.h" - -void sharp_make_healpix_geom_info (int nside, int stride, - sharp_geom_info **geom_info) - { - double *weight=RALLOC(double,2*nside); - SET_ARRAY(weight,0,2*nside,1); - sharp_make_weighted_healpix_geom_info (nside, stride, weight, geom_info); - DEALLOC(weight); - } - -void sharp_make_weighted_healpix_geom_info (int nside, int stride, - const double *weight, sharp_geom_info **geom_info) - { - const double pi=3.141592653589793238462643383279502884197; - ptrdiff_t npix=(ptrdiff_t)nside*nside*12; - ptrdiff_t ncap=2*(ptrdiff_t)nside*(nside-1); - int nrings=4*nside-1; - - double *theta=RALLOC(double,nrings); - double *weight_=RALLOC(double,nrings); - int *nph=RALLOC(int,nrings); - double *phi0=RALLOC(double,nrings); - ptrdiff_t *ofs=RALLOC(ptrdiff_t,nrings); - int *stride_=RALLOC(int,nrings); - for (int m=0; m2*nside) ? 4*nside-ring : ring; - stride_[m] = stride; - if (northring < nside) - { - theta[m] = 2*asin(northring/(sqrt(6.)*nside)); - nph[m] = 4*northring; - phi0[m] = pi/nph[m]; - ofs[m] = 2*northring*(northring-1)*stride; - } - else - { - double fact1 = (8.*nside)/npix; - double costheta = (2*nside-northring)*fact1; - theta[m] = acos(costheta); - nph[m] = 4*nside; - if ((northring-nside) & 1) - phi0[m] = 0; - else - phi0[m] = pi/nph[m]; - ofs[m] = (ncap + (northring-nside)*nph[m])*stride; - } - if (northring != ring) /* southern hemisphere */ - { - theta[m] = pi-theta[m]; - ofs[m] = (npix - nph[m])*stride - ofs[m]; - } - weight_[m]=4.*pi/npix*weight[northring-1]; - } - - sharp_make_geom_info (nrings, nph, ofs, stride_, phi0, theta, weight_, - geom_info); - - DEALLOC(theta); - DEALLOC(weight_); - DEALLOC(nph); - DEALLOC(phi0); - DEALLOC(ofs); - DEALLOC(stride_); - } - -static void gauleg (double x1, double x2, double *x, double *w, int n) - { - const double pi = 3.141592653589793238462643383279502884197; - const double eps = 3.0E-14; - - int m = (n+1)/2; - double xm = 0.5*(x2+x1); - double xl = 0.5*(x2-x1); - for(int i=1; i<=m; ++i) - { - double z = cos(pi*(i-0.25)/(n+0.5)); - double pp; - int dobreak=0; - while(1) - { - double p1 = 1.0, p2 = 0.0; - double z1 = z; - int j; - for(j=1; j<=n; ++j) - { - double p3 = p2; - p2 = p1; - p1 = ((2*j-1)*z*p2-(j-1)*p3)/j; - } - pp = n*(z*p1-p2)/(z*z-1); - z = z1 - p1/pp; - if (dobreak) break; - if (fabs(z-z1) <= eps) dobreak=1; - } - x[i-1] = xm - xl*z; - x[n-i] = xm + xl*z; - w[i-1] = w[n-i] = 2*xl/((1-z*z)*pp*pp); - } - } - -static void makeweights (int bw, double *weights) - { - const double pi = 3.141592653589793238462643383279502884197; - const double fudge = pi/(4*bw); - for (int j=0; j<2*bw; ++j) - { - double tmpsum = 0; - for (int k=0; k=1) -#define njobs 1 -#define Z(arg) CONCAT3(arg,nvec,njobs) -#include "sharp_core_inc2.c" -#undef Z -#undef njobs -#endif - -#if (MAXJOB_SPECIAL>=2) -#define njobs 2 -#define Z(arg) CONCAT3(arg,nvec,njobs) -#include "sharp_core_inc2.c" -#undef Z -#undef njobs -#endif - -#if (MAXJOB_SPECIAL>=3) -#define njobs 3 -#define Z(arg) CONCAT3(arg,nvec,njobs) -#include "sharp_core_inc2.c" -#undef Z -#undef njobs -#endif - -#if (MAXJOB_SPECIAL>=4) -#define njobs 4 -#define Z(arg) CONCAT3(arg,nvec,njobs) -#include "sharp_core_inc2.c" -#undef Z -#undef njobs -#endif - -#if (MAXJOB_SPECIAL>=5) -#define njobs 5 -#define Z(arg) CONCAT3(arg,nvec,njobs) -#include "sharp_core_inc2.c" -#undef Z -#undef njobs -#endif - -#if (MAXJOB_SPECIAL>=6) -#define njobs 6 -#define Z(arg) CONCAT3(arg,nvec,njobs) -#include "sharp_core_inc2.c" -#undef Z -#undef njobs -#endif - -#undef Y -#undef Tb diff --git a/external/cosmotool/external/sharp/libsharp/sharp_internal.h b/external/cosmotool/external/sharp/libsharp/sharp_internal.h deleted file mode 100644 index 1a05256..0000000 --- a/external/cosmotool/external/sharp/libsharp/sharp_internal.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * This file is part of libsharp. - * - * libsharp is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libsharp is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libsharp; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libsharp is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/*! \file sharp_internal.h - * Internally used functionality for the spherical transform library. - * - * Copyright (C) 2006-2012 Max-Planck-Society - * \author Martin Reinecke - */ - -#ifndef PLANCK_SHARP_INTERNAL_H -#define PLANCK_SHARP_INTERNAL_H - -#ifdef __cplusplus -#error This header file cannot be included from C++, only from C -#endif - -#include "sharp.h" - -typedef enum { FLOAT, DOUBLE } sharp_fde; - -typedef struct - { - sharp_jobtype type; - int spin; - int add_output; - int nmaps, nalm; - sharp_fde fde; - void **map; - void **alm; - complex double *phase; - double *norm_l; - complex double *almtmp; - const sharp_geom_info *ginfo; - const sharp_alm_info *ainfo; - int nv; - double time; - int ntrans; - unsigned long long opcnt; - } sharp_job; - -int sharp_get_nv_max (void); -int sharp_nv_oracle (sharp_jobtype type, int spin, int ntrans); - -#endif diff --git a/external/cosmotool/external/sharp/libsharp/sharp_lowlevel.h b/external/cosmotool/external/sharp/libsharp/sharp_lowlevel.h deleted file mode 100644 index 96dca06..0000000 --- a/external/cosmotool/external/sharp/libsharp/sharp_lowlevel.h +++ /dev/null @@ -1,188 +0,0 @@ -/* - * This file is part of libsharp. - * - * libsharp is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libsharp is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libsharp; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libsharp is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/*! \file sharp_lowlevel.h - * Low-level, portable interface for the spherical transform library. - * - * Copyright (C) 2012 Max-Planck-Society - * \author Martin Reinecke - */ - -#ifndef PLANCK_SHARP_LOWLEVEL_H -#define PLANCK_SHARP_LOWLEVEL_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/*! \internal - Helper type containing information about a single ring. */ -typedef struct - { - double theta, phi0, weight, cth, sth; - ptrdiff_t ofs; - int nph, stride; - } sharp_ringinfo; - -/*! \internal - Helper type containing information about a pair of rings with colatitudes - symmetric around the equator. */ -typedef struct - { - sharp_ringinfo r1,r2; - } sharp_ringpair; - -/*! \internal - Type holding all required information about a map geometry. */ -typedef struct - { - sharp_ringpair *pair; - int npairs; - } sharp_geom_info; - -/*! \defgroup almgroup Helpers for dealing with a_lm */ -/*! \{ */ - -/*! \internal - Helper type for index calculation in a_lm arrays. */ -typedef struct - { - /*! Maximum \a l index of the array */ - int lmax; - /*! Number of different \a m values in this object */ - int nm; - /*! Array with \a nm entries containing the individual m values */ - int *mval; - /*! Array with \a nm entries containing the (hypothetical) indices of - the coefficients with quantum numbers 0,\a mval[i] */ - ptrdiff_t *mvstart; - /*! Stride between a_lm and a_(l+1),m */ - ptrdiff_t stride; - } sharp_alm_info; - -/*! Creates an Alm data structure information from the following parameters: - \param lmax maximum \a l quantum number (>=0) - \param mmax maximum \a m quantum number (0<= \a mmax <= \a lmax) - \param stride the stride between consecutive a_lm entries - \param mstart the index of the (hypothetical) coefficient with the - quantum numbers 0,\a m. Must have \a mmax+1 entries. - \param alm_info will hold a pointer to the newly created data structure - */ -void sharp_make_alm_info (int lmax, int mmax, int stride, - const ptrdiff_t *mstart, sharp_alm_info **alm_info); -/*! Creates an Alm data structure information from the following parameters: - \param lmax maximum \a l quantum number (>=0) - \param nm number of different \a m (<=\a lmax+1) - \param stride the stride between consecutive a_lm entries - \param mval array with \a nm entries containing the individual m values - \param mvstart array with \a nm entries containing the (hypothetical) - indices of the coefficients with the quantum numbers 0,\a mval[i] - \param alm_info will hold a pointer to the newly created data structure - */ -void sharp_make_general_alm_info (int lmax, int nm, int stride, const int *mval, - const ptrdiff_t *mvstart, sharp_alm_info **alm_info); -/*! Returns the index of the coefficient with quantum numbers \a l, - \a mval[mi]. */ -ptrdiff_t sharp_alm_index (const sharp_alm_info *self, int l, int mi); -/*! Deallocates the a_lm info object. */ -void sharp_destroy_alm_info (sharp_alm_info *info); - -/*! \} */ - -/*! \defgroup geominfogroup Functions for dealing with geometry information */ -/*! \{ */ - -/*! Creates a geometry information from a set of ring descriptions. - All arrays passed to this function must have \a nrings elements. - \param nrings the number of rings in the map - \param nph the number of pixels in each ring - \param ofs the index of the first pixel in each ring in the map array - \param stride the stride between consecutive pixels - \param phi0 the azimuth (in radians) of the first pixel in each ring - \param theta the colatitude (in radians) of each ring - \param weight the pixel weight to be used for the ring - \param geom_info will hold a pointer to the newly created data structure - */ -void sharp_make_geom_info (int nrings, const int *nph, const ptrdiff_t *ofs, - const int *stride, const double *phi0, const double *theta, - const double *weight, sharp_geom_info **geom_info); - -/*! Deallocates the geometry information in \a info. */ -void sharp_destroy_geom_info (sharp_geom_info *info); - -/*! \} */ - -/*! \defgroup lowlevelgroup Low-level libsharp SHT interface */ -/*! \{ */ - -/*! Enumeration of SHARP job types. */ -typedef enum { SHARP_MAP2ALM, /*!< analysis */ - SHARP_ALM2MAP, /*!< synthesis */ - SHARP_ALM2MAP_DERIV1 /*!< synthesis of first derivatives */ - } sharp_jobtype; - -/*! Performs a libsharp SHT job. The interface deliberately does not use - the C99 "complex" data type, in order to be callable from C. - \param type the type of SHT - \param spin the spin of the quantities to be transformed - \param add_output if 0, the output arrays will be overwritten, - else the result will be added to the output arrays. - \param alm contains pointers to the a_lm coefficients. If \a spin==0, - alm[0] points to the a_lm of the first SHT, alm[1] to those of the second - etc. If \a spin>0, alm[0] and alm[1] point to the a_lm of the first SHT, - alm[2] and alm[3] to those of the second, etc. The exact data type of \a alm - depends on the \a dp parameter. - \param map contains pointers to the maps. If \a spin==0, - map[0] points to the map of the first SHT, map[1] to that of the second - etc. If \a spin>0, map[0] and map[1] point to the maps of the first SHT, - map[2] and map[3] to those of the second, etc. The exact data type of \a map - depends on the \a dp parameter. - \param geom_info A \c sharp_geom_info object compatible with the provided - \a map arrays. - \param alm_info A \c sharp_alm_info object compatible with the provided - \a alm arrays. All \c m values from 0 to some \c mmax<=lmax must be present - exactly once. - \param ntrans the number of simultaneous SHTs - \param dp if 0, the \a alm is expected to have the type "complex float **" - and \a map is expected to have the type "float **"; otherwise the expected - types are "complex double **" and "double **", respectively. - \param nv Internally used SHT parameter. Set to 0 unless you know what you are - doing. - \param time If not NULL, the wall clock time required for this SHT - (in seconds)will be written here. - \param opcnt If not NULL, a conservative estimate of the total floating point - operation count for this SHT will be written here. */ -void sharp_execute (sharp_jobtype type, int spin, int add_output, void *alm, - void *map, const sharp_geom_info *geom_info, const sharp_alm_info *alm_info, - int ntrans, int dp, int nv, double *time, unsigned long long *opcnt); - -/*! \} */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/external/cosmotool/external/sharp/libsharp/sharp_mpi.c b/external/cosmotool/external/sharp/libsharp/sharp_mpi.c deleted file mode 100644 index 9849a7c..0000000 --- a/external/cosmotool/external/sharp/libsharp/sharp_mpi.c +++ /dev/null @@ -1,300 +0,0 @@ -/* - * This file is part of libsharp. - * - * libsharp is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libsharp is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libsharp; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libsharp is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/*! \file sharp_mpi.c - * Functionality only needed for MPI-parallel transforms - * - * Copyright (C) 2012 Max-Planck-Society - * \author Martin Reinecke - */ - -#ifdef USE_MPI - -#include "sharp_mpi.h" - -typedef struct - { - int ntasks; /* number of tasks */ - int mytask; /* own task number */ - MPI_Comm comm; /* communicator to use */ - - int *nm; /* number of m values on every task */ - int *ofs_m; /* accumulated nm */ - int nmtotal; /* total number of m values (must be mmax+1) */ - int *mval; /* array containing all m values of task 0, task 1 etc. */ - int mmax; - int nph; - - int *npair; /* number of ring pairs on every task */ - int *ofs_pair; /* accumulated npair */ - int npairtotal; /* total number of ring pairs */ - - double *theta; /* theta of first ring of every pair on task 0, task 1 etc. */ - int *ispair; /* is this really a pair? */ - - int *almcount, *almdisp, *mapcount, *mapdisp; /* for all2all communication */ - } sharp_mpi_info; - -static void sharp_make_mpi_info (MPI_Comm comm, const sharp_job *job, - sharp_mpi_info *minfo) - { - minfo->comm = comm; - MPI_Comm_size (comm, &minfo->ntasks); - MPI_Comm_rank (comm, &minfo->mytask); - - minfo->nm=RALLOC(int,minfo->ntasks); - MPI_Allgather ((int *)(&job->ainfo->nm),1,MPI_INT,minfo->nm,1,MPI_INT,comm); - minfo->ofs_m=RALLOC(int,minfo->ntasks+1); - minfo->ofs_m[0]=0; - for (int i=1; i<=minfo->ntasks; ++i) - minfo->ofs_m[i] = minfo->ofs_m[i-1]+minfo->nm[i-1]; - minfo->nmtotal=minfo->ofs_m[minfo->ntasks]; - minfo->mval=RALLOC(int,minfo->nmtotal); - MPI_Allgatherv(job->ainfo->mval, job->ainfo->nm, MPI_INT, minfo->mval, - minfo->nm, minfo->ofs_m, MPI_INT, comm); - - minfo->mmax=sharp_get_mmax(minfo->mval,minfo->nmtotal); - - minfo->npair=RALLOC(int,minfo->ntasks); - MPI_Allgather ((int *)(&job->ginfo->npairs), 1, MPI_INT, minfo->npair, 1, - MPI_INT, comm); - minfo->ofs_pair=RALLOC(int,minfo->ntasks+1); - minfo->ofs_pair[0]=0; - for (int i=1; i<=minfo->ntasks; ++i) - minfo->ofs_pair[i] = minfo->ofs_pair[i-1]+minfo->npair[i-1]; - minfo->npairtotal=minfo->ofs_pair[minfo->ntasks]; - - double *theta_tmp=RALLOC(double,job->ginfo->npairs); - int *ispair_tmp=RALLOC(int,job->ginfo->npairs); - for (int i=0; iginfo->npairs; ++i) - { - theta_tmp[i]=job->ginfo->pair[i].r1.theta; - ispair_tmp[i]=job->ginfo->pair[i].r2.nph>0; - } - minfo->theta=RALLOC(double,minfo->npairtotal); - minfo->ispair=RALLOC(int,minfo->npairtotal); - MPI_Allgatherv(theta_tmp, job->ginfo->npairs, MPI_DOUBLE, minfo->theta, - minfo->npair, minfo->ofs_pair, MPI_DOUBLE, comm); - MPI_Allgatherv(ispair_tmp, job->ginfo->npairs, MPI_INT, minfo->ispair, - minfo->npair, minfo->ofs_pair, MPI_INT, comm); - DEALLOC(theta_tmp); - DEALLOC(ispair_tmp); - - minfo->nph=2*job->nmaps*job->ntrans; - - minfo->almcount=RALLOC(int,minfo->ntasks); - minfo->almdisp=RALLOC(int,minfo->ntasks+1); - minfo->mapcount=RALLOC(int,minfo->ntasks); - minfo->mapdisp=RALLOC(int,minfo->ntasks+1); - minfo->almdisp[0]=minfo->mapdisp[0]=0; - for (int i=0; intasks; ++i) - { - minfo->almcount[i] = 2*minfo->nph*minfo->nm[minfo->mytask]*minfo->npair[i]; - minfo->almdisp[i+1] = minfo->almdisp[i]+minfo->almcount[i]; - minfo->mapcount[i] = 2*minfo->nph*minfo->nm[i]*minfo->npair[minfo->mytask]; - minfo->mapdisp[i+1] = minfo->mapdisp[i]+minfo->mapcount[i]; - } - } - -static void sharp_destroy_mpi_info (sharp_mpi_info *minfo) - { - DEALLOC(minfo->nm); - DEALLOC(minfo->ofs_m); - DEALLOC(minfo->mval); - DEALLOC(minfo->npair); - DEALLOC(minfo->ofs_pair); - DEALLOC(minfo->theta); - DEALLOC(minfo->ispair); - DEALLOC(minfo->almcount); - DEALLOC(minfo->almdisp); - DEALLOC(minfo->mapcount); - DEALLOC(minfo->mapdisp); - } - -static void sharp_communicate_alm2map (const sharp_mpi_info *minfo, dcmplx **ph) - { - dcmplx *phas_tmp = RALLOC(dcmplx,minfo->mapdisp[minfo->ntasks]/2); - - MPI_Alltoallv (*ph,minfo->almcount,minfo->almdisp,MPI_DOUBLE,phas_tmp, - minfo->mapcount,minfo->mapdisp,MPI_DOUBLE,minfo->comm); - - DEALLOC(*ph); - ALLOC(*ph,dcmplx,minfo->nph*minfo->npair[minfo->mytask]*minfo->nmtotal); - - for (int task=0; taskntasks; ++task) - for (int th=0; thnpair[minfo->mytask]; ++th) - for (int mi=0; minm[task]; ++mi) - { - int m = minfo->mval[mi+minfo->ofs_m[task]]; - int o1 = minfo->nph*(th*(minfo->mmax+1) + m); - int o2 = minfo->mapdisp[task]/2+minfo->nph*(mi+th*minfo->nm[task]); - for (int i=0; inph; ++i) - (*ph)[o1+i] = phas_tmp[o2+i]; - } - DEALLOC(phas_tmp); - } - -static void sharp_communicate_map2alm (const sharp_mpi_info *minfo, dcmplx **ph) - { - dcmplx *phas_tmp = RALLOC(dcmplx,minfo->mapdisp[minfo->ntasks]/2); - - for (int task=0; taskntasks; ++task) - for (int th=0; thnpair[minfo->mytask]; ++th) - for (int mi=0; minm[task]; ++mi) - { - int m = minfo->mval[mi+minfo->ofs_m[task]]; - int o1 = minfo->mapdisp[task]/2+minfo->nph*(mi+th*minfo->nm[task]); - int o2 = minfo->nph*(th*(minfo->mmax+1) + m); - for (int i=0; inph; ++i) - phas_tmp[o1+i] = (*ph)[o2+i]; - } - - DEALLOC(*ph); - ALLOC(*ph,dcmplx,minfo->nph*minfo->nm[minfo->mytask]*minfo->npairtotal); - - MPI_Alltoallv (phas_tmp,minfo->mapcount,minfo->mapdisp,MPI_DOUBLE, - *ph,minfo->almcount,minfo->almdisp,MPI_DOUBLE,minfo->comm); - - DEALLOC(phas_tmp); - } - -static void alloc_phase_mpi (sharp_job *job, int nm, int ntheta, - int nmfull, int nthetafull) - { - ptrdiff_t phase_size = (job->type==SHARP_MAP2ALM) ? - (ptrdiff_t)(nmfull)*ntheta : (ptrdiff_t)(nm)*nthetafull; - job->phase=RALLOC(dcmplx,2*job->ntrans*job->nmaps*phase_size); - } - -static void alm2map_comm (sharp_job *job, const sharp_mpi_info *minfo) - { - if (job->type != SHARP_MAP2ALM) - sharp_communicate_alm2map (minfo,&job->phase); - } - -static void map2alm_comm (sharp_job *job, const sharp_mpi_info *minfo) - { - if (job->type == SHARP_MAP2ALM) - sharp_communicate_map2alm (minfo,&job->phase); - } - -static void sharp_execute_job_mpi (sharp_job *job, MPI_Comm comm) - { - double timer=wallTime(); - int ntasks; - MPI_Comm_size(comm, &ntasks); - if (ntasks==1) /* fall back to scalar implementation */ - { sharp_execute_job (job); return; } - - int lmax = job->ainfo->lmax; - - job->norm_l = sharp_Ylmgen_get_norm (lmax, job->spin); - - sharp_mpi_info minfo; - sharp_make_mpi_info(comm, job, &minfo); - -/* clear output arrays if requested */ - init_output (job); - - alloc_phase_mpi (job,job->ainfo->nm,job->ginfo->npairs,minfo.mmax+1, - minfo.npairtotal); - - double *cth = RALLOC(double,minfo.npairtotal), - *sth = RALLOC(double,minfo.npairtotal); - idxhelper *stmp = RALLOC(idxhelper,minfo.npairtotal); - for (int i=0; iphase where necessary */ - map2phase (job, minfo.mmax, 0, job->ginfo->npairs); - - map2alm_comm (job, &minfo); - -#pragma omp parallel -{ - sharp_job ljob = *job; - sharp_Ylmgen_C generator; - sharp_Ylmgen_init (&generator,lmax,minfo.mmax,ljob.spin); - alloc_almtmp(&ljob,lmax); - -#pragma omp for schedule(dynamic,1) - for (int mi=0; miainfo->nm; ++mi) - { -/* alm->alm_tmp where necessary */ - alm2almtmp (&ljob, lmax, mi); - -/* inner conversion loop */ - inner_loop (&ljob, minfo.ispair, cth, sth, 0, minfo.npairtotal, - &generator, mi, idx); - -/* alm_tmp->alm where necessary */ - almtmp2alm (&ljob, lmax, mi); - } - - sharp_Ylmgen_destroy(&generator); - dealloc_almtmp(&ljob); - -#pragma omp critical - job->opcnt+=ljob.opcnt; -} /* end of parallel region */ - - alm2map_comm (job, &minfo); - -/* phase->map where necessary */ - phase2map (job, minfo.mmax, 0, job->ginfo->npairs); - - DEALLOC(cth); - DEALLOC(sth); - DEALLOC(idx); - DEALLOC(job->norm_l); - dealloc_phase (job); - sharp_destroy_mpi_info(&minfo); - job->time=wallTime()-timer; - } - -void sharp_execute_mpi (MPI_Comm comm, sharp_jobtype type, int spin, - int add_output, void *alm, void *map, const sharp_geom_info *geom_info, - const sharp_alm_info *alm_info, int ntrans, int dp, int nv, double *time, - unsigned long long *opcnt) - { - sharp_job job; - sharp_build_job_common (&job, type, spin, add_output, alm, map, geom_info, - alm_info, ntrans, dp, nv); - - sharp_execute_job_mpi (&job, comm); - if (time!=NULL) *time = job.time; - if (opcnt!=NULL) *opcnt = job.opcnt; - } - -#endif diff --git a/external/cosmotool/external/sharp/libsharp/sharp_mpi.h b/external/cosmotool/external/sharp/libsharp/sharp_mpi.h deleted file mode 100644 index 2a79864..0000000 --- a/external/cosmotool/external/sharp/libsharp/sharp_mpi.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * This file is part of libsharp. - * - * libsharp is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libsharp is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libsharp; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libsharp is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/*! \file sharp_mpi.h - * Interface for the spherical transform library with MPI support. - * - * Copyright (C) 2011,2012 Max-Planck-Society - * \author Martin Reinecke - */ - -#ifndef PLANCK_SHARP_MPI_H -#define PLANCK_SHARP_MPI_H - -#include -#include "sharp.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/*! Performs an MPI parallel libsharp SHT job. The interface deliberately does - not use the C99 "complex" data type, in order to be callable from C. - \param comm the MPI communicator to be used for this SHT - \param type the type of SHT - \param spin the spin of the quantities to be transformed - \param add_output if 0, the output arrays will be overwritten, - else the result will be added to the output arrays. - \param alm contains pointers to the a_lm coefficients. If \a spin==0, - alm[0] points to the a_lm of the first SHT, alm[1] to those of the second - etc. If \a spin>0, alm[0] and alm[1] point to the a_lm of the first SHT, - alm[2] and alm[3] to those of the second, etc. The exact data type of \a alm - depends on the \a dp parameter. - \param map contains pointers to the maps. If \a spin==0, - map[0] points to the map of the first SHT, map[1] to that of the second - etc. If \a spin>0, map[0] and map[1] point to the maps of the first SHT, - map[2] and map[3] to those of the second, etc. The exact data type of \a map - depends on the \a dp parameter. - \param geom_info A \c sharp_geom_info object compatible with the provided - \a map arrays. The total map geometry is the union of all \a geom_info - objects over the participating MPI tasks. - \param alm_info A \c sharp_alm_info object compatible with the provided - \a alm arrays. All \c m values from 0 to some \c mmax<=lmax must be present - exactly once in the union of all \a alm_info objects over the participating - MPI tasks. - \param ntrans the number of simultaneous SHTs - \param dp if 0, the \a alm is expected to have the type "complex float **" - and \a map is expected to have the type "float **"; otherwise the expected - types are "complex double **" and "double **", respectively. - \param nv Internally used SHT parameter. Set to 0 unless you know what you are - doing. - \param time If not NULL, the wall clock time required for this SHT - (in seconds)will be written here. - \param opcnt If not NULL, a conservative estimate of the total floating point - operation count for this SHT will be written here. */ -void sharp_execute_mpi (MPI_Comm comm, sharp_jobtype type, int spin, - int add_output, void *alm, void *map, const sharp_geom_info *geom_info, - const sharp_alm_info *alm_info, int ntrans, int dp, int nv, double *time, - unsigned long long *opcnt); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/external/cosmotool/external/sharp/libsharp/sharp_test.c b/external/cosmotool/external/sharp/libsharp/sharp_test.c deleted file mode 100644 index 98ecdf8..0000000 --- a/external/cosmotool/external/sharp/libsharp/sharp_test.c +++ /dev/null @@ -1,249 +0,0 @@ -/* - * This file is part of libsharp. - * - * libsharp is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libsharp is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libsharp; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libsharp is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/*! \file sharp_test.c - Accuracy test for libsharp's map analysis. - - This program first generates a_lm coefficients up to - a user-specified lmax (with mmax=lmax); where applicable, the - real and imaginary parts of the coefficients are uniform - random numbers of the interval [-1;1[. - Afterwards, the random a_lm are converted to a map. - This map is analyzed (optionally using an iterative scheme - with a user-supplied number of steps). - After every iteration, the code then outputs the RMS of the residual a_lm - (i.e. the difference between the current and original a_lm), divided by - the RMS of the original a_lm, as well as the maximum absolute change of any - real or imaginary part between the current and original a_lm. - - This operation can be performed for several different pixelisations: - - a Gaussian with the minimal number of rings for exact analysis - and a user-defined ring resolution - - an ECP grid with the minimal number of rings for exact analysis - and a user-defined ring resolution - - a Healpix grid with a user-defined Nside parameter. - - The user can specify the spin of the desired transform. - - Copyright (C) 2006-2012 Max-Planck-Society - \author Martin Reinecke -*/ - -#include -#include -#ifdef USE_MPI -#include "mpi.h" -#endif -#include "sharp.h" -#include "sharp_geomhelpers.h" -#include "sharp_almhelpers.h" -#include "c_utils.h" -#include "sharp_announce.h" -#include "sharp_core.h" -#include "memusage.h" - -typedef complex double dcmplx; - -static double drand (double min, double max) - { return min + (max-min)*rand()/(RAND_MAX+1.0); } - -static void random_alm (dcmplx *alm, sharp_alm_info *helper, int spin) - { - for (int mi=0;minm; ++mi) - { - int m=helper->mval[mi]; - for (int l=m;l<=helper->lmax; ++l) - { - if ((lmaxdiff) maxdiff=fabs(x); - if (fabs(y)>maxdiff) maxdiff=fabs(y); - } - sum=sqrt(sum/nalms); - sum2=sqrt(sum2/nalms); - printf("component %i: rms %e, maxerr %e\n",i, sum/sum2, maxdiff); - } - } - -static void map2alm_iter (sharp_geom_info *tinfo, double **map, - dcmplx **alm_orig, dcmplx **alm, int lmax, int mmax, - ptrdiff_t npix, ptrdiff_t nalms, int spin, int ntrans, int niter) - { - int ncomp = ntrans*((spin==0) ? 1 : 2); - - sharp_alm_info *alms; - sharp_make_triangular_alm_info(lmax,mmax,1,&alms); - - double time; - unsigned long long opcnt; - sharp_execute(SHARP_MAP2ALM,spin,0,&alm[0],&map[0],tinfo,alms,ntrans,1,0, - &time,&opcnt); - printf("wall time for map2alm: %fs\n",time); - printf("Performance: %fGFLOPs/s\n",1e-9*opcnt/time); - measure_errors(alm_orig,alm,nalms,ncomp); - - for (int iter=0; iter ",1); - - int lmax=atoi(argv[2]); - int niter=atoi(argv[4]); - int spin=atoi(argv[5]); - int ntrans=atoi(argv[6]); - - printf("Testing map analysis accuracy.\n"); - printf("lmax=%d, %d iterations, spin=%d\n", lmax, niter, spin); - - sharp_geom_info *tinfo; - if (strcmp(argv[1],"gauss")==0) - { - int nrings=lmax+1; - int ppring=atoi(argv[3]); - ptrdiff_t npix=(ptrdiff_t)nrings*ppring; - printf("\nTesting Gaussian grid (%d rings, %d pixels/ring, %ld pixels)\n", - nrings,ppring,(long)npix); - sharp_make_gauss_geom_info (nrings, ppring, 1, ppring, &tinfo); - check_accuracy(tinfo,lmax,lmax,npix,spin,ntrans,niter); - sharp_destroy_geom_info(tinfo); - } - else if (strcmp(argv[1],"ecp")==0) - { - int nrings=2*lmax+2; - int ppring=atoi(argv[3]); - ptrdiff_t npix=(ptrdiff_t)nrings*ppring; - printf("\nTesting ECP grid (%d rings, %d pixels/ring, %ld pixels)\n", - nrings,ppring,(long)npix); - sharp_make_ecp_geom_info (nrings, ppring, 0., 1, ppring, &tinfo); - check_accuracy(tinfo,lmax,lmax,npix,spin,ntrans,niter); - sharp_destroy_geom_info(tinfo); - } - else if (strcmp(argv[1],"healpix")==0) - { - int nside=atoi(argv[3]); - if (nside<1) nside=1; - ptrdiff_t npix=12*(ptrdiff_t)nside*nside; - printf("\nTesting Healpix grid (nside=%d, %ld pixels)\n", - nside,(long)npix); - sharp_make_healpix_geom_info (nside, 1, &tinfo); - check_accuracy(tinfo,lmax,lmax,npix,spin,ntrans,niter); - sharp_destroy_geom_info(tinfo); - } - else - UTIL_FAIL("unknown grid geometry"); - - printf("\nMemory high water mark: %.2f MB\n",VmHWM()/(1<<20)); - -#ifdef USE_MPI - MPI_Finalize(); -#endif - return 0; - } diff --git a/external/cosmotool/external/sharp/libsharp/sharp_test_mpi.c b/external/cosmotool/external/sharp/libsharp/sharp_test_mpi.c deleted file mode 100644 index cca647c..0000000 --- a/external/cosmotool/external/sharp/libsharp/sharp_test_mpi.c +++ /dev/null @@ -1,359 +0,0 @@ -/* - * This file is part of libsharp. - * - * libsharp is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libsharp is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libsharp; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libsharp is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/*! \file sharp_test_mpi.c - Accuracy test for libsharp's map analysis with MPI support. - - This program first generates a_lm coefficients up to - a user-specified lmax (with mmax=lmax); where applicable, the - real and imaginary parts of the coefficients are uniform - random numbers of the interval [-1;1[. - Afterwards, the random a_lm are converted to a map. - This map is analyzed (optionally using an iterative scheme - with a user-supplied number of steps). - After every iteration, the code then outputs the RMS of the residual a_lm - (i.e. the difference between the current and original a_lm), divided by - the RMS of the original a_lm, as well as the maximum absolute change of any - real or imaginary part between the current and original a_lm. - - This operation can be performed for several different pixelisations: - - a Gaussian with the minimal number of rings for exact analysis - and a user-defined ring resolution - - an ECP grid with the minimal number of rings for exact analysis - and a user-defined ring resolution - - a Healpix grid with a user-defined Nside parameter. - - The user can specify the spin of the desired transform. - - Copyright (C) 2006-2012 Max-Planck-Society - \author Martin Reinecke -*/ - -#ifdef USE_MPI - -#include -#include -#include "sharp_mpi.h" -#include "sharp_geomhelpers.h" -#include "sharp_almhelpers.h" -#include "c_utils.h" -#include "walltime_c.h" -#include "sharp_announce.h" -#include "sharp_core.h" - -typedef complex double dcmplx; - -int ntasks, mytask; - -static unsigned long long totalops (unsigned long long val) - { - unsigned long long tmp; - MPI_Allreduce (&val, &tmp,1, MPI_UNSIGNED_LONG_LONG, MPI_SUM, MPI_COMM_WORLD); - return tmp; - } - -static double maxTime (double val) - { - double tmp; - MPI_Allreduce (&val, &tmp,1, MPI_DOUBLE, MPI_MAX, MPI_COMM_WORLD); - return tmp; - } - -static double drand (double min, double max) - { return min + (max-min)*rand()/(RAND_MAX+1.0); } - -static ptrdiff_t get_nalms(const sharp_alm_info *ainfo) - { - ptrdiff_t res=0; - for (int i=0; inm; ++i) - res += ainfo->lmax-ainfo->mval[i]+1; - return res; - } - -static ptrdiff_t get_npix(const sharp_geom_info *ginfo) - { - ptrdiff_t res=0; - for (int i=0; inpairs; ++i) - { - res += ginfo->pair[i].r1.nph; - if (ginfo->pair[i].r2.nph>0) res += ginfo->pair[i].r2.nph; - } - return res; - } - -static void reduce_alm_info(sharp_alm_info *ainfo) - { - int nmnew=0; - ptrdiff_t ofs = 0; - for (int i=mytask; inm; i+=ntasks,++nmnew) - { - ainfo->mval[nmnew]=ainfo->mval[i]; - ainfo->mvstart[nmnew]=ofs-ainfo->mval[nmnew]; - ofs+=ainfo->lmax-ainfo->mval[nmnew]+1; - } - ainfo->nm=nmnew; - } - -static void reduce_geom_info(sharp_geom_info *ginfo) - { - int npairsnew=0; - ptrdiff_t ofs = 0; - for (int i=mytask; inpairs; i+=ntasks,++npairsnew) - { - ginfo->pair[npairsnew]=ginfo->pair[i]; - ginfo->pair[npairsnew].r1.ofs=ofs; - ofs+=ginfo->pair[npairsnew].r1.nph; - ginfo->pair[npairsnew].r2.ofs=ofs; - if (ginfo->pair[npairsnew].r2.nph>0) ofs+=ginfo->pair[npairsnew].r2.nph; - } - ginfo->npairs=npairsnew; - } - -static void random_alm (dcmplx *alm, sharp_alm_info *helper, int spin) - { - static int cnt=0; - ++cnt; - for (int mi=0;minm; ++mi) - { - int m=helper->mval[mi]; - srand(1234567*cnt+8912*m); - for (int l=m;l<=helper->lmax; ++l) - { - if ((lnm; ++mi) - { - int m=ainfo->mval[mi]; - for (int l=m; l<=ainfo->lmax; ++l) - { - ptrdiff_t idx=sharp_alm_index(ainfo,l,mi); - double x=creal(alm[i][idx])-creal(alm2[i][idx]), - y=cimag(alm[i][idx])-cimag(alm2[i][idx]); - sum+=x*x+y*y; - sum2+=creal(alm[i][idx])*creal(alm[i][idx]) - +cimag(alm[i][idx])*cimag(alm[i][idx]); - if (fabs(x)>maxdiff) maxdiff=fabs(x); - if (fabs(y)>maxdiff) maxdiff=fabs(y); - } - } - - MPI_Allreduce(&sum,&sumtot,1,MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD); - MPI_Allreduce(&sum2,&sum2tot,1,MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD); - MPI_Allreduce(&maxdiff,&maxdifftot,1,MPI_DOUBLE,MPI_MAX,MPI_COMM_WORLD); - sumtot=sqrt(sumtot/nalms_tot); - sum2tot=sqrt(sum2tot/nalms_tot); - if (mytask==0) - printf("component %i: rms %e, maxerr %e\n",i, sumtot/sum2tot, maxdifftot); - } - } - -static void map2alm_iter (sharp_geom_info *tinfo, double **map, - dcmplx **alm_orig, dcmplx **alm, int lmax, int mmax, - ptrdiff_t npix, int spin, int ntrans, int niter) - { - int ncomp = ntrans*((spin==0) ? 1 : 2); - - sharp_alm_info *alms; - sharp_make_triangular_alm_info(lmax,mmax,1,&alms); - reduce_alm_info(alms); - - double jtime; - unsigned long long jopcnt; - - sharp_execute_mpi(MPI_COMM_WORLD,SHARP_MAP2ALM,spin,0,&alm[0],&map[0], - tinfo,alms,ntrans,1,0,&jtime,&jopcnt); - unsigned long long opcnt=totalops(jopcnt); - double timer=maxTime(jtime); - if (mytask==0) printf("wall time for map2alm: %fs\n",timer); - if (mytask==0) printf("Performance: %fGFLOPs/s\n",1e-9*opcnt/timer); - measure_errors(alm_orig,alm,alms,ncomp); - - for (int iter=0; iter ", - mytask==0); - int lmax=atoi(argv[2]); - int niter=atoi(argv[4]); - int spin=atoi(argv[5]); - int ntrans=atoi(argv[6]); - - if (mytask==0) - { - printf("Testing map analysis accuracy.\n"); - printf("lmax=%d, %d iterations, spin=%d\n", lmax, niter, spin); - } - - sharp_geom_info *tinfo; - if (strcmp(argv[1],"gauss")==0) - { - int nrings=lmax+1; - int ppring=atoi(argv[3]); - ptrdiff_t npix=(ptrdiff_t)nrings*ppring; - if (mytask==0) - printf("\nTesting Gaussian grid (%d rings, %d pixels/ring, %ld pixels)\n", - nrings,ppring,(long)npix); - sharp_make_gauss_geom_info (nrings, ppring, 1, ppring, &tinfo); - reduce_geom_info(tinfo); - npix=get_npix(tinfo); - check_accuracy(tinfo,lmax,lmax,npix,spin,ntrans,niter); - sharp_destroy_geom_info(tinfo); - } - else if (strcmp(argv[1],"ecp")==0) - { - int nrings=2*lmax+2; - int ppring=atoi(argv[3]); - ptrdiff_t npix=(ptrdiff_t)nrings*ppring; - if (mytask==0) - printf("\nTesting ECP grid (%d rings, %d pixels/ring, %ld pixels)\n", - nrings,ppring,(long)npix); - sharp_make_ecp_geom_info (nrings, ppring, 0., 1, ppring, &tinfo); - reduce_geom_info(tinfo); - npix=get_npix(tinfo); - check_accuracy(tinfo,lmax,lmax,npix,spin,ntrans,niter); - sharp_destroy_geom_info(tinfo); - } - else if (strcmp(argv[1],"healpix")==0) - { - int nside=atoi(argv[3]); - if (nside<1) nside=1; - ptrdiff_t npix=12*(ptrdiff_t)nside*nside; - if (mytask==0) - printf("\nTesting Healpix grid (nside=%d, %ld pixels)\n", - nside,(long)npix); - sharp_make_healpix_geom_info (nside, 1, &tinfo); - reduce_geom_info(tinfo); - npix=get_npix(tinfo); - check_accuracy(tinfo,lmax,lmax,npix,spin,ntrans,niter); - sharp_destroy_geom_info(tinfo); - } - else - UTIL_FAIL("unknown grid geometry"); - - MPI_Finalize(); - return 0; - } - -#else - -#include "c_utils.h" - -int main(void) - { UTIL_FAIL("MPI support not enabled."); return 1; } - -#endif diff --git a/external/cosmotool/external/sharp/libsharp/sharp_vecsupport.h b/external/cosmotool/external/sharp/libsharp/sharp_vecsupport.h deleted file mode 100644 index 54f23df..0000000 --- a/external/cosmotool/external/sharp/libsharp/sharp_vecsupport.h +++ /dev/null @@ -1,174 +0,0 @@ -/* - * This file is part of libsharp. - * - * libsharp is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libsharp is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libsharp; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libsharp is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/* \file sharp_vecsupport.h - * Convenience functions for vector arithmetics - * - * Copyright (C) 2012 Max-Planck-Society - * Author: Martin Reinecke - */ - -#ifndef SHARP_VECSUPPORT_H -#define SHARP_VECSUPPORT_H - -#include -#include "sharp_vecutil.h" - -typedef double Ts; - -#if (VLEN==1) - -typedef double Tv; - -#define vadd(a,b) ((a)+(b)) -#define vaddeq(a,b) ((a)+=(b)) -#define vsub(a,b) ((a)-(b)) -#define vsubeq(a,b) ((a)-=(b)) -#define vmul(a,b) ((a)*(b)) -#define vmuleq(a,b) ((a)*=(b)) -#define vfmaeq(a,b,c) ((a)+=(b)*(c)) -#define vfmseq(a,b,c) ((a)-=(b)*(c)) -#define vfmaaeq(a,b,c,d,e) ((a)+=(b)*(c)+(d)*(e)) -#define vfmaseq(a,b,c,d,e) ((a)+=(b)*(c)-(d)*(e)) -#define vneg(a) (-(a)) -#define vload(a) (a) -#define vabs(a) fabs(a) -#define vsqrt(a) sqrt(a) -#define vlt(a,b) (((a)<(b))?1.:0.) -#define vgt(a,b) (((a)>(b))?1.:0.) -#define vge(a,b) (((a)>=(b))?1.:0.) -#define vne(a,b) (((a)!=(b))?1.:0.) -#define vand(a,b) ((((a)*(b))!=0.)?1.:0.) -#define vor(a,b) ((((a)+(b))!=0.)?1.:0.) - -static inline Tv vmin (Tv a, Tv b) { return (ab) ? a : b; } - -#define vanyTrue(a) ((a)!=0.) -#define vallTrue(a) ((a)!=0.) -#define vblend(m,a,b) (((m)!=0.) ? (a) : (b)) -#define vzero 0. -#define vone 1. - -#endif - -#if (VLEN==2) - -#include - -#if defined (__SSE3__) -#include -#endif -#if defined (__SSE4_1__) -#include -#endif - -typedef __m128d Tv; - -#define vadd(a,b) _mm_add_pd(a,b) -#define vaddeq(a,b) a=_mm_add_pd(a,b) -#define vsub(a,b) _mm_sub_pd(a,b) -#define vsubeq(a,b) a=_mm_sub_pd(a,b) -#define vmul(a,b) _mm_mul_pd(a,b) -#define vmuleq(a,b) a=_mm_mul_pd(a,b) -#define vfmaeq(a,b,c) a=_mm_add_pd(a,_mm_mul_pd(b,c)) -#define vfmseq(a,b,c) a=_mm_sub_pd(a,_mm_mul_pd(b,c)) -#define vfmaaeq(a,b,c,d,e) \ - a=_mm_add_pd(a,_mm_add_pd(_mm_mul_pd(b,c),_mm_mul_pd(d,e))) -#define vfmaseq(a,b,c,d,e) \ - a=_mm_add_pd(a,_mm_sub_pd(_mm_mul_pd(b,c),_mm_mul_pd(d,e))) -#define vneg(a) _mm_xor_pd(_mm_set1_pd(-0.),a) -#define vload(a) _mm_set1_pd(a) -#define vabs(a) _mm_andnot_pd(_mm_set1_pd(-0.),a) -#define vsqrt(a) _mm_sqrt_pd(a) -#define vlt(a,b) _mm_cmplt_pd(a,b) -#define vgt(a,b) _mm_cmpgt_pd(a,b) -#define vge(a,b) _mm_cmpge_pd(a,b) -#define vne(a,b) _mm_cmpneq_pd(a,b) -#define vand(a,b) _mm_and_pd(a,b) -#define vor(a,b) _mm_or_pd(a,b) -#define vmin(a,b) _mm_min_pd(a,b) -#define vmax(a,b) _mm_max_pd(a,b); -#define vanyTrue(a) (_mm_movemask_pd(a)!=0) -#define vallTrue(a) (_mm_movemask_pd(a)==3) -#if defined(__SSE4_1__) -#define vblend(m,a,b) _mm_blendv_pd(b,a,m) -#else -static inline Tv vblend(Tv m, Tv a, Tv b) - { return _mm_or_pd(_mm_and_pd(a,m),_mm_andnot_pd(m,b)); } -#endif -#define vzero _mm_setzero_pd() -#define vone _mm_set1_pd(1.) - -#endif - -#if (VLEN==4) - -#include -#ifdef __FMA4__ -#include -#endif - -typedef __m256d Tv; - -#define vadd(a,b) _mm256_add_pd(a,b) -#define vaddeq(a,b) a=_mm256_add_pd(a,b) -#define vsub(a,b) _mm256_sub_pd(a,b) -#define vsubeq(a,b) a=_mm256_sub_pd(a,b) -#define vmul(a,b) _mm256_mul_pd(a,b) -#define vmuleq(a,b) a=_mm256_mul_pd(a,b) -#ifdef __FMA4__ -#define vfmaeq(a,b,c) a=_mm256_macc_pd(b,c,a) -#define vfmseq(a,b,c) a=_mm256_nmacc_pd(b,c,a) -#define vfmaaeq(a,b,c,d,e) a=_mm256_macc_pd(d,e,_mm256_macc_pd(b,c,a)) -#define vfmaseq(a,b,c,d,e) a=_mm256_nmacc_pd(d,e,_mm256_macc_pd(b,c,a)) -#else -#define vfmaeq(a,b,c) a=_mm256_add_pd(a,_mm256_mul_pd(b,c)) -#define vfmseq(a,b,c) a=_mm256_sub_pd(a,_mm256_mul_pd(b,c)) -#define vfmaaeq(a,b,c,d,e) \ - a=_mm256_add_pd(a,_mm256_add_pd(_mm256_mul_pd(b,c),_mm256_mul_pd(d,e))) -#define vfmaseq(a,b,c,d,e) \ - a=_mm256_add_pd(a,_mm256_sub_pd(_mm256_mul_pd(b,c),_mm256_mul_pd(d,e))) -#endif -#define vneg(a) _mm256_xor_pd(_mm256_set1_pd(-0.),a) -#define vload(a) _mm256_set1_pd(a) -#define vabs(a) _mm256_andnot_pd(_mm256_set1_pd(-0.),a) -#define vsqrt(a) _mm256_sqrt_pd(a) -#define vlt(a,b) _mm256_cmp_pd(a,b,_CMP_LT_OQ) -#define vgt(a,b) _mm256_cmp_pd(a,b,_CMP_GT_OQ) -#define vge(a,b) _mm256_cmp_pd(a,b,_CMP_GE_OQ) -#define vne(a,b) _mm256_cmp_pd(a,b,_CMP_NEQ_OQ) -#define vand(a,b) _mm256_and_pd(a,b) -#define vor(a,b) _mm256_or_pd(a,b) -#define vmin(a,b) _mm256_min_pd(a,b) -#define vmax(a,b) _mm256_max_pd(a,b) -#define vanyTrue(a) (_mm256_movemask_pd(a)!=0) -#define vallTrue(a) (_mm256_movemask_pd(a)==15) -#define vblend(m,a,b) _mm256_blendv_pd(b,a,m) -#define vzero _mm256_setzero_pd() -#define vone _mm256_set1_pd(1.) - -#endif - -#endif diff --git a/external/cosmotool/external/sharp/libsharp/sharp_vecutil.h b/external/cosmotool/external/sharp/libsharp/sharp_vecutil.h deleted file mode 100644 index fb6b60f..0000000 --- a/external/cosmotool/external/sharp/libsharp/sharp_vecutil.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * This file is part of libc_utils. - * - * libc_utils is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libc_utils is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libc_utils; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libc_utils is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/*! \file sharp_vecutil.h - * Functionality related to vector instruction support - * - * Copyright (C) 2012 Max-Planck-Society - * \author Martin Reinecke - */ - -#ifndef SHARP_VECUTIL_H -#define SHARP_VECUTIL_H - -#if (defined (__AVX__)) -#define VLEN 4 -#elif (defined (__SSE2__)) -#define VLEN 2 -#else -#define VLEN 1 -#endif - -#endif diff --git a/external/cosmotool/external/sharp/libsharp/sharp_ylmgen_c.c b/external/cosmotool/external/sharp/libsharp/sharp_ylmgen_c.c deleted file mode 100644 index 5f0f1a1..0000000 --- a/external/cosmotool/external/sharp/libsharp/sharp_ylmgen_c.c +++ /dev/null @@ -1,230 +0,0 @@ -/* - * This file is part of libsharp. - * - * libsharp is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * libsharp is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with libsharp; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * libsharp is being developed at the Max-Planck-Institut fuer Astrophysik - * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt - * (DLR). - */ - -/* - * Helper code for efficient calculation of Y_lm(theta,phi=0) - * - * Copyright (C) 2005-2012 Max-Planck-Society - * Author: Martin Reinecke - */ - -#include -#include -#include "sharp_ylmgen_c.h" -#include "c_utils.h" - -static inline void normalize (double *val, int *scale, double xfmax) - { - while (fabs(*val)>xfmax) { *val*=sharp_fsmall; ++*scale; } - if (*val!=0.) - while (fabs(*val)lmax = l_max; - gen->mmax = m_max; - UTIL_ASSERT(spin>=0,"incorrect spin"); - gen->s = spin; - UTIL_ASSERT((sharp_minscale<=0)&&(sharp_maxscale>0), - "bad value for min/maxscale"); - gen->cf=RALLOC(double,sharp_maxscale-sharp_minscale+1); - gen->cf[-sharp_minscale]=1.; - for (int m=-sharp_minscale-1; m>=0; --m) - gen->cf[m]=gen->cf[m+1]*sharp_fsmall; - for (int m=-sharp_minscale+1; m<(sharp_maxscale-sharp_minscale+1); ++m) - gen->cf[m]=gen->cf[m-1]*sharp_fbig; - - gen->m = -1; - if (spin==0) - { - gen->rf = RALLOC(sharp_ylmgen_dbl2,gen->lmax+1); - gen->mfac = RALLOC(double,gen->mmax+1); - gen->mfac[0] = inv_sqrt4pi; - for (int m=1; m<=gen->mmax; ++m) - gen->mfac[m] = gen->mfac[m-1]*sqrt((2*m+1.)/(2*m)); - gen->root = RALLOC(double,2*gen->lmax+5); - gen->iroot = RALLOC(double,2*gen->lmax+5); - for (int m=0; m<2*gen->lmax+5; ++m) - { - gen->root[m] = sqrt(m); - gen->iroot[m] = (m==0) ? 0. : 1./gen->root[m]; - } - } - else - { - gen->m=gen->mlo=gen->mhi=-1234567890; - ALLOC(gen->fx,sharp_ylmgen_dbl3,gen->lmax+2); - for (int m=0; mlmax+2; ++m) - gen->fx[m].f[0]=gen->fx[m].f[1]=gen->fx[m].f[2]=0.; - ALLOC(gen->inv,double,gen->lmax+1); - gen->inv[0]=0; - for (int m=1; mlmax+1; ++m) gen->inv[m]=1./m; - ALLOC(gen->flm1,double,2*gen->lmax+1); - ALLOC(gen->flm2,double,2*gen->lmax+1); - for (int m=0; m<2*gen->lmax+1; ++m) - { - gen->flm1[m] = sqrt(1./(m+1.)); - gen->flm2[m] = sqrt(m/(m+1.)); - } - ALLOC(gen->prefac,double,gen->mmax+1); - ALLOC(gen->fscale,int,gen->mmax+1); - double *fac = RALLOC(double,2*gen->lmax+1); - int *facscale = RALLOC(int,2*gen->lmax+1); - fac[0]=1; facscale[0]=0; - for (int m=1; m<2*gen->lmax+1; ++m) - { - fac[m]=fac[m-1]*sqrt(m); - facscale[m]=facscale[m-1]; - normalize(&fac[m],&facscale[m],sharp_fbighalf); - } - for (int m=0; m<=gen->mmax; ++m) - { - int mlo=gen->s, mhi=m; - if (mhiprefac[m]=tfac; - gen->fscale[m]=tscale; - } - DEALLOC(fac); - DEALLOC(facscale); - } - } - -void sharp_Ylmgen_destroy (sharp_Ylmgen_C *gen) - { - DEALLOC(gen->cf); - if (gen->s==0) - { - DEALLOC(gen->rf); - DEALLOC(gen->mfac); - DEALLOC(gen->root); - DEALLOC(gen->iroot); - } - else - { - DEALLOC(gen->fx); - DEALLOC(gen->prefac); - DEALLOC(gen->fscale); - DEALLOC(gen->flm1); - DEALLOC(gen->flm2); - DEALLOC(gen->inv); - } - } - -void sharp_Ylmgen_prepare (sharp_Ylmgen_C *gen, int m) - { - if (m==gen->m) return; - UTIL_ASSERT(m>=0,"incorrect m"); - gen->m = m; - - if (gen->s==0) - { - gen->rf[m].f[0] = gen->root[2*m+3]; - gen->rf[m].f[1] = 0.; - for (int l=m+1; l<=gen->lmax; ++l) - { - double tmp=gen->root[2*l+3]*gen->iroot[l+1+m]*gen->iroot[l+1-m]; - gen->rf[l].f[0] = tmp*gen->root[2*l+1]; - gen->rf[l].f[1] = tmp*gen->root[l+m]*gen->root[l-m]*gen->iroot[2*l-1]; - } - } - else - { - int mlo_=m, mhi_=gen->s; - if (mhi_mhi==mhi_) && (gen->mlo==mlo_)); - - gen->mlo = mlo_; gen->mhi = mhi_; - - if (!ms_similar) - { - for (int l=gen->mhi; llmax; ++l) - { - double t = gen->flm1[l+gen->m]*gen->flm1[l-gen->m] - *gen->flm1[l+gen->s]*gen->flm1[l-gen->s]; - double lt = 2*l+1; - double l1 = l+1; - gen->fx[l+1].f[0]=l1*lt*t; - gen->fx[l+1].f[1]=gen->m*gen->s*gen->inv[l]*gen->inv[l+1]; - t = gen->flm2[l+gen->m]*gen->flm2[l-gen->m] - *gen->flm2[l+gen->s]*gen->flm2[l-gen->s]; - gen->fx[l+1].f[2]=t*l1*gen->inv[l]; - } - } - - gen->preMinus_p = gen->preMinus_m = 0; - if (gen->mhi==gen->m) - { - gen->cosPow = gen->mhi+gen->s; gen->sinPow = gen->mhi-gen->s; - gen->preMinus_p = gen->preMinus_m = ((gen->mhi-gen->s)&1); - } - else - { - gen->cosPow = gen->mhi+gen->m; gen->sinPow = gen->mhi-gen->m; - gen->preMinus_m = ((gen->mhi+gen->m)&1); - } - } - } - -double *sharp_Ylmgen_get_norm (int lmax, int spin) - { - const double pi = 3.141592653589793238462643383279502884197; - double *res=RALLOC(double,lmax+1); - /* sign convention for H=1 (LensPix paper) */ -#if 1 - double spinsign = (spin>0) ? -1.0 : 1.0; -#else - double spinsign = 1.0; -#endif - - if (spin==0) - { - for (int l=0; l<=lmax; ++l) - res[l]=1.; - return res; - } - - spinsign = (spin&1) ? -spinsign : spinsign; - for (int l=0; l<=lmax; ++l) - res[l] = (l) target_link_libraries(CosmoTool ${CosmoTool_LIBS}) - if (BUILD_STATIC_LIBS) - add_library(CosmoTool_static STATIC ${CosmoTool_SRCS}) + add_library(CosmoTool_static STATIC ${CosmoTool_SRCS} $) + target_link_libraries(CosmoTool_static) + set_property(TARGET CosmoTool_static PROPERTY POSITION_INDEPENDENT_CODE ON) endif(BUILD_STATIC_LIBS) else (BUILD_SHARED_LIBS) - add_library(CosmoTool STATIC ${CosmoTool_SRCS}) + add_library(CosmoTool STATIC ${CosmoTool_SRCS} $) + target_link_libraries(CosmoTool) + set_property(TARGET CosmoTool PROPERTY POSITION_INDEPENDENT_CODE ON) endif (BUILD_SHARED_LIBS) install(TARGETS CosmoTool @@ -90,5 +110,7 @@ endif (BUILD_SHARED_LIBS) install(DIRECTORY . DESTINATION include/CosmoTool FILES_MATCHING PATTERN "*.hpp") +install(DIRECTORY ${OMPTL_BUILD_DIR} + DESTINATION include/CosmoTool) install(DIRECTORY . DESTINATION include/CosmoTool FILES_MATCHING PATTERN "*.tcc") diff --git a/external/cosmotool/src/algo.hpp b/external/cosmotool/src/algo.hpp index 2dce3eb..be03a77 100644 --- a/external/cosmotool/src/algo.hpp +++ b/external/cosmotool/src/algo.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/algo.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/algo.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/external/cosmotool/src/bqueue.hpp b/external/cosmotool/src/bqueue.hpp index 872830e..87b3a1c 100644 --- a/external/cosmotool/src/bqueue.hpp +++ b/external/cosmotool/src/bqueue.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/bqueue.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/bqueue.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/external/cosmotool/src/bsp_simple.hpp b/external/cosmotool/src/bsp_simple.hpp index 298256e..f9d2681 100644 --- a/external/cosmotool/src/bsp_simple.hpp +++ b/external/cosmotool/src/bsp_simple.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/bsp_simple.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/bsp_simple.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/external/cosmotool/src/cic.cpp b/external/cosmotool/src/cic.cpp index 8a24597..d8601c5 100644 --- a/external/cosmotool/src/cic.cpp +++ b/external/cosmotool/src/cic.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/cic.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/cic.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com @@ -32,12 +32,14 @@ same conditions as regards security. The fact that you are presently reading this means that you have had knowledge of the CeCILL license and that you accept its terms. +*/ - +#include "openmp.hpp" #include #include #include #include "cic.hpp" +using namespace CosmoTool; + CICFilter::CICFilter(uint32_t N, double len) { spatialLen = len; @@ -60,89 +62,29 @@ void CICFilter::resetMesh() void CICFilter::putParticles(CICParticles *particles, uint32_t N) { -#if 0 - uint32_t numCorners = 1 << NUMDIMS; + int threadUsed = smp_get_max_threads(); + double *threadedDensity[threadUsed]; + bool threadActivated[threadUsed]; + uint32_t tUsedMin[threadUsed], tUsedMax[threadUsed]; - for (uint32_t i = 0; i < N; i++) - { - Coordinates xyz; - int32_t ixyz[NUMDIMS]; - int32_t rxyz[NUMDIMS]; - CICType alpha[NUMDIMS]; - CICType beta[NUMDIMS]; - for (int j = 0; j < NUMDIMS; j++) - { - xyz[j] = (particles[i].coords[j] / spatialLen * szGrid); - ixyz[j] = (int32_t)floor(xyz[j] - 0.5); - beta[j] = xyz[j] - ixyz[j] - 0.5; - alpha[j] = 1 - beta[j]; - if (ixyz[j] < 0) - ixyz[j] = szGrid-1; - } + for (int t = 0; t < threadUsed; t++) + { + threadedDensity[t] = new double[totalSize]; + std::fill(threadedDensity[t], threadedDensity[t]+totalSize, 0); + } - CICType tot_mass = 0; - for (int j = 0; j < numCorners; j++) - { - CICType rel_mass = 1; - uint32_t idx = 0; - uint32_t mul = 1; - uint32_t mul2 = 1; + std::fill(threadActivated, threadActivated+threadUsed, false); + std::fill(tUsedMin, tUsedMin+threadUsed, totalSize); + std::fill(tUsedMax, tUsedMax+threadUsed, 0); - for (int k = 0; k < NUMDIMS; k++) - { - uint32_t ipos = ((j & mul2) != 0); - - if (ipos == 1) - { - rel_mass *= beta[k]; - } - else - { - rel_mass *= alpha[k]; - } - - rxyz[k] = ixyz[k] + ipos; - - if (rxyz[k] >= szGrid) - idx += (rxyz[k] - szGrid) * mul; - else - idx += rxyz[k] * mul; - - mul2 *= 2; - mul *= szGrid; - } - - assert(rel_mass > 0); - assert(rel_mass < 1); - assert(idx < totalSize); - densityGrid[idx] += rel_mass * particles[i].mass; - tot_mass += rel_mass; - } - assert(tot_mass < 1.1); - assert(tot_mass > 0.9); - } -#endif -#if 0 - for (uint32_t i = 0; i < N; i++) - { - Coordinates xyz; - int32_t ixyz[NUMDIMS]; - for (int j = 0; j < NUMDIMS; j++) - { - xyz[j] = (particles[i].coords[j] / spatialLen * szGrid); - ixyz[j] = (int32_t)round(xyz[j] - 0.5); - if (ixyz[j] < 0) - ixyz[j] = szGrid-1; - else if (ixyz[j] >= szGrid) - ixyz[j] = 0; - } - - uint32_t idx = ixyz[0] + ixyz[1] * szGrid + ixyz[2] * szGrid * szGrid; - densityGrid[idx] += particles[i].mass; - } - -#endif +#pragma omp parallel + { + int thisThread = smp_get_thread_id(); + double *dg = threadedDensity[thisThread]; + threadActivated[thisThread] = true; + +#pragma omp for schedule(static) for (uint32_t i = 0; i < N; i++) { CICType x, y, z; @@ -193,44 +135,62 @@ void CICFilter::putParticles(CICParticles *particles, uint32_t N) // 000 idx = ix + (iy + iz * szGrid) * szGrid; - densityGrid[idx] += + dg[idx] += mass * beta_x * beta_y * beta_z; // 100 idx = ix2 + (iy + iz * szGrid) * szGrid; - densityGrid[idx] += + dg[idx] += mass * alpha_x * beta_y * beta_z; // 010 idx = ix + (iy2 + iz * szGrid) * szGrid; - densityGrid[idx] += + dg[idx] += mass * beta_x * alpha_y * beta_z; // 110 idx = ix2 + (iy2 + iz * szGrid) * szGrid; - densityGrid[idx] += + dg[idx] += mass * alpha_x * alpha_y * beta_z; // 001 idx = ix + (iy + iz2 * szGrid) * szGrid; - densityGrid[idx] += + dg[idx] += mass * beta_x * beta_y * alpha_z; // 101 idx = ix2 + (iy + iz2 * szGrid) * szGrid; - densityGrid[idx] += + dg[idx] += mass * alpha_x * beta_y * alpha_z; // 011 idx = ix + (iy2 + iz2 * szGrid) * szGrid; - densityGrid[idx] += + dg[idx] += mass * beta_x * alpha_y * alpha_z; // 111 idx = ix2 + (iy2 + iz2 * szGrid) * szGrid; - densityGrid[idx] += + dg[idx] += mass * alpha_x * alpha_y * alpha_z; + + tUsedMin[thisThread] = std::min(tUsedMin[thisThread], idx); + tUsedMax[thisThread] = std::max(tUsedMax[thisThread], idx); } + } + + for (int t = 0; t < threadUsed; t++) + { + if (!threadActivated[t]) + continue; +#pragma omp parallel for schedule(static) + for (long p = tUsedMin[t]; p < tUsedMax[t]; p++) + densityGrid[p] += threadedDensity[t][p]; + } + + for (int t = 0; t < threadUsed; t++) + { + delete[] threadedDensity[t]; + } } void CICFilter::getDensityField(CICType*& field, uint32_t& res) @@ -238,3 +198,4 @@ void CICFilter::getDensityField(CICType*& field, uint32_t& res) field = densityGrid; res = totalSize; } + diff --git a/external/cosmotool/src/cic.hpp b/external/cosmotool/src/cic.hpp index 31ba069..2792426 100644 --- a/external/cosmotool/src/cic.hpp +++ b/external/cosmotool/src/cic.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/cic.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/cic.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com @@ -36,10 +36,10 @@ knowledge of the CeCILL license and that you accept its terms. #ifndef __CICFILTER_HPP #define __CICFILTER_HPP -#include "CosmoTool/config.hpp" +#include "config.hpp" #include -using namespace CosmoTool; +namespace CosmoTool { typedef float CICType; @@ -67,4 +67,6 @@ typedef float CICType; uint32_t szGrid; }; +}; + #endif diff --git a/external/cosmotool/src/config.hpp b/external/cosmotool/src/config.hpp index 8fd7b2d..6fa7b63 100644 --- a/external/cosmotool/src/config.hpp +++ b/external/cosmotool/src/config.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/config.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/config.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com @@ -39,6 +39,7 @@ knowledge of the CeCILL license and that you accept its terms. #include #include #include +#include #include namespace CosmoTool @@ -83,13 +84,13 @@ namespace CosmoTool * Base exception class for all exceptions handled by * this library. */ - class Exception : public std::exception + class Exception : public std::runtime_error { public: Exception(const std::string& mess) - : msg(mess), msgok(true) {} + : std::runtime_error(mess), msg(mess), msgok(true) {} Exception() - : msgok(false) {} + : std::runtime_error("No message"), msgok(false) {} virtual ~Exception() throw () {} diff --git a/external/cosmotool/src/cosmopower.cpp b/external/cosmotool/src/cosmopower.cpp index a96a6bb..9848597 100644 --- a/external/cosmotool/src/cosmopower.cpp +++ b/external/cosmotool/src/cosmopower.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/cosmopower.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/cosmopower.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com @@ -41,6 +41,7 @@ knowledge of the CeCILL license and that you accept its terms. #include #include #include "cosmopower.hpp" +#include "tf_fit.hpp" using namespace std; using namespace CosmoTool; @@ -69,9 +70,17 @@ CosmoPower::CosmoPower() Theta_27 = 2.728/2.7; + ehu_params = 0; + updateCosmology(); } +CosmoPower::~CosmoPower() +{ + if (ehu_params) + delete ehu_params; +} + /* * This is \hat{tophat} */ @@ -90,7 +99,8 @@ static double powC(double q, double alpha_c) static double T_tilde_0(double q, double alpha_c, double beta_c) { - double a = log(M_E + 1.8 * beta_c * q); + static const double c_E = M_E; + double a = log(c_E + 1.8 * beta_c * q); return a / ( a + powC(q, alpha_c) * q * q); } @@ -121,37 +131,81 @@ double CosmoPower::powerEfstathiou(double k) return normPower * pow(k,n) * pow(1+pow(f,nu),(-2/nu)); } +void CosmoPower::updateHuWigglesOriginal() +{ + if (ehu_params == 0) + ehu_params = new TF_Transfer(); + + ehu_params->TFset_parameters( (OMEGA_C+OMEGA_B)*h*h, + OMEGA_B/(OMEGA_C+OMEGA_B), Theta_27*2.7); +} + +void CosmoPower::updateHuWigglesConsts() +{ + double f_b = OMEGA_B / OMEGA_0; + double f_c = OMEGA_C / OMEGA_0; + + double k_silk = 1.6 * pow(OMEGA_B * h * h, 0.52) * pow(OmegaEff, 0.73) * (1 + pow(10.4 * OmegaEff, -0.95)); + double z_eq = 2.50e4 * OmegaEff * pow(Theta_27, -4); + //double s = 44.5 * log(9.83 / OmegaEff) / (sqrt(1 + 10 * pow(OMEGA_B * h * h, 0.75))); + double k_eq = 7.46e-2 * OmegaEff * pow(Theta_27, -2); + + double b1_zd = 0.313 * pow(OmegaEff, -0.419) * (1 + 0.607 * pow(OmegaEff, 0.674)); + double b2_zd = 0.238 * pow(OmegaEff, 0.223); + double z_d = 1291 * pow(OmegaEff, 0.251) / (1 + 0.659 * pow(OmegaEff, 0.828)) * (1 + b1_zd * pow(OMEGA_B*h*h, b2_zd)); + + double R_d = 31.5 * OMEGA_B * h * h * pow(Theta_27, -4) * 1e3 / z_d; + double Req = 31.5 * OMEGA_B * h * h * pow(Theta_27, -4) * 1e3 / z_eq; + + double s = 2./(3.*k_eq) * sqrt(6/Req) * log((sqrt(1 + R_d) + sqrt(R_d + Req))/(1 + sqrt(Req))); + + double a1 = pow(46.9 * OmegaEff, 0.670) * (1 + pow(32.1 * OmegaEff, -0.532)); + double a2 = pow(12.0 * OmegaEff, 0.424) * (1 + pow(45.0 * OmegaEff, -0.582)); + double alpha_c = pow(a1, -f_b) * pow(a2, -pow(f_b, 3)); + + double b1_betac = 0.944 * 1/(1 + pow(458 * OmegaEff, -0.708)); + double b2_betac = pow(0.395 * OmegaEff, -0.0266); + double beta_c = 1/ ( 1 + b1_betac * (pow(f_c, b2_betac) - 1) ); + + double alpha_b = 2.07 * k_eq * s * pow(1 + R_d, -0.75) * powG((1 + z_eq)/(1 + z_d)); + double beta_b = 0.5 + f_b + (3 - 2 * f_b) * sqrt(pow(17.2 * OmegaEff, 2) + 1); + double beta_node = 8.41 * pow(OmegaEff, 0.435); + + ehu.k_silk = k_silk; + ehu.s = s; + ehu.k_eq = k_eq; + ehu.alpha_c = alpha_c; + ehu.beta_c = beta_c; + + ehu.alpha_b = alpha_b; + ehu.beta_b = beta_b; + ehu.beta_node = beta_node; +} + double CosmoPower::powerHuWiggles(double k) { // EISENSTEIN ET HU (1998) // FULL POWER SPECTRUM WITH BARYONS AND WIGGLES - double k_silk = 1.6 * pow(OMEGA_B * h * h, 0.52) * pow(OmegaEff, 0.73) * (1 + pow(10.4 * OmegaEff, -0.95)); - double z_eq = 2.50e4 * OmegaEff * pow(Theta_27, -4); - double s = 44.5 * log(9.83 / OmegaEff) / (sqrt(1 + 10 * pow(OMEGA_B * h * h, 0.75))); - double f = 1 / (1 + pow(k * s / 5.4, 4)); - double k_eq = 7.46e-2 * OmegaEff * pow(Theta_27, -2); - double a1 = pow(46.9 * OmegaEff, 0.670) * (1 + pow(32.1 * OmegaEff, -0.532)); - double a2 = pow(12.0 * OmegaEff, 0.424) * (1 + pow(45.0 * OmegaEff, -0.582)); - double alpha_c = pow(a1, -OMEGA_B/ OMEGA_0) * pow(a2, -pow(OMEGA_B / OMEGA_0, 3)); + double k_silk = ehu.k_silk; + double s = ehu.s; + double k_eq = ehu.k_eq; + double alpha_c = ehu.alpha_c; + double beta_c = ehu.beta_c; + double alpha_b = ehu.alpha_b; + double beta_b = ehu.beta_b; + double xx = k * s; + double s_tilde = s * pow(1 + pow(ehu.beta_node / (xx), 3), -1./3); + + double f = 1 / (1 + pow(xx / 5.4, 4)); double q = k / (13.41 * k_eq); - double b1_betac = 0.944 * 1/(1 + pow(458 * OmegaEff, -0.708)); - double b2_betac = pow(0.395 * OmegaEff, -0.0266); - double beta_c = 1/ ( 1 + b1_betac * (pow(OMEGA_C / OMEGA_0, b2_betac) - 1) ); double T_c = f * T_tilde_0(q, 1, beta_c) + (1 - f) * T_tilde_0(q, alpha_c, beta_c); - double b1_zd = 0.313 * pow(OmegaEff, -0.419) * (1 + 0.607 * pow(OmegaEff, 0.674)); - double b2_zd = 0.238 * pow(OmegaEff, 0.223); - double z_d = 1291 * pow(OmegaEff, 0.251) / (1 + 0.659 * pow(OmegaEff, 0.828)) * (1 + b1_zd * pow(OmegaEff, b2_zd)); - double R_d = 31.5 * OMEGA_B * h * h * pow(Theta_27, -4) * 1e3 / z_d; - - double alpha_b = 2.07 * k_eq * s * pow(1 + R_d, -0.75) * powG((1 + z_eq)/(1 + z_d)); - double beta_b = 0.5 + OMEGA_B / OMEGA_0 + (3 - 2 * OMEGA_B / OMEGA_0) * sqrt(pow(17.2 * OmegaEff, 2) + 1); - double beta_node = 8.41 * pow(OmegaEff, 0.435); - double s_tilde = s * pow(1 + pow(beta_node / (k * s), 3), -1./3); - - double T_b = (T_tilde_0(q, 1, 1) / (1 + pow(k * s / 5.2, 2)) + alpha_b / (1 + pow(beta_b / (k * s), 3)) * exp(-pow(k/k_silk, 1.4))) * j_0(k * s_tilde); + double T_b = ( + T_tilde_0(q, 1, 1) / (1 + pow(xx / 5.2, 2)) + + alpha_b / (1 + pow(beta_b / xx, 3)) * exp(-pow(k/k_silk, 1.4)) + ) * j_0(k * s_tilde); double T_k = OMEGA_B/OMEGA_0 * T_b + OMEGA_C/OMEGA_0 * T_c; @@ -212,7 +266,7 @@ double CosmoPower::powerBDM(double k) double CosmoPower::powerTest(double k) { - return 1/(1+k*k); + return normPower;//1/(1+k*k); } /* @@ -233,12 +287,18 @@ double CosmoPower::integrandNormalize(double x) return power(k)*k*k*f*f/(x*x); } -void CosmoPower::normalize() +void CosmoPower::normalize(double k_min, double k_max) { double normVal = 0; double abserr; gsl_integration_workspace *w = gsl_integration_workspace_alloc(NUM_ITERATION); gsl_function f; + double x_min = 0, x_max = 1; + + if (k_max > 0) + x_min = 1/(1+k_max); + if (k_min > 0) + x_max = 1/(1+k_min); f.function = gslPowSpecNorm; f.params = this; @@ -248,12 +308,12 @@ void CosmoPower::normalize() ofstream ff("PP_k.txt"); for (int i = 0; i < 100; i++) { - double k = pow(10.0, 4.0*i/100.-2); + double k = pow(10.0, 8.0*i/100.-4); ff << k << " " << power(k) << endl; } // gsl_integration_qagiu(&f, 0, 0, TOLERANCE, NUM_ITERATION, w, &normVal, &abserr); - gsl_integration_qag(&f, 0, 1, 0, TOLERANCE, NUM_ITERATION, GSL_INTEG_GAUSS61, w, &normVal, &abserr); + gsl_integration_qag(&f, x_min, x_max, 0, TOLERANCE, NUM_ITERATION, GSL_INTEG_GAUSS61, w, &normVal, &abserr); gsl_integration_workspace_free(w); normVal /= (2*M_PI*M_PI); @@ -301,6 +361,16 @@ double CosmoPower::power(double k) return (this->*eval)(k); } +double CosmoPower::powerHuWigglesOriginal(double k) +{ + float tfb, tfc; + + ehu_params->TFfit_onek(k, &tfb, &tfc); + + double T_k = OMEGA_B/OMEGA_0 * tfb + OMEGA_C/OMEGA_0 * tfc; + + return normPower * pow(k,n) * T_k * T_k; +} void CosmoPower::setFunction(CosmoFunction f) { @@ -310,8 +380,13 @@ void CosmoPower::setFunction(CosmoFunction f) eval = &CosmoPower::powerEfstathiou; break; case HU_WIGGLES: + updateHuWigglesConsts(); eval = &CosmoPower::powerHuWiggles; break; + case HU_WIGGLES_ORIGINAL: + updateHuWigglesOriginal(); + eval = &CosmoPower::powerHuWigglesOriginal; + break; case HU_BARYON: eval = &CosmoPower::powerHuBaryons; break; @@ -337,5 +412,6 @@ void CosmoPower::setFunction(CosmoFunction f) void CosmoPower::setNormalization(double A_K) { - normPower = A_K/power(0.002); + normPower = A_K;///power(0.002); } + diff --git a/external/cosmotool/src/cosmopower.hpp b/external/cosmotool/src/cosmopower.hpp index dd86cf1..a04442b 100644 --- a/external/cosmotool/src/cosmopower.hpp +++ b/external/cosmotool/src/cosmopower.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/cosmopower.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/cosmopower.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com @@ -38,6 +38,8 @@ knowledge of the CeCILL license and that you accept its terms. namespace CosmoTool { + struct TF_Transfer; + class CosmoPower { public: @@ -63,28 +65,42 @@ namespace CosmoTool { double OmegaEff; double Gamma0; double normPower; + + struct EHuParams { + double k_silk; + double s; + double k_eq; + double alpha_b, beta_b; + double alpha_c, beta_c; + double beta_node; + }; + + EHuParams ehu; + TF_Transfer *ehu_params; - enum CosmoFunction - { - POWER_EFSTATHIOU, - HU_WIGGLES, - HU_BARYON, - OLD_POWERSPECTRUM, - POWER_BARDEEN, - POWER_SUGIYAMA, - POWER_BDM, - POWER_TEST - }; + enum CosmoFunction { + POWER_EFSTATHIOU, + HU_WIGGLES, + HU_BARYON, + OLD_POWERSPECTRUM, + POWER_BARDEEN, + POWER_SUGIYAMA, + POWER_BDM, + POWER_TEST, + HU_WIGGLES_ORIGINAL + }; CosmoPower(); + ~CosmoPower(); void setFunction(CosmoFunction f); void updateCosmology(); void updatePhysicalCosmology(); - void normalize(); + void normalize(double k_min = -1, double k_max = -1); void setNormalization(double A_K); - + void updateHuWigglesConsts(); + void updateHuWigglesOriginal(); double eval_theta_theta(double k); double power(double k); @@ -101,7 +117,7 @@ namespace CosmoTool { double powerSugiyama(double k); double powerBDM(double k); double powerTest(double k); - + double powerHuWigglesOriginal(double k); }; }; diff --git a/external/cosmotool/src/dinterpolate.hpp b/external/cosmotool/src/dinterpolate.hpp index 1bf3322..980d0d0 100644 --- a/external/cosmotool/src/dinterpolate.hpp +++ b/external/cosmotool/src/dinterpolate.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/dinterpolate.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/dinterpolate.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/external/cosmotool/src/eskow.hpp b/external/cosmotool/src/eskow.hpp index 987cb88..3e09767 100644 --- a/external/cosmotool/src/eskow.hpp +++ b/external/cosmotool/src/eskow.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/eskow.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/eskow.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/external/cosmotool/src/field.hpp b/external/cosmotool/src/field.hpp index 45f6eac..d0b9377 100644 --- a/external/cosmotool/src/field.hpp +++ b/external/cosmotool/src/field.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/field.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/field.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/external/cosmotool/src/fixArray.hpp b/external/cosmotool/src/fixArray.hpp index 0d2e26d..556cc78 100644 --- a/external/cosmotool/src/fixArray.hpp +++ b/external/cosmotool/src/fixArray.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fixArray.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fixArray.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/external/cosmotool/src/fortran.cpp b/external/cosmotool/src/fortran.cpp index 716d57b..83e9730 100644 --- a/external/cosmotool/src/fortran.cpp +++ b/external/cosmotool/src/fortran.cpp @@ -43,7 +43,6 @@ using namespace std; using namespace CosmoTool; UnformattedRead::UnformattedRead(const string& fname) - throw(NoSuchFileException) { f = new ifstream(fname.c_str()); if (!*f) @@ -52,10 +51,10 @@ UnformattedRead::UnformattedRead(const string& fname) swapOrdering = false; cSize = Check_32bits; checkPointRef = checkPointAccum = 0; + recordBuffer = 0; } UnformattedRead::UnformattedRead(const char *fname) - throw(NoSuchFileException) { f = new ifstream(fname); if (!*f) @@ -63,11 +62,14 @@ UnformattedRead::UnformattedRead(const char *fname) swapOrdering = false; cSize = Check_32bits; checkPointRef = checkPointAccum = 0; + recordBuffer = 0; } UnformattedRead::~UnformattedRead() { + if (recordBuffer != 0) + delete[] recordBuffer; delete f; } @@ -97,7 +99,6 @@ void UnformattedRead::setCheckpointSize(CheckpointSize cs) } void UnformattedRead::skip(int64_t off) - throw (InvalidUnformattedAccess) { if (checkPointAccum == 0 && checkPointRef == 0) { @@ -115,8 +116,7 @@ void UnformattedRead::skip(int64_t off) checkPointAccum += off; } -void UnformattedRead::beginCheckpoint() - throw (InvalidUnformattedAccess,EndOfFileException) +void UnformattedRead::beginCheckpoint(bool bufferRecord) { if (checkPointAccum != 0) throw InvalidUnformattedAccess(); @@ -129,15 +129,26 @@ void UnformattedRead::beginCheckpoint() if (f->eof()) throw EndOfFileException(); + + if (bufferRecord) { + std::cout << "Use fast I/O mode" << std::endl; + recordBuffer = new uint8_t[checkPointRef]; + f->read(reinterpret_cast(recordBuffer), checkPointRef); + } } void UnformattedRead::endCheckpoint(bool autodrop) - throw (InvalidUnformattedAccess) { + if (recordBuffer != 0) { + delete[] recordBuffer; + recordBuffer = 0; + } + if (checkPointRef != checkPointAccum) { - if (!autodrop || checkPointAccum > checkPointRef) + if (!autodrop || checkPointAccum > checkPointRef) { throw InvalidUnformattedAccess(); + } f->seekg(checkPointRef-checkPointAccum, ios::cur); } @@ -145,21 +156,25 @@ void UnformattedRead::endCheckpoint(bool autodrop) checkPointRef = (cSize == Check_32bits) ? 4 : 8; checkPointAccum = 0; - checkPointRef = (cSize == Check_32bits) ? readInt32() : readInt64(); + checkPointRef = (cSize == Check_32bits) ? readUint32() : readInt64(); - if (oldCheckPoint != checkPointRef) + if (oldCheckPoint != checkPointRef) { throw InvalidUnformattedAccess(); + } checkPointAccum = checkPointRef = 0; } void UnformattedRead::readOrderedBuffer(void *buffer, int size) - throw (InvalidUnformattedAccess) { if ((checkPointAccum+(uint64_t)size) > checkPointRef) throw InvalidUnformattedAccess(); - f->read((char *)buffer, size); + if (recordBuffer != 0) { + memcpy(buffer, &recordBuffer[checkPointAccum], size); + } else { + f->read((char *)buffer, size); + } if (swapOrdering) { @@ -171,7 +186,6 @@ void UnformattedRead::readOrderedBuffer(void *buffer, int size) } double UnformattedRead::readReal64() - throw (InvalidUnformattedAccess) { union { @@ -185,7 +199,6 @@ double UnformattedRead::readReal64() } float UnformattedRead::readReal32() - throw (InvalidUnformattedAccess) { union { @@ -199,7 +212,6 @@ float UnformattedRead::readReal32() } uint32_t UnformattedRead::readUint32() - throw (InvalidUnformattedAccess) { union { @@ -213,7 +225,6 @@ uint32_t UnformattedRead::readUint32() } int32_t UnformattedRead::readInt32() - throw (InvalidUnformattedAccess) { union { @@ -227,7 +238,6 @@ int32_t UnformattedRead::readInt32() } int64_t UnformattedRead::readInt64() - throw (InvalidUnformattedAccess) { union { @@ -243,7 +253,6 @@ int64_t UnformattedRead::readInt64() //// UnformattedWrite UnformattedWrite::UnformattedWrite(const string& fname) - throw(NoSuchFileException) { f = new ofstream(fname.c_str()); if (!*f) @@ -255,7 +264,6 @@ UnformattedWrite::UnformattedWrite(const string& fname) } UnformattedWrite::UnformattedWrite(const char *fname) - throw(NoSuchFileException) { f = new ofstream(fname); if (!*f) @@ -285,7 +293,6 @@ void UnformattedWrite::setCheckpointSize(CheckpointSize cs) } void UnformattedWrite::beginCheckpoint() - throw (InvalidUnformattedAccess,FilesystemFullException) { if (checkPointAccum != 0) throw InvalidUnformattedAccess(); @@ -303,7 +310,6 @@ void UnformattedWrite::beginCheckpoint() } void UnformattedWrite::endCheckpoint() - throw (InvalidUnformattedAccess,FilesystemFullException) { if (checkPointAccum == 0) throw InvalidUnformattedAccess(); @@ -335,7 +341,6 @@ void UnformattedWrite::endCheckpoint() } void UnformattedWrite::writeOrderedBuffer(void *buffer, int size) - throw (FilesystemFullException) { f->write((char *)buffer, size); @@ -352,7 +357,6 @@ void UnformattedWrite::writeOrderedBuffer(void *buffer, int size) } void UnformattedWrite::writeReal64(double d) - throw (FilesystemFullException) { union { @@ -366,7 +370,6 @@ void UnformattedWrite::writeReal64(double d) } void UnformattedWrite::writeReal32(float f) - throw (FilesystemFullException) { union { @@ -380,7 +383,6 @@ void UnformattedWrite::writeReal32(float f) } void UnformattedWrite::writeInt32(int32_t i) - throw (FilesystemFullException) { union { @@ -393,7 +395,6 @@ void UnformattedWrite::writeInt32(int32_t i) } void UnformattedWrite::writeInt64(int64_t i) - throw (FilesystemFullException) { union { @@ -406,7 +407,6 @@ void UnformattedWrite::writeInt64(int64_t i) } void UnformattedWrite::writeInt8(int8_t i) - throw (FilesystemFullException) { union { char b; int8_t i; } a; diff --git a/external/cosmotool/src/fortran.hpp b/external/cosmotool/src/fortran.hpp index 48b4a1d..471e87f 100644 --- a/external/cosmotool/src/fortran.hpp +++ b/external/cosmotool/src/fortran.hpp @@ -46,6 +46,9 @@ namespace CosmoTool { class InvalidUnformattedAccess : public Exception { + public: + InvalidUnformattedAccess() + : Exception("Invalid unformatted fortran file format") {} }; class FortranTypes @@ -64,10 +67,8 @@ namespace CosmoTool { public: - UnformattedRead(const std::string& fname) - throw (NoSuchFileException); - UnformattedRead(const char *fname) - throw (NoSuchFileException); + UnformattedRead(const std::string& fname); + UnformattedRead(const char *fname); ~UnformattedRead(); // Todo implement primitive description @@ -76,36 +77,28 @@ namespace CosmoTool uint64_t getBlockSize() const { return checkPointRef; } - void beginCheckpoint() - throw (InvalidUnformattedAccess,EndOfFileException); - void endCheckpoint(bool autodrop = false) - throw (InvalidUnformattedAccess); + void beginCheckpoint(bool bufferRecord = false); + void endCheckpoint(bool autodrop = false); - double readReal64() - throw (InvalidUnformattedAccess); - float readReal32() - throw (InvalidUnformattedAccess); - uint32_t readUint32() - throw (InvalidUnformattedAccess); - int32_t readInt32() - throw (InvalidUnformattedAccess); - int64_t readInt64() - throw (InvalidUnformattedAccess); + double readReal64(); + float readReal32(); + uint32_t readUint32(); + int32_t readInt32(); + int64_t readInt64(); - void skip(int64_t off) - throw (InvalidUnformattedAccess); + void skip(int64_t off); int64_t position() const; void seek(int64_t pos); - void readOrderedBuffer(void *buffer, int size) - throw (InvalidUnformattedAccess); + void readOrderedBuffer(void *buffer, int size); protected: bool swapOrdering; CheckpointSize cSize; uint64_t checkPointRef; uint64_t checkPointAccum; std::ifstream *f; + uint8_t *recordBuffer; }; @@ -113,34 +106,24 @@ namespace CosmoTool { public: - UnformattedWrite(const std::string& fname) - throw (NoSuchFileException); - UnformattedWrite(const char *fname) - throw (NoSuchFileException); + UnformattedWrite(const std::string& fname); + UnformattedWrite(const char *fname); ~UnformattedWrite(); // Todo implement primitive description void setOrdering(Ordering o); void setCheckpointSize(CheckpointSize cs); - void beginCheckpoint() - throw (FilesystemFullException,InvalidUnformattedAccess); - void endCheckpoint() - throw (FilesystemFullException,InvalidUnformattedAccess); + void beginCheckpoint(); + void endCheckpoint(); - void writeReal64(double d) - throw (FilesystemFullException); - void writeReal32(float f) - throw (FilesystemFullException); - void writeInt32(int32_t i) - throw (FilesystemFullException); - void writeInt64(int64_t i) - throw (FilesystemFullException); - void writeInt8(int8_t c) - throw (FilesystemFullException); + void writeReal64(double d); + void writeReal32(float f); + void writeInt32(int32_t i); + void writeInt64(int64_t i); + void writeInt8(int8_t c); - void writeOrderedBuffer(void *buffer, int size) - throw(FilesystemFullException); + void writeOrderedBuffer(void *buffer, int size); protected: bool swapOrdering; CheckpointSize cSize; diff --git a/external/cosmotool/src/fourier/base_types.hpp b/external/cosmotool/src/fourier/base_types.hpp index f39e3a5..c5cf4e9 100644 --- a/external/cosmotool/src/fourier/base_types.hpp +++ b/external/cosmotool/src/fourier/base_types.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fourier/base_types.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fourier/base_types.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com @@ -55,6 +55,7 @@ namespace CosmoTool protected: SpectrumFunction() {} public: + typedef T type; typedef Eigen::Array VecType; typedef Eigen::Map MapType; typedef Eigen::Map ConstMapType; @@ -88,6 +89,7 @@ namespace CosmoTool FourierMap() {} public: + typedef T type; typedef Eigen::Array VecType; typedef Eigen::Map MapType; typedef Eigen::Map ConstMapType; @@ -168,6 +170,7 @@ namespace CosmoTool { protected: FourierTransform() {} + FourierTransform(const FourierTransform& a) { abort(); } public: virtual ~FourierTransform() { } @@ -189,6 +192,7 @@ namespace CosmoTool class MapUtilityFunction { public: + typedef T type; typedef SpectrumFunction Spectrum; typedef boost::shared_ptr Spectrum_ptr; typedef FourierMap > FMap; diff --git a/external/cosmotool/src/fourier/details/euclidian_maps.hpp b/external/cosmotool/src/fourier/details/euclidian_maps.hpp index 53b0278..2e6d5bb 100644 --- a/external/cosmotool/src/fourier/details/euclidian_maps.hpp +++ b/external/cosmotool/src/fourier/details/euclidian_maps.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fourier/details/euclidian_maps.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fourier/details/euclidian_maps.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com @@ -36,10 +36,16 @@ knowledge of the CeCILL license and that you accept its terms. #ifndef __DETAILS_EUCLIDIAN_MAPS #define __DETAILS_EUCLIDIAN_MAPS +#include +#include namespace CosmoTool { + namespace details { + static void no_free_euclidian_map(void *) {} + } + template class EuclidianFourierMapBase: public FourierMap { @@ -57,9 +63,22 @@ namespace CosmoTool m_dims = indims; m_size = 1; for (int i = 0; i < m_dims.size(); i++) - m_size *= m_dims[i]; + m_size *= m_dims[i]; } + template + EuclidianFourierMapBase(ArrayType& indata) + { + m_data = boost::shared_ptr( + indata.origin(), + std::ptr_fun(details::no_free_euclidian_map)); + m_dims = DimArray(indata.num_dimensions()); + m_size = indata.num_elements(); + for (int i = 0; i < m_dims.size(); i++) + m_dims[i] = indata.shape()[i]; + } + + virtual ~EuclidianFourierMapBase() { } @@ -70,6 +89,14 @@ namespace CosmoTool virtual T *data() { return m_data.get(); } virtual long size() const { return m_size; } + boost::multi_array_ref& array() { + return boost::multi_array_ref(m_data.get(), boost::extents[size]); + } + + boost::const_multi_array_ref& array() const { + return boost::const_multi_array_ref(m_data.get(), boost::extents[size]); + } + virtual FourierMap *copy() const { FourierMap *m = this->mimick(); @@ -89,6 +116,12 @@ namespace CosmoTool : EuclidianFourierMapBase(indata, indims) {} + template + EuclidianFourierMapReal(ArrayType& indata) + : EuclidianFourierMapBase(indata) + {} + + virtual FourierMap *mimick() const { return new EuclidianFourierMapReal( @@ -124,16 +157,32 @@ namespace CosmoTool int dim0, const DimArray& indims, const std::vector& dk) - : EuclidianFourierMapBase >(indata, indims), delta_k(dk), m_dim0(dim0), even0((dim0 % 2)==0) + : EuclidianFourierMapBase >(indata, indims), + delta_k(dk), m_dim0(dim0), even0((dim0 % 2)==0) { assert(dk.size() == indims.size()); plane_size = 1; alleven = true; - for (int q = 1; q < indims.size(); q++) - { - plane_size *= indims[q]; - alleven = alleven && ((indims[q]%2)==0); - } + for (int q = 1; q < indims.size(); q++) { + plane_size *= indims[q]; + alleven = alleven && ((indims[q]%2)==0); + } + } + + template + EuclidianFourierMapComplex(ArrayType& indata, + int dim0, + const std::vector& dk) + : EuclidianFourierMapBase >(indata), + delta_k(dk), m_dim0(dim0), even0((dim0 % 2)==0) + { + assert(dk.size() == indata.num_dimensions()); + plane_size = 1; + alleven = true; + for (int q = 1; q < this->m_dims.size(); q++) { + plane_size *= this->m_dims[q]; + alleven = alleven && ((this->m_dims[q]%2)==0); + } } virtual FourierMap > *mimick() const @@ -161,18 +210,17 @@ namespace CosmoTool assert(kvec.size() == dims.size()); kvec[0] = ik[0] * delta_k[0]; - for (int q = 1; q < ik.size(); q++) - { - int dk = ik[q]; - if (dk > dims[q]/2) - dk = dk - dims[q]; + for (int q = 1; q < ik.size(); q++) { + int dk = ik[q]; + if (dk > dims[q]/2) + dk = dk - dims[q]; - kvec[q] = dk*delta_k[q]; - } + kvec[q] = dk*delta_k[q]; + } } template - void get_Kvec(long p, Array2& kvec) const + void get_Kvec_p(long p, Array2& kvec) const { const DimArray& dims = this->getDims(); DimArray d(delta_k.size()); @@ -200,19 +248,18 @@ namespace CosmoTool double k2 = 0; k2 += CosmoTool::square(ik[0]*delta_k[0]); - for (int q = 1; q < ik.size(); q++) - { - int dk = ik[q]; + for (int q = 1; q < ik.size(); q++) { + int dk = ik[q]; - if (dk > dims[q]/2) - dk = dk - dims[q]; - - k2 += CosmoTool::square(delta_k[q]*dk); - } + if (dk > dims[q]/2) + dk = dk - dims[q]; + + k2 += CosmoTool::square(delta_k[q]*dk); + } return std::sqrt(k2); } - double get_K(long p) const + double get_K_p(long p) const { const DimArray& dims = this->getDims(); DimArray d(delta_k.size()); @@ -230,7 +277,8 @@ namespace CosmoTool virtual std::complex dot_product(const FourierMap >& other) const throw(std::bad_cast) { - const EuclidianFourierMapComplex& m2 = dynamic_cast&>(other); + const EuclidianFourierMapComplex& m2 = + dynamic_cast&>(other); if (this->size() != m2.size()) throw std::bad_cast(); @@ -240,24 +288,21 @@ namespace CosmoTool int N0 = dims[0] + (even0 ? 0 : 1); std::complex result = 0; - for (long q0 = 1; q0 < N0-1; q0++) - { - for (long p = 0; p < plane_size; p++) - { - long idx = q0+dims[0]*p; - assert(idx < this->size()); - result += 2*(conj(d1[idx]) * d2[idx]).real(); - } - } - if (even0) - { - for (long p = 0; p < plane_size; p++) - { - long q0 = N0*p, q1 = (p+1)*N0-1; - result += conj(d1[q0]) * d2[q0]; - result += conj(d1[q1]) * d2[q1]; - } - } + for (long q0 = 1; q0 < N0-1; q0++) { + for (long p = 0; p < plane_size; p++) { + long idx = q0+dims[0]*p; + assert(idx < this->size()); + result += T(2)*(std::conj(d1[idx]) * d2[idx]).real(); + } + } + if (even0) { + for (long p = 0; p < plane_size; p++) + { + long q0 = N0*p, q1 = (p+1)*N0-1; + result += T(2)*std::conj(d1[q0]) * d2[q0]; + result += T(2)*std::conj(d1[q1]) * d2[q1]; + } + } return result; } diff --git a/external/cosmotool/src/fourier/details/euclidian_spectrum_1d.hpp b/external/cosmotool/src/fourier/details/euclidian_spectrum_1d.hpp index 36b524a..8d8b021 100644 --- a/external/cosmotool/src/fourier/details/euclidian_spectrum_1d.hpp +++ b/external/cosmotool/src/fourier/details/euclidian_spectrum_1d.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fourier/details/euclidian_spectrum_1d.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fourier/details/euclidian_spectrum_1d.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com @@ -115,7 +115,7 @@ namespace CosmoTool for (long p = 1; p < rand_map.size(); p++) { - double A_k = std::sqrt(0.5*V*f(rand_map.get_K(p))); + double A_k = std::sqrt(0.5*V*f(rand_map.get_K_p(p))); d[p] = std::complex(gsl_ran_gaussian(rng, A_k), gsl_ran_gaussian(rng, A_k)); } @@ -138,7 +138,7 @@ namespace CosmoTool plane_size *= dims[q]; } - for (long p = 1; p < plane_size/2; p++) + for (long p = 1; p < plane_size/2+1; p++) { long q = (p+1)*dims[0]-1; long q2 = (plane_size-p+1)*dims[0]-1; @@ -147,6 +147,13 @@ namespace CosmoTool d[q] = conj(d[q2]); } + for (long p = 1; p < plane_size/2+1; p++) + { + long q = (p)*dims[0]; + long q2 = (plane_size-p)*dims[0]; + d[q] = conj(d[q2]); + } + if (alleven) { long q = 0; @@ -164,7 +171,7 @@ namespace CosmoTool std::complex *d = m.data(); for (long p = 0; p < m_c.size(); p++) - d[p] *= f(m_c.get_K(p)); + d[p] *= f(m_c.get_K_p(p)); } template @@ -174,7 +181,7 @@ namespace CosmoTool std::complex *d = m.data(); for (long p = 0; p < m_c.size(); p++) - d[p] *= std::sqrt(f(m_c.get_K(p))); + d[p] *= std::sqrt(f(m_c.get_K_p(p))); } template @@ -185,7 +192,7 @@ namespace CosmoTool for (long p = 0; p < m_c.size(); p++) { - T A = f(m_c.get_K(p)); + T A = f(m_c.get_K_p(p)); if (A==0) d[p] = 0; else @@ -201,7 +208,7 @@ namespace CosmoTool for (long p = 0; p < m_c.size(); p++) { - T A = std::sqrt(f(m_c.get_K(p))); + T A = std::sqrt(f(m_c.get_K_p(p))); if (A == 0) d[p] = 0; else diff --git a/external/cosmotool/src/fourier/details/euclidian_spectrum_1d_bin.hpp b/external/cosmotool/src/fourier/details/euclidian_spectrum_1d_bin.hpp index ee6cd0b..eb50209 100644 --- a/external/cosmotool/src/fourier/details/euclidian_spectrum_1d_bin.hpp +++ b/external/cosmotool/src/fourier/details/euclidian_spectrum_1d_bin.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fourier/details/euclidian_spectrum_1d_bin.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fourier/details/euclidian_spectrum_1d_bin.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/external/cosmotool/src/fourier/details/euclidian_transform.hpp b/external/cosmotool/src/fourier/details/euclidian_transform.hpp index 527d38b..4754361 100644 --- a/external/cosmotool/src/fourier/details/euclidian_transform.hpp +++ b/external/cosmotool/src/fourier/details/euclidian_transform.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fourier/details/euclidian_transform.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fourier/details/euclidian_transform.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com @@ -55,11 +55,25 @@ namespace CosmoTool std::vector m_L; public: EuclidianFourierTransform(const DimArray& dims, const std::vector& L) + { + realMap = 0; + create_plan(dims, L); + } + + void create_plan(const DimArray& dims, const std::vector& L) { assert(L.size() == dims.size()); std::vector dk(L.size()); std::vector swapped_dims(dims.size()); - + + if (realMap != 0) + { + delete realMap; + delete fourierMap; + calls::destroy_plan(m_synthesis); + calls::destroy_plan(m_analysis); + } + m_dims = dims; m_dims_hc = dims; m_dims_hc[0] = dims[0]/2+1; @@ -69,28 +83,34 @@ namespace CosmoTool Nc = 1; volume = 1; for (int i = 0; i < dims.size(); i++) - { - N *= dims[i]; + { + N *= dims[i]; Nc *= m_dims_hc[i]; - volume *= L[i]; - dk[i] = 2*M_PI/L[i]; + volume *= L[i]; + dk[i] = 2*M_PI/L[i]; swapped_dims[dims.size()-1-i] = dims[i]; - } + } realMap = new EuclidianFourierMapReal( - boost::shared_ptr(calls::alloc_real(N), - std::ptr_fun(calls::free)), - m_dims); + boost::shared_ptr(calls::alloc_real(N), + std::ptr_fun(calls::free)), + m_dims); fourierMap = new EuclidianFourierMapComplex( - boost::shared_ptr >((std::complex*)calls::alloc_complex(Nc), - std::ptr_fun(calls::free)), - dims[0], m_dims_hc, dk); - m_analysis = calls::plan_dft_r2c(dims.size(), &swapped_dims[0], - realMap->data(), (typename calls::complex_type *)fourierMap->data(), - FFTW_DESTROY_INPUT|FFTW_MEASURE); - m_synthesis = calls::plan_dft_c2r(dims.size(), &swapped_dims[0], - (typename calls::complex_type *)fourierMap->data(), realMap->data(), - FFTW_DESTROY_INPUT|FFTW_MEASURE); + boost::shared_ptr >( + (std::complex*)calls::alloc_complex(Nc), + std::ptr_fun(calls::free)), + dims[0], m_dims_hc, dk); + { + m_analysis = calls::plan_dft_r2c( + dims.size(), &swapped_dims[0], + realMap->data(), + (typename calls::complex_type *)fourierMap->data(), + FFTW_DESTROY_INPUT|FFTW_MEASURE); + m_synthesis = calls::plan_dft_c2r( + dims.size(), &swapped_dims[0], + (typename calls::complex_type *)fourierMap->data(), realMap->data(), + FFTW_DESTROY_INPUT|FFTW_MEASURE); + } } virtual ~EuclidianFourierTransform() @@ -106,12 +126,22 @@ namespace CosmoTool calls::execute(m_synthesis); realMap->scale(1/volume); } + + void synthesis_unnormed() + { + calls::execute(m_synthesis); + } void analysis() { calls::execute(m_analysis); fourierMap->scale(volume/N); } + + void analysis_unnormed() + { + calls::execute(m_analysis); + } void synthesis_conjugate() { diff --git a/external/cosmotool/src/fourier/details/healpix_alms.hpp b/external/cosmotool/src/fourier/details/healpix_alms.hpp index fb438a8..3cfe43c 100644 --- a/external/cosmotool/src/fourier/details/healpix_alms.hpp +++ b/external/cosmotool/src/fourier/details/healpix_alms.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fourier/details/healpix_alms.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fourier/details/healpix_alms.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/external/cosmotool/src/fourier/details/healpix_map.hpp b/external/cosmotool/src/fourier/details/healpix_map.hpp index a2a3f18..ee6f031 100644 --- a/external/cosmotool/src/fourier/details/healpix_map.hpp +++ b/external/cosmotool/src/fourier/details/healpix_map.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fourier/details/healpix_map.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fourier/details/healpix_map.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/external/cosmotool/src/fourier/details/healpix_spectrum.hpp b/external/cosmotool/src/fourier/details/healpix_spectrum.hpp index 92f7085..be69ede 100644 --- a/external/cosmotool/src/fourier/details/healpix_spectrum.hpp +++ b/external/cosmotool/src/fourier/details/healpix_spectrum.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fourier/details/healpix_spectrum.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fourier/details/healpix_spectrum.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com @@ -100,8 +100,8 @@ namespace CosmoTool for (LType m = 1; m <= std::min(l,alms.Mmax()); m++) { std::complex& c = new_data[alms.index(l,m)]; - c.real() = gsl_ran_gaussian(rng, Al); - c.imag() = gsl_ran_gaussian(rng, Al); + c.real(gsl_ran_gaussian(rng, Al)); + c.imag(gsl_ran_gaussian(rng, Al)); } } } diff --git a/external/cosmotool/src/fourier/details/healpix_transform.hpp b/external/cosmotool/src/fourier/details/healpix_transform.hpp index 6e89213..e83dd6a 100644 --- a/external/cosmotool/src/fourier/details/healpix_transform.hpp +++ b/external/cosmotool/src/fourier/details/healpix_transform.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fourier/details/healpix_transform.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fourier/details/healpix_transform.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com @@ -36,13 +36,15 @@ knowledge of the CeCILL license and that you accept its terms. #ifndef __COSMOTOOL_FOURIER_HEALPIX_DETAILS_TRANSFORM_HPP #define __COSMOTOOL_FOURIER_HEALPIX_DETAILS_TRANSFORM_HPP +#include + namespace CosmoTool { template struct HealpixJobHelper__ {}; template<> struct HealpixJobHelper__ - { enum {val=1}; }; + { enum {val=SHARP_DP}; }; template<> struct HealpixJobHelper__ { enum {val=0}; }; @@ -65,6 +67,13 @@ namespace CosmoTool sharp_make_triangular_alm_info (Lmax, Mmax, 1, &ainfo); } + HealpixFourierTransform(long nSide, long Lmax, long Mmax, int iterate, const std::valarray& weights ) + : realMap(nSide), fourierMap(Lmax, Mmax), ainfo(0), ginfo(0), m_iterate(iterate) + { + sharp_make_weighted_healpix_geom_info (nSide, 1, &weights[0], &ginfo); + sharp_make_triangular_alm_info (Lmax, Mmax, 1, &ainfo); + } + virtual ~HealpixFourierTransform() { sharp_destroy_geom_info(ginfo); @@ -88,8 +97,8 @@ namespace CosmoTool { void *aptr=reinterpret_cast(fourierMap.data()), *mptr=reinterpret_cast(realMap.data()); - sharp_execute (SHARP_MAP2ALM, 0, 0, &aptr, &mptr, ginfo, ainfo, 1, - HealpixJobHelper__::val,0,0,0); + sharp_execute (SHARP_MAP2ALM, 0, &aptr, &mptr, ginfo, ainfo, 1, + HealpixJobHelper__::val,0,0); for (int i = 0; i < m_iterate; i++) { HealpixFourierMap tmp_map(realMap.Nside()); @@ -97,11 +106,11 @@ namespace CosmoTool typename HealpixFourierMap::MapType m0 = tmp_map.eigen(); typename HealpixFourierMap::MapType m1 = realMap.eigen(); - sharp_execute (SHARP_ALM2MAP, 0, 0, &aptr, &tmp_ptr, ginfo, ainfo, 1, - HealpixJobHelper__::val,0,0,0); + sharp_execute (SHARP_ALM2MAP, 0, &aptr, &tmp_ptr, ginfo, ainfo, 1, + HealpixJobHelper__::val,0,0); m0 = m1 - m0; - sharp_execute (SHARP_MAP2ALM, 0, 1, &aptr, &tmp_ptr, ginfo, ainfo, 1, - HealpixJobHelper__::val,0,0,0); + sharp_execute (SHARP_MAP2ALM, 0, &aptr, &tmp_ptr, ginfo, ainfo, 1, + HealpixJobHelper__::val | SHARP_ADD,0,0); } } @@ -109,8 +118,8 @@ namespace CosmoTool { void *aptr=reinterpret_cast(fourierMap.data()), *mptr=reinterpret_cast(realMap.data()); - sharp_execute (SHARP_ALM2MAP, 0, 0, &aptr, &mptr, ginfo, ainfo, 1, - HealpixJobHelper__::val,0,0,0); + sharp_execute (SHARP_ALM2MAP, 0, &aptr, &mptr, ginfo, ainfo, 1, + HealpixJobHelper__::val,0,0); } virtual void analysis_conjugate() diff --git a/external/cosmotool/src/fourier/details/healpix_utility.hpp b/external/cosmotool/src/fourier/details/healpix_utility.hpp index 8803ae9..06f22ab 100644 --- a/external/cosmotool/src/fourier/details/healpix_utility.hpp +++ b/external/cosmotool/src/fourier/details/healpix_utility.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fourier/details/healpix_utility.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fourier/details/healpix_utility.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com @@ -87,7 +87,7 @@ namespace CosmoTool HealpixSpectrum *new_spectrum = new HealpixSpectrum(in_spec.Lmax()); T *out_d = new_spectrum->data(); - std::copy(data, data + min(size,new_spectrum->size()), out_d); + std::copy(data, data + std::min(size,new_spectrum->size()), out_d); return Spectrum_ptr(new_spectrum); } diff --git a/external/cosmotool/src/fourier/euclidian.hpp b/external/cosmotool/src/fourier/euclidian.hpp index efc76e7..2ab4b5e 100644 --- a/external/cosmotool/src/fourier/euclidian.hpp +++ b/external/cosmotool/src/fourier/euclidian.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fourier/euclidian.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fourier/euclidian.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/external/cosmotool/src/fourier/fft/fftw_calls.hpp b/external/cosmotool/src/fourier/fft/fftw_calls.hpp index c811728..d3f2d10 100644 --- a/external/cosmotool/src/fourier/fft/fftw_calls.hpp +++ b/external/cosmotool/src/fourier/fft/fftw_calls.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fourier/fft/fftw_calls.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fourier/fft/fftw_calls.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com @@ -37,6 +37,7 @@ knowledge of the CeCILL license and that you accept its terms. #define __FFTW_UNIFIED_CALLS_HPP #include +#include namespace CosmoTool { @@ -68,6 +69,10 @@ public: \ static void free(void *p) { fftw_free(p); } \ \ static void execute(plan_type p) { prefix ## _execute(p); } \ + static void execute_r2c(plan_type p, real_type *in, complex_type *out) { prefix ## _execute_dft_r2c(p, in, out); } \ + static void execute_c2r(plan_type p, complex_type *in, real_type *out) { prefix ## _execute_dft_c2r(p, in, out); } \ + static void execute_r2c(plan_type p, real_type *in, std::complex *out) { prefix ## _execute_dft_r2c(p, in, (complex_type*)out); } \ + static void execute_c2r(plan_type p, std::complex *in, real_type *out) { prefix ## _execute_dft_c2r(p, (complex_type*) in, out); } \ static plan_type plan_dft_r2c_2d(int Nx, int Ny, \ real_type *in, complex_type *out, \ unsigned flags) \ @@ -88,6 +93,13 @@ public: \ { \ return prefix ## _plan_dft_r2c_3d(Nx, Ny, Nz, in, out, flags); \ } \ + static plan_type plan_dft_c2r_3d(int Nx, int Ny, int Nz, \ + complex_type *in, real_type *out, \ + unsigned flags) \ + { \ + return prefix ## _plan_dft_c2r_3d(Nx, Ny, Nz, in, out, flags); \ + } \ +\ static plan_type plan_dft_r2c(int rank, const int *n, real_type *in, \ complex_type *out, unsigned flags) \ { \ @@ -104,7 +116,7 @@ public: \ FFTW_CALLS_BASE(double, fftw); FFTW_CALLS_BASE(float, fftwf); - +#undef FFTW_CALLS_BASE }; #endif diff --git a/external/cosmotool/src/fourier/healpix.hpp b/external/cosmotool/src/fourier/healpix.hpp index e8b8b2d..1e2cd54 100644 --- a/external/cosmotool/src/fourier/healpix.hpp +++ b/external/cosmotool/src/fourier/healpix.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/fourier/healpix.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/fourier/healpix.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/external/cosmotool/src/growthFactor.cpp b/external/cosmotool/src/growthFactor.cpp index b718d4e..f185e90 100644 --- a/external/cosmotool/src/growthFactor.cpp +++ b/external/cosmotool/src/growthFactor.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/growthFactor.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/growthFactor.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/external/cosmotool/src/growthFactor.hpp b/external/cosmotool/src/growthFactor.hpp index 1a455df..30c2155 100644 --- a/external/cosmotool/src/growthFactor.hpp +++ b/external/cosmotool/src/growthFactor.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/growthFactor.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/growthFactor.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/external/cosmotool/src/h5_readFlash.cpp b/external/cosmotool/src/h5_readFlash.cpp index e460bdb..8e46b89 100644 --- a/external/cosmotool/src/h5_readFlash.cpp +++ b/external/cosmotool/src/h5_readFlash.cpp @@ -1,11 +1,45 @@ /*+ +This is CosmoTool (./src/h5_readFlash.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) + +guilhem.lavaux@gmail.com + +This software is a computer program whose purpose is to provide a toolbox for cosmological +data analysis (e.g. filters, generalized Fourier transforms, power spectra, ...) + +This software is governed by the CeCILL license under French law and +abiding by the rules of distribution of free software. You can use, +modify and/ or redistribute the software under the terms of the CeCILL +license as circulated by CEA, CNRS and INRIA at the following URL +"http://www.cecill.info". + +As a counterpart to the access to the source code and rights to copy, +modify and redistribute granted by the license, users are provided only +with a limited warranty and the software's author, the holder of the +economic rights, and the successive licensors have only limited +liability. + +In this respect, the user's attention is drawn to the risks associated +with loading, using, modifying and/or developing or reproducing the +software by the user in light of its specific status of free software, +that may mean that it is complicated to manipulate, and that also +therefore means that it is reserved for developers and experienced +professionals having in-depth computer knowledge. Users are therefore +encouraged to load and test the software's suitability as regards their +requirements in conditions enabling the security of their systems and/or +data to be ensured and, more generally, to use and operate it in the +same conditions as regards security. + +The fact that you are presently reading this means that you have had +knowledge of the CeCILL license and that you accept its terms. ++*/ +/*+ !! This file has been developped by P. M. Sutter !! -+*/ +*/ /* This file contains the functions that read the data from the HDF5 file * The functions accept the PARAMESH data through arguments. */ @@ -178,7 +212,6 @@ void h5_read_runtime_parameters *numPart = *numPart * *numPart * *numPart; } } - } @@ -193,7 +226,7 @@ void h5_read_flash3_particles (H5File* file, float *vel1, float *vel2, float *vel3, - long *id) + int64_t *id) { herr_t status; @@ -219,7 +252,6 @@ void h5_read_flash3_particles (H5File* file, return; } - /* first determine how many particle properties are present in the input data file, and determine which of these are the properties we are interested in */ @@ -349,7 +381,7 @@ void h5_read_flash3_particles (H5File* file, if (id) { for(p=0; p < (pcount); p++) { - id[p+poffset] = (long) *(partBuffer+iptag-1+p*numProps); + id[p+poffset] = (int64_t) *(partBuffer+iptag-1+p*numProps); } } if (pos1 && pos2 && pos3) { @@ -390,7 +422,6 @@ void h5_read_flash3_particles (H5File* file, //status = H5Tclose(datatype); //status = H5Sclose(dataspace); //status = H5Dclose(dataset); - } diff --git a/external/cosmotool/src/h5_readFlash.hpp b/external/cosmotool/src/h5_readFlash.hpp index c4c8950..e50b2a2 100644 --- a/external/cosmotool/src/h5_readFlash.hpp +++ b/external/cosmotool/src/h5_readFlash.hpp @@ -1,4 +1,38 @@ /*+ +This is CosmoTool (./src/h5_readFlash.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) + +guilhem.lavaux@gmail.com + +This software is a computer program whose purpose is to provide a toolbox for cosmological +data analysis (e.g. filters, generalized Fourier transforms, power spectra, ...) + +This software is governed by the CeCILL license under French law and +abiding by the rules of distribution of free software. You can use, +modify and/ or redistribute the software under the terms of the CeCILL +license as circulated by CEA, CNRS and INRIA at the following URL +"http://www.cecill.info". + +As a counterpart to the access to the source code and rights to copy, +modify and redistribute granted by the license, users are provided only +with a limited warranty and the software's author, the holder of the +economic rights, and the successive licensors have only limited +liability. + +In this respect, the user's attention is drawn to the risks associated +with loading, using, modifying and/or developing or reproducing the +software by the user in light of its specific status of free software, +that may mean that it is complicated to manipulate, and that also +therefore means that it is reserved for developers and experienced +professionals having in-depth computer knowledge. Users are therefore +encouraged to load and test the software's suitability as regards their +requirements in conditions enabling the security of their systems and/or +data to be ensured and, more generally, to use and operate it in the +same conditions as regards security. + +The fact that you are presently reading this means that you have had +knowledge of the CeCILL license and that you accept its terms. ++*/ +/*+ !!! NOTE !!! @@ -6,18 +40,19 @@ This file has been developped by P. M. Sutter. !!!! -+*/ +*/ /* This file contains the functions that read the data from the HDF5 file * The functions accept the PARAMESH data through arguments. */ -#include -#include -#include +#include +#include +//#include #include #include -#include "hdf5_flash.h" #include "H5Cpp.h" +#include "hdf5_flash.h" +#include using namespace H5; @@ -39,7 +74,7 @@ void h5_read_flash3_particles (H5File* file, float *vel1, float *vel2, float *vel3, - long *id); + int64_t *id); void h5_read_flash3_header_info(H5File* file, double* time, /* simulation time */ diff --git a/external/cosmotool/src/hdf5_flash.h b/external/cosmotool/src/hdf5_flash.h index bf53f36..8963802 100644 --- a/external/cosmotool/src/hdf5_flash.h +++ b/external/cosmotool/src/hdf5_flash.h @@ -1,9 +1,36 @@ /*+ -!! +This is CosmoTool (./src/hdf5_flash.h) -- Copyright (C) Guilhem Lavaux (2007-2014) -This particular file has been developped by P. M. Sutter +guilhem.lavaux@gmail.com -!! +This software is a computer program whose purpose is to provide a toolbox for cosmological +data analysis (e.g. filters, generalized Fourier transforms, power spectra, ...) + +This software is governed by the CeCILL license under French law and +abiding by the rules of distribution of free software. You can use, +modify and/ or redistribute the software under the terms of the CeCILL +license as circulated by CEA, CNRS and INRIA at the following URL +"http://www.cecill.info". + +As a counterpart to the access to the source code and rights to copy, +modify and redistribute granted by the license, users are provided only +with a limited warranty and the software's author, the holder of the +economic rights, and the successive licensors have only limited +liability. + +In this respect, the user's attention is drawn to the risks associated +with loading, using, modifying and/or developing or reproducing the +software by the user in light of its specific status of free software, +that may mean that it is complicated to manipulate, and that also +therefore means that it is reserved for developers and experienced +professionals having in-depth computer knowledge. Users are therefore +encouraged to load and test the software's suitability as regards their +requirements in conditions enabling the security of their systems and/or +data to be ensured and, more generally, to use and operate it in the +same conditions as regards security. + +The fact that you are presently reading this means that you have had +knowledge of the CeCILL license and that you accept its terms. +*/ /* general header file for the HDF 5 IO in FLASH */ diff --git a/external/cosmotool/src/interpolate.cpp b/external/cosmotool/src/interpolate.cpp index ec6575c..3de19f5 100644 --- a/external/cosmotool/src/interpolate.cpp +++ b/external/cosmotool/src/interpolate.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/interpolate.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/interpolate.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com @@ -66,7 +66,6 @@ Interpolate::~Interpolate() } double Interpolate::compute(double x) - throw (InvalidRangeException) { double y; @@ -85,7 +84,6 @@ double Interpolate::compute(double x) } double Interpolate::compute(double x) const - throw (InvalidRangeException) { double y; @@ -107,7 +105,6 @@ double Interpolate::compute(double x) const double Interpolate::derivative(double x) - throw (InvalidRangeException) { double y, dy, x0 = x; @@ -199,7 +196,6 @@ Interpolate CosmoTool::buildFromVector(const InterpolatePairs& v) } Interpolate CosmoTool::buildInterpolateFromFile(const char *fname) - throw (NoSuchFileException) { vector allData; ifstream f(fname); @@ -239,7 +235,6 @@ Interpolate CosmoTool::buildInterpolateFromFile(const char *fname) Interpolate CosmoTool::buildInterpolateFromColumns(const char *fname, uint32_t col1, uint32_t col2, bool logx, bool logy) - throw (NoSuchFileException,InvalidRangeException) { vector allData; ifstream f(fname); diff --git a/external/cosmotool/src/interpolate.hpp b/external/cosmotool/src/interpolate.hpp index 2e30e29..e2f14f9 100644 --- a/external/cosmotool/src/interpolate.hpp +++ b/external/cosmotool/src/interpolate.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/interpolate.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/interpolate.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com @@ -54,12 +54,9 @@ namespace CosmoTool bool logx = false, bool logy = false); ~Interpolate(); - double compute(double x) - throw (InvalidRangeException); - double compute(double x) const - throw (InvalidRangeException); - double derivative(double x) - throw (InvalidRangeException); + double compute(double x); + double compute(double x) const; + double derivative(double x); const Interpolate& operator=(const Interpolate& a); @@ -77,10 +74,8 @@ namespace CosmoTool typedef std::vector< std::pair > InterpolatePairs; - Interpolate buildInterpolateFromFile(const char *fname) - throw (NoSuchFileException); - Interpolate buildInterpolateFromColumns(const char *fname, uint32_t col1, uint32_t col2, bool logx = false, bool logy = false) - throw (NoSuchFileException,InvalidRangeException); + Interpolate buildInterpolateFromFile(const char *fname); + Interpolate buildInterpolateFromColumns(const char *fname, uint32_t col1, uint32_t col2, bool logx = false, bool logy = false); Interpolate buildFromVector(const InterpolatePairs& v); diff --git a/external/cosmotool/src/interpolate3d.hpp b/external/cosmotool/src/interpolate3d.hpp index 0f66d02..662fe28 100644 --- a/external/cosmotool/src/interpolate3d.hpp +++ b/external/cosmotool/src/interpolate3d.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/interpolate3d.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/interpolate3d.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com @@ -135,6 +135,12 @@ namespace CosmoTool int Nx, Ny, Nz; }; + + template + void singleInterpolation(IType *input_array, ArrayType *x, ArrayType *y, ArrayType *z, ArrayType *scalers) + { + } + }; #endif diff --git a/external/cosmotool/src/kdtree_leaf.hpp b/external/cosmotool/src/kdtree_leaf.hpp index 0481889..0aa91b3 100644 --- a/external/cosmotool/src/kdtree_leaf.hpp +++ b/external/cosmotool/src/kdtree_leaf.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/kdtree_leaf.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/kdtree_leaf.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/external/cosmotool/src/kdtree_splitters.hpp b/external/cosmotool/src/kdtree_splitters.hpp index c0364a6..d1f00a9 100644 --- a/external/cosmotool/src/kdtree_splitters.hpp +++ b/external/cosmotool/src/kdtree_splitters.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/kdtree_splitters.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/kdtree_splitters.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com @@ -48,17 +48,17 @@ namespace CosmoTool typedef typename KDDef::CoordType ctype; - void check_splitting(KDCell **cells, uint32_t Ncells, int axis, uint32_t split_index, ctype midCoord) + void check_splitting(KDCell **cells, NodeIntType Ncells, int axis, NodeIntType split_index, ctype midCoord) { ctype delta = std::numeric_limits::max(); assert(split_index < Ncells); assert(axis < N); - for (uint32_t i = 0; i < split_index; i++) + for (NodeIntType i = 0; i < split_index; i++) { assert(cells[i]->coord[axis] <= midCoord); delta = min(midCoord-cells[i]->coord[axis], delta); } - for (uint32_t i = split_index+1; i < Ncells; i++) + for (NodeIntType i = split_index+1; i < Ncells; i++) { assert(cells[i]->coord[axis] > midCoord); delta = min(cells[i]->coord[axis]-midCoord, delta); @@ -67,7 +67,7 @@ namespace CosmoTool assert (std::abs(cells[split_index]->coord[axis]-midCoord) <= delta); } - void operator()(KDCell **cells, uint32_t Ncells, uint32_t& split_index, int axis, coords minBound, coords maxBound) + void operator()(KDCell **cells, NodeIntType Ncells, NodeIntType& split_index, int axis, coords minBound, coords maxBound) { if (Ncells == 1) { @@ -76,9 +76,9 @@ namespace CosmoTool } ctype midCoord = 0.5*(maxBound[axis]+minBound[axis]); - uint32_t below = 0, above = Ncells-1; + NodeIntType below = 0, above = Ncells-1; ctype delta_min = std::numeric_limits::max(); - uint32_t idx_min = std::numeric_limits::max(); + NodeIntType idx_min = std::numeric_limits::max(); while (below < above) { diff --git a/external/cosmotool/src/loadFlash.cpp b/external/cosmotool/src/loadFlash.cpp index d437f25..d0c33eb 100644 --- a/external/cosmotool/src/loadFlash.cpp +++ b/external/cosmotool/src/loadFlash.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/loadFlash.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/loadFlash.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com @@ -106,7 +106,7 @@ SimuData *CosmoTool::loadFlashMulti(const char *fname, int id, int loadflags) } } if (loadflags & NEED_GADGET_ID) { - data->Id = new long[data->NumPart]; + data->Id = new int64_t[data->NumPart]; if (data->Id == 0) { delete data; return 0; diff --git a/external/cosmotool/src/loadFlash.hpp b/external/cosmotool/src/loadFlash.hpp index 62f511b..b11498f 100644 --- a/external/cosmotool/src/loadFlash.hpp +++ b/external/cosmotool/src/loadFlash.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/loadFlash.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/loadFlash.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/external/cosmotool/src/loadFlash_dummy.cpp b/external/cosmotool/src/loadFlash_dummy.cpp index 2c6a86c..cc70346 100644 --- a/external/cosmotool/src/loadFlash_dummy.cpp +++ b/external/cosmotool/src/loadFlash_dummy.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/loadFlash_dummy.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/loadFlash_dummy.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/external/cosmotool/src/loadGadget.cpp b/external/cosmotool/src/loadGadget.cpp index 171e7d8..0a5a0f0 100644 --- a/external/cosmotool/src/loadGadget.cpp +++ b/external/cosmotool/src/loadGadget.cpp @@ -146,14 +146,14 @@ SimuData *CosmoTool::loadGadgetMulti(const char *fname, int id, if (GadgetFormat == 2) { int64_t startBlock = 0; char block[5]; - int32_t blocksize; + uint32_t blocksize; try { while (true) { f->beginCheckpoint(); f->readOrderedBuffer(block, 4); block[4] = 0; - blocksize = f->readInt32(); + blocksize = f->readUint32(); f->endCheckpoint(); blockTable[block].position = f->position(); blockTable[block].size = blocksize; @@ -172,9 +172,9 @@ SimuData *CosmoTool::loadGadgetMulti(const char *fname, int id, ssize_t NumPart = 0, NumPartTotal = 0; #define ENSURE2(name,out_sz) { \ + int64_t sz; \ if (GadgetFormat == 2) { \ BlockMap::iterator iter = blockTable.find(name); \ - int64_t sz; \ if (iter == blockTable.end()) { \ std::cerr << "GADGET2: Cannot find block named '" << name << "'" << endl; \ if (data) delete data; \ @@ -184,7 +184,14 @@ SimuData *CosmoTool::loadGadgetMulti(const char *fname, int id, f->seek(iter->second.position); \ sz = iter->second.size; \ out_sz = sz;\ + } else if (GadgetFormat==1) { \ + int64_t oldpos = f->position(); \ + f->beginCheckpoint(); \ + out_sz = f->getBlockSize(); \ + f->endCheckpoint(true); \ + f->seek(oldpos); \ } \ +\ } #define ENSURE(name) ENSURE2(name,sz); @@ -241,7 +248,7 @@ SimuData *CosmoTool::loadGadgetMulti(const char *fname, int id, try { ENSURE("POS "); - f->beginCheckpoint(); + f->beginCheckpoint(true); // Use more memory but faster I/O if (f->getBlockSize() != NumPart*float_size*3) { // Check that single would work if (f->getBlockSize() == NumPart*sizeof(float)*3) { @@ -292,7 +299,7 @@ SimuData *CosmoTool::loadGadgetMulti(const char *fname, int id, try { ENSURE("VEL "); - f->beginCheckpoint(); + f->beginCheckpoint(true); for(int k = 0, p = 0; k < 6; k++) { for(int n = 0; n < h.npart[k]; n++) { // THIS IS GADGET 1 @@ -336,8 +343,8 @@ SimuData *CosmoTool::loadGadgetMulti(const char *fname, int id, throw InvalidUnformattedAccess(); } - f->beginCheckpoint(); - data->Id = new long[data->NumPart]; + f->beginCheckpoint(true); + data->Id = new int64_t[data->NumPart]; if (data->Id == 0) { delete f; @@ -395,7 +402,7 @@ SimuData *CosmoTool::loadGadgetMulti(const char *fname, int id, } else { for(int n = 0; n < h.npart[k]; n++) { - if ((n%1000000)==0) cout << n << endl; +// if ((n%1000000)==0) cout << n << endl; data->Mass[l++] = h.mass[k]; } } diff --git a/external/cosmotool/src/loadRamses.cpp b/external/cosmotool/src/loadRamses.cpp index 3eb909c..0c628f8 100644 --- a/external/cosmotool/src/loadRamses.cpp +++ b/external/cosmotool/src/loadRamses.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/loadRamses.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/loadRamses.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com @@ -34,7 +34,7 @@ knowledge of the CeCILL license and that you accept its terms. +*/ #include -#include +#include "/usr/include/regex.h" #include #include #include @@ -252,7 +252,7 @@ int readInfoFile(const char *basename, int outputId, InfoData& info) const char *pattern = "^([A-Za-z_]+)[ ]*=[ ]*([0-9\\.E+\\-]+)"; err = regcomp (&unit_l_rx, pattern, REG_EXTENDED); - cout << unit_l_rx.re_nsub << endl; +// cout << unit_l_rx.re_nsub << endl; if (err) { char errString[255]; @@ -309,7 +309,7 @@ CosmoTool::SimuData *CosmoTool::loadRamsesSimu(const char *basename, int outputI double hubble = info.aexp*info.aexp/info.unit_t / (1e5/CM_IN_MPC); double L0 = info.boxSize*info.unitLength*hubble/100/CM_IN_MPC/info.aexp; - double unit_vel = L0*hubble/info.aexp; + double unit_vel = L0*100/info.aexp; while (1) { @@ -417,9 +417,12 @@ CosmoTool::SimuData *CosmoTool::loadRamsesSimu(const char *basename, int outputI data->Vel[1] = new float[nPar]; data->Vel[2] = new float[nPar]; } + if (flags & NEED_MASS) { + data->Mass = new float[nPar]; + } if (flags & NEED_GADGET_ID) { - data->Id = new long[nPar]; + data->Id = new int64_t[nPar]; } for (int k = 0; k < 3; k++) @@ -455,9 +458,10 @@ CosmoTool::SimuData *CosmoTool::loadRamsesSimu(const char *basename, int outputI float minMass = INFINITY; infile.beginCheckpoint(); - for (uint32_t i = nPar; i > 0; i--) - { + for (uint32_t i = 0; i < nPar; i++) { float dummyF = dp ? infile.readReal64() : infile.readReal32(); + if (flags & NEED_MASS) + data->Mass[i] = dummyF; if (dummyF < minMass) minMass = dummyF; } infile.endCheckpoint(); @@ -477,7 +481,7 @@ CosmoTool::SimuData *CosmoTool::loadRamsesSimu(const char *basename, int outputI } catch (const NoSuchFileException& e) { - cerr << "No such file " << fname << endl; +// cerr << "No such file " << fname << endl; delete data; return 0; } diff --git a/external/cosmotool/src/loadRamses.hpp b/external/cosmotool/src/loadRamses.hpp index 5282a3c..5834c29 100644 --- a/external/cosmotool/src/loadRamses.hpp +++ b/external/cosmotool/src/loadRamses.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/loadRamses.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/loadRamses.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/external/cosmotool/src/loadSimu.hpp b/external/cosmotool/src/loadSimu.hpp index 2eb5ac8..bb1ddba 100644 --- a/external/cosmotool/src/loadSimu.hpp +++ b/external/cosmotool/src/loadSimu.hpp @@ -78,7 +78,7 @@ namespace CosmoTool ssize_t NumPart; ssize_t TotalNumPart; - long *Id; + int64_t *Id; float *Pos[3]; float *Vel[3]; float *Mass; diff --git a/external/cosmotool/src/load_data.cpp b/external/cosmotool/src/load_data.cpp index f23f909..da7ca28 100644 --- a/external/cosmotool/src/load_data.cpp +++ b/external/cosmotool/src/load_data.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/load_data.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/load_data.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com @@ -41,7 +41,7 @@ knowledge of the CeCILL license and that you accept its terms. using namespace CosmoTool; //#define LARGE_CONTROL -#define LITTLE_ENDIAN +//#define LITTLE_ENDIAN #define NEW(t,n) ((t *)malloc(sizeof(t)*n)) #define SKIP(f) fread(&dummy,sizeof(dummy),1,f); diff --git a/external/cosmotool/src/mach.hpp b/external/cosmotool/src/mach.hpp index 6bea525..9ef1942 100644 --- a/external/cosmotool/src/mach.hpp +++ b/external/cosmotool/src/mach.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/mach.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/mach.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/external/cosmotool/src/miniargs.cpp b/external/cosmotool/src/miniargs.cpp index 7c23230..c994e7e 100644 --- a/external/cosmotool/src/miniargs.cpp +++ b/external/cosmotool/src/miniargs.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/miniargs.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/miniargs.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/external/cosmotool/src/miniargs.hpp b/external/cosmotool/src/miniargs.hpp index 9f04b58..1157783 100644 --- a/external/cosmotool/src/miniargs.hpp +++ b/external/cosmotool/src/miniargs.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/miniargs.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/miniargs.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/external/cosmotool/src/mykdtree.hpp b/external/cosmotool/src/mykdtree.hpp index bf1eaa0..1b36eea 100644 --- a/external/cosmotool/src/mykdtree.hpp +++ b/external/cosmotool/src/mykdtree.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/mykdtree.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/mykdtree.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com @@ -40,8 +40,14 @@ knowledge of the CeCILL license and that you accept its terms. #include "config.hpp" #include "bqueue.hpp" +#ifndef __KD_TREE_ACTIVE_CELLS +#define __KD_TREE_ACTIVE_CELLS 1 +#endif + namespace CosmoTool { + typedef uint64_t NodeIntType; + template struct KDDef { @@ -52,7 +58,9 @@ namespace CosmoTool { template struct KDCell { +#if __KD_TREE_ACTIVE_CELLS == 1 bool active; +#endif ValType val; typename KDDef::KDCoordinates coord; }; @@ -78,7 +86,7 @@ namespace CosmoTool { KDTreeNode *children[2]; typename KDDef::KDCoordinates minBound, maxBound; #ifdef __KD_TREE_NUMNODES - uint32_t numNodes; + NodeIntType numNodes; #endif }; @@ -116,7 +124,7 @@ namespace CosmoTool { template struct KD_default_cell_splitter { - void operator()(KDCell **cells, uint32_t Ncells, uint32_t& split_index, int axis, typename KDDef::KDCoordinates minBound, typename KDDef::KDCoordinates maxBound); + void operator()(KDCell **cells, NodeIntType Ncells, NodeIntType& split_index, int axis, typename KDDef::KDCoordinates minBound, typename KDDef::KDCoordinates maxBound); }; template > @@ -130,7 +138,7 @@ namespace CosmoTool { CellSplitter splitter; - KDTree(Cell *cells, uint32_t Ncells); + KDTree(Cell *cells, NodeIntType Ncells); ~KDTree(); void setPeriodic(bool on, CoordType replicate) @@ -147,13 +155,11 @@ namespace CosmoTool { uint32_t getIntersection(const coords& x, CoordType r, Cell **cells, - uint32_t numCells) - throw (NotEnoughCells); + uint32_t numCells); uint32_t getIntersection(const coords& x, CoordType r, Cell **cells, CoordType *distances, - uint32_t numCells) - throw (NotEnoughCells); + uint32_t numCells); uint32_t countCells(const coords& x, CoordType r); Cell *getNearestNeighbour(const coords& x); @@ -169,14 +175,14 @@ namespace CosmoTool { void optimize(); Node *getAllNodes() { return nodes; } - uint32_t getNumNodes() const { return lastNode; } + NodeIntType getNumNodes() const { return lastNode; } - uint32_t countActives() const; + NodeIntType countActives() const; #ifdef __KD_TREE_NUMNODES - uint32_t getNumberInNode(const Node *n) const { return n->numNodes; } + NodeIntType getNumberInNode(const Node *n) const { return n->numNodes; } #else - uint32_t getNumberInNode(const Node *n) const { + NodeIntType getNumberInNode(const Node *n) const { if (n == 0) return 0; return 1+getNumberInNode(n->children[0])+getNumberInNode(n->children[1]); @@ -184,15 +190,14 @@ namespace CosmoTool { #endif #ifdef __KD_TREE_SAVE_ON_DISK - KDTree(std::istream& i, Cell *cells, uint32_t Ncells) - throw (InvalidOnDiskKDTree); + KDTree(std::istream& i, Cell *cells, NodeIntType Ncells); void saveTree(std::ostream& o) const; #endif protected: Node *nodes; - uint32_t numNodes; - uint32_t lastNode; + NodeIntType numNodes; + NodeIntType lastNode; Node *root; Cell **sortingHelper; @@ -202,7 +207,7 @@ namespace CosmoTool { coords replicate; Node *buildTree(Cell **cell0, - uint32_t NumCells, + NodeIntType NumCells, uint32_t depth, coords minBound, coords maxBound); @@ -210,8 +215,7 @@ namespace CosmoTool { template void recursiveIntersectionCells(RecursionInfoCells& info, Node *node, - int level) - throw (NotEnoughCells); + int level); CoordType computeDistance(const Cell *cell, const coords& x) const; void recursiveNearest(Node *node, @@ -225,7 +229,7 @@ namespace CosmoTool { }; template - uint32_t gatherActiveCells(KDCell **cells, uint32_t numCells); + NodeIntType gatherActiveCells(KDCell **cells, NodeIntType numCells); }; diff --git a/external/cosmotool/src/mykdtree.tcc b/external/cosmotool/src/mykdtree.tcc index e276cad..d937b23 100644 --- a/external/cosmotool/src/mykdtree.tcc +++ b/external/cosmotool/src/mykdtree.tcc @@ -1,5 +1,6 @@ #include "replicateGenerator.hpp" #include +#include "omptl/omptl_algorithm" #include #include #include @@ -30,7 +31,7 @@ namespace CosmoTool { } template - KDTree::KDTree(Cell *cells, uint32_t Ncells) + KDTree::KDTree(Cell *cells, NodeIntType Ncells) { periodic = false; @@ -39,7 +40,7 @@ namespace CosmoTool { nodes = new Node[numNodes]; sortingHelper = new Cell *[Ncells]; - for (uint32_t i = 0; i < Ncells; i++) + for (NodeIntType i = 0; i < Ncells; i++) sortingHelper[i] = &cells[i]; optimize(); @@ -51,7 +52,7 @@ namespace CosmoTool { coords absoluteMin, absoluteMax; std::cout << "Optimizing the tree..." << std::endl; - uint32_t activeCells = gatherActiveCells(sortingHelper, numNodes); + NodeIntType activeCells = gatherActiveCells(sortingHelper, numNodes); std::cout << " number of active cells = " << activeCells << std::endl; lastNode = 0; @@ -61,7 +62,7 @@ namespace CosmoTool { absoluteMax[i] = -std::numeric_limits::max(); } // Find min and max corner - for (uint32_t i = 0; i < activeCells; i++) + for (NodeIntType i = 0; i < activeCells; i++) { KDCell *cell = sortingHelper[i]; @@ -82,7 +83,6 @@ namespace CosmoTool { uint32_t KDTree::getIntersection(const coords& x, CoordType r, KDTree::Cell **cells, uint32_t numCells) - throw (NotEnoughCells) { RecursionInfoCells info; @@ -116,7 +116,6 @@ namespace CosmoTool { Cell **cells, CoordType *distances, uint32_t numCells) - throw (NotEnoughCells) { RecursionInfoCells info; @@ -179,12 +178,13 @@ namespace CosmoTool { void KDTree::recursiveIntersectionCells(RecursionInfoCells& info, Node *node, int level) - throw (NotEnoughCells) { int axis = level % N; CoordType d2 = 0; +#if __KD_TREE_ACTIVE_CELLS == 1 if (node->value->active) +#endif { for (int j = 0; j < 3; j++) { @@ -223,12 +223,13 @@ namespace CosmoTool { } template - uint32_t gatherActiveCells(KDCell **cells, - uint32_t Ncells) + NodeIntType gatherActiveCells(KDCell **cells, + NodeIntType Ncells) { - uint32_t swapId = Ncells-1; - uint32_t i = 0; + NodeIntType swapId = Ncells-1; + NodeIntType i = 0; +#if __KD_TREE_ACTIVE_CELLS == 1 while (!cells[swapId]->active && swapId > 0) swapId--; @@ -244,21 +245,25 @@ namespace CosmoTool { } i++; } +#endif return swapId+1; } template - void KD_default_cell_splitter::operator()(KDCell **cells, uint32_t Ncells, uint32_t& split_index, int axis, typename KDDef::KDCoordinates minBound, typename KDDef::KDCoordinates maxBound) + void KD_default_cell_splitter::operator()(KDCell **cells, NodeIntType Ncells, + NodeIntType& split_index, int axis, + typename KDDef::KDCoordinates minBound, + typename KDDef::KDCoordinates maxBound) { CellCompare compare(axis); - std::sort(cells, cells+Ncells, compare); + omptl::sort(cells,cells+Ncells,compare); // std::sort(cells, cells+Ncells, compare); split_index = Ncells/2; } template KDTreeNode *KDTree::buildTree(Cell **cell0, - uint32_t Ncells, + NodeIntType Ncells, uint32_t depth, coords minBound, coords maxBound) @@ -266,10 +271,16 @@ namespace CosmoTool { if (Ncells == 0) return 0; + Node *node; int axis = depth % N; - Node *node = &nodes[lastNode++]; - uint32_t mid; + NodeIntType mid; coords tmpBound; + NodeIntType nodeId; + +#pragma omp atomic capture + nodeId = (this->lastNode)++; + + node = &nodes[nodeId]; // Isolate the environment splitter(cell0, Ncells, mid, axis, minBound, maxBound); @@ -282,12 +293,20 @@ namespace CosmoTool { tmpBound[axis] = node->value->coord[axis]; depth++; - node->children[0] = buildTree(cell0, mid, depth, minBound, tmpBound); +#pragma omp task private(tmpBound) + { + node->children[0] = buildTree(cell0, mid, depth, minBound, tmpBound); + } memcpy(tmpBound, minBound, sizeof(coords)); tmpBound[axis] = node->value->coord[axis]; - node->children[1] = buildTree(cell0+mid+1, Ncells-mid-1, depth, +#pragma omp task private(tmpBound) + { + node->children[1] = buildTree(cell0+mid+1, Ncells-mid-1, depth, tmpBound, maxBound); + } + +#pragma omp taskwait #ifdef __KD_TREE_NUMNODES node->numNodes = (node->children[0] != 0) ? node->children[0]->numNodes : 0; @@ -299,12 +318,14 @@ namespace CosmoTool { } template - uint32_t KDTree::countActives() const + NodeIntType KDTree::countActives() const { - uint32_t numActive = 0; - for (uint32_t i = 0; i < lastNode; i++) + NodeIntType numActive = 0; + for (NodeIntType i = 0; i < lastNode; i++) { +#if __KD_TREE_ACTIVE_CELLS == 1 if (nodes[i].value->active) +#endif numActive++; } return numActive; @@ -586,8 +607,7 @@ namespace CosmoTool { } template - KDTree::KDTree(std::istream& in, Cell *cells, uint32_t Ncells) - throw (InvalidOnDiskKDTree) + KDTree::KDTree(std::istream& in, Cell *cells, NodeIntType Ncells) { KDTreeHeader h; @@ -665,7 +685,7 @@ namespace CosmoTool { root = &nodes[h.rootId]; sortingHelper = new Cell *[Ncells]; - for (uint32_t i = 0; i < Ncells; i++) + for (NodeIntType i = 0; i < Ncells; i++) sortingHelper[i] = &cells[i]; } #endif diff --git a/external/cosmotool/src/newton.hpp b/external/cosmotool/src/newton.hpp index d3975fe..3cb82ae 100644 --- a/external/cosmotool/src/newton.hpp +++ b/external/cosmotool/src/newton.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/newton.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/newton.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/external/cosmotool/src/octTree.cpp b/external/cosmotool/src/octTree.cpp deleted file mode 100644 index 2c76609..0000000 --- a/external/cosmotool/src/octTree.cpp +++ /dev/null @@ -1,210 +0,0 @@ -/*+ -This is CosmoTool (./src/octTree.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) - -guilhem.lavaux@gmail.com - -This software is a computer program whose purpose is to provide a toolbox for cosmological -data analysis (e.g. filters, generalized Fourier transforms, power spectra, ...) - -This software is governed by the CeCILL license under French law and -abiding by the rules of distribution of free software. You can use, -modify and/ or redistribute the software under the terms of the CeCILL -license as circulated by CEA, CNRS and INRIA at the following URL -"http://www.cecill.info". - -As a counterpart to the access to the source code and rights to copy, -modify and redistribute granted by the license, users are provided only -with a limited warranty and the software's author, the holder of the -economic rights, and the successive licensors have only limited -liability. - -In this respect, the user's attention is drawn to the risks associated -with loading, using, modifying and/or developing or reproducing the -software by the user in light of its specific status of free software, -that may mean that it is complicated to manipulate, and that also -therefore means that it is reserved for developers and experienced -professionals having in-depth computer knowledge. Users are therefore -encouraged to load and test the software's suitability as regards their -requirements in conditions enabling the security of their systems and/or -data to be ensured and, more generally, to use and operate it in the -same conditions as regards security. - -The fact that you are presently reading this means that you have had -knowledge of the CeCILL license and that you accept its terms. -+*/ - -#include -#include -#include -#include "config.hpp" -#include "octTree.hpp" - -using namespace std; -using namespace CosmoTool; - -//#define VERBOSE - -static uint32_t mypow(uint32_t i, uint32_t p) -{ - if (p == 0) - return 1; - else if (p == 1) - return i; - - uint32_t k = p/2; - uint32_t j = mypow(i, k); - if (2*k==p) - return j*j; - else - return j*j*i; -} - -OctTree::OctTree(const FCoordinates *particles, octPtr numParticles, - uint32_t maxMeanTreeDepth, uint32_t maxAbsoluteDepth, - uint32_t threshold) -{ - cout << "MeanTree=" << maxMeanTreeDepth << endl; - numCells = mypow(8, maxMeanTreeDepth); - assert(numCells < invalidOctCell); - //#ifdef VERBOSE - cerr << "Allocating " << numCells << " octtree cells" << endl; - //#endif - - for (int j = 0; j < 3; j++) - xMin[j] = particles[0][j]; - - for (octPtr i = 1; i < numParticles; i++) - { - for (int j = 0; j < 3; j++) - { - if (particles[i][j] < xMin[j]) - xMin[j] = particles[i][j]; - } - } - - lenNorm = 0; - for (octPtr i = 0; i < numParticles; i++) - { - for (int j = 0; j < 3; j++) - { - float delta = particles[i][j]-xMin[j]; - if (delta > lenNorm) - lenNorm = delta; - } - } - cout << xMin[0] << " " << xMin[1] << " " << xMin[2] << " lNorm=" << lenNorm << endl; - - cells = new OctCell[numCells]; - Lbox = (float)(octCoordTypeNorm+1); - - cells[0].numberLeaves = 0; - for (int i = 0; i < 8; i++) - cells[0].children[i] = emptyOctCell; - - lastNode = 1; - this->particles = particles; - this->numParticles = numParticles; - buildTree(maxAbsoluteDepth); - //#ifdef VERBOSE - cerr << "Used " << lastNode << " cells" << endl; - //#endif -} - -OctTree::~OctTree() -{ - delete cells; -} - -void OctTree::buildTree(uint32_t maxAbsoluteDepth) -{ - for (octPtr i = 0; i < numParticles; i++) - { - OctCoords rootCenter = { octCoordCenter, octCoordCenter, octCoordCenter }; - insertParticle(0, // root node - rootCenter, - octCoordCenter, - i, - maxAbsoluteDepth); - } -} - - -void OctTree::insertParticle(octPtr node, - const OctCoords& icoord, - octCoordType halfNodeLength, - octPtr particleId, - uint32_t maxAbsoluteDepth) -{ - -#ifdef VERBOSE - cout << "Entering " << node << " (" << icoord[0] << "," << icoord[1] << "," << icoord[2] << ")" << endl; -#endif - int octPos = 0; - int ipos[3] = { 0,0,0}; - octPtr newNode; - OctCoords newCoord; - - cells[node].numberLeaves++; - if (maxAbsoluteDepth == 0) - { - // All children must be invalid. - for (int i = 0 ; i < 8; i++) - cells[node].children[i] = invalidOctCell; - - return; - } - - for (int j = 0; j < 3; j++) - { - float treePos = (particles[particleId][j]-xMin[j])*Lbox/lenNorm; - if ((octPtr)(treePos) > icoord[j]) - { - octPos |= (1 << j); - ipos[j] = 1; - } - } - - if (cells[node].children[octPos] == emptyOctCell) - { - // Put the particle there. - cells[node].children[octPos] = particleId | octParticleMarker; - return; - } - - // If it is a node, explores it. - if (!(cells[node].children[octPos] & octParticleMarker)) - { - assert(halfNodeLength >= 2); - // Compute coordinates - for (int j = 0; j < 3; j++) - newCoord[j] = icoord[j]+(2*ipos[j]-1)*halfNodeLength/2; - insertParticle(cells[node].children[octPos], newCoord, halfNodeLength/2, - particleId, maxAbsoluteDepth-1); - return; - } - - // We have a particle there. - // Make a new node and insert the old particle into this node. - // Insert the new particle into the node also - // Finally put the node in place - - newNode = lastNode++; - assert(lastNode != numCells); - - for (int j = 0; j < 8; j++) - cells[newNode].children[j] = emptyOctCell; - cells[newNode].numberLeaves = 0; - - // Compute coordinates - for (int j = 0; j < 3; j++) - newCoord[j] = icoord[j]+(2*ipos[j]-1)*halfNodeLength/2; - - octPtr oldPartId = cells[node].children[octPos] & octParticleMask; - - insertParticle(newNode, newCoord, halfNodeLength/2, - oldPartId, maxAbsoluteDepth-1); - insertParticle(newNode, newCoord, halfNodeLength/2, - particleId, maxAbsoluteDepth-1); - cells[node].children[octPos] = newNode; -} - diff --git a/external/cosmotool/src/octTree.hpp b/external/cosmotool/src/octTree.hpp index 425d8fd..87d7dfa 100644 --- a/external/cosmotool/src/octTree.hpp +++ b/external/cosmotool/src/octTree.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/octTree.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/octTree.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com @@ -55,12 +55,20 @@ namespace CosmoTool typedef octCoordType OctCoords[3]; + template struct OctCell { octPtr numberLeaves; octPtr children[8]; + T data; }; + template + struct OctTree_defaultUpdater { + void operator()(T& d) { } + }; + + template, class T = void> class OctTree { public: @@ -103,9 +111,10 @@ namespace CosmoTool protected: + T_dataUpdater updater; const FCoordinates *particles; octPtr numParticles; - OctCell *cells; + OctCell *cells; float Lbox; octPtr lastNode; octPtr numCells; @@ -128,47 +137,47 @@ namespace CosmoTool FCoordinates center, realCenter; for (int j = 0; j < 3; j++) - { - center[j] = icoord[j]/(2.*octCoordCenter); - realCenter[j] = xMin[j] + center[j]*lenNorm; - } + { + center[j] = icoord[j]/(2.*octCoordCenter); + realCenter[j] = xMin[j] + center[j]*lenNorm; + } f(realCenter, cells[node].numberLeaves, lenNorm*halfNodeLength/(float)octCoordCenter, - cells[node].children[0] == invalidOctCell, // True if this is a meta-node - false); + cells[node].children[0] == invalidOctCell, // True if this is a meta-node + false); if (!condition(realCenter, cells[node].numberLeaves, lenNorm*halfNodeLength/(float)octCoordCenter, cells[node].children[0] == invalidOctCell)) - return; + return; for (int i = 0; i < 8; i++) - { - octPtr newNode = cells[node].children[i]; - int ipos[3] = { (i&1), (i&2)>>1, (i&4)>>2 }; - - if (newNode == emptyOctCell || newNode == invalidOctCell) - continue; - - for (int j = 0; j < 3; j++) - newCoord[j] = icoord[j]+(2*ipos[j]-1)*halfNodeLength/2; - - if (newNode & octParticleMarker) - { - for (int j = 0; j < 3; j++) - { - center[j] = newCoord[j]/(2.*octCoordCenter); - realCenter[j] = xMin[j] + lenNorm*center[j]; - } + { + octPtr newNode = cells[node].children[i]; + int ipos[3] = { (i&1), (i&2)>>1, (i&4)>>2 }; + + if (newNode == emptyOctCell || newNode == invalidOctCell) + continue; + + for (int j = 0; j < 3; j++) + newCoord[j] = icoord[j]+(2*ipos[j]-1)*halfNodeLength/2; + + if (newNode & octParticleMarker) + { + for (int j = 0; j < 3; j++) + { + center[j] = newCoord[j]/(2.*octCoordCenter); + realCenter[j] = xMin[j] + lenNorm*center[j]; + } - f(realCenter, - 1, lenNorm*halfNodeLength/(2.*octCoordCenter), - false, true); - continue; - } + f(realCenter, + 1, lenNorm*halfNodeLength/(2.*octCoordCenter), + false, true); + continue; + } - walkTreeElements(f, condition, cells[node].children[i], newCoord, halfNodeLength/2); - } + walkTreeElements(f, condition, cells[node].children[i], newCoord, halfNodeLength/2); + } } @@ -177,4 +186,6 @@ namespace CosmoTool }; +#include "octTree.tcc" + #endif diff --git a/external/cosmotool/src/pool.hpp b/external/cosmotool/src/pool.hpp index b3e2637..d536275 100644 --- a/external/cosmotool/src/pool.hpp +++ b/external/cosmotool/src/pool.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/pool.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/pool.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/external/cosmotool/src/powerSpectrum.cpp b/external/cosmotool/src/powerSpectrum.cpp index b2a34be..777654c 100644 --- a/external/cosmotool/src/powerSpectrum.cpp +++ b/external/cosmotool/src/powerSpectrum.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/powerSpectrum.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/powerSpectrum.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/external/cosmotool/src/powerSpectrum.hpp b/external/cosmotool/src/powerSpectrum.hpp index d4c6761..efed489 100644 --- a/external/cosmotool/src/powerSpectrum.hpp +++ b/external/cosmotool/src/powerSpectrum.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/powerSpectrum.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/powerSpectrum.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/external/cosmotool/src/replicateGenerator.hpp b/external/cosmotool/src/replicateGenerator.hpp index 4d89050..44d5953 100644 --- a/external/cosmotool/src/replicateGenerator.hpp +++ b/external/cosmotool/src/replicateGenerator.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/replicateGenerator.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/replicateGenerator.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/external/cosmotool/src/sparseGrid.hpp b/external/cosmotool/src/sparseGrid.hpp index 516be9d..1b665d0 100644 --- a/external/cosmotool/src/sparseGrid.hpp +++ b/external/cosmotool/src/sparseGrid.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/sparseGrid.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/sparseGrid.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com diff --git a/external/cosmotool/src/sphSmooth.hpp b/external/cosmotool/src/sphSmooth.hpp index f6fe582..c364621 100644 --- a/external/cosmotool/src/sphSmooth.hpp +++ b/external/cosmotool/src/sphSmooth.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/sphSmooth.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/sphSmooth.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com @@ -35,7 +35,7 @@ knowledge of the CeCILL license and that you accept its terms. #ifndef __COSMOTOOL_SPH_SMOOTH_HPP #define __COSMOTOOL_SPH_SMOOTH_HPP - +#include #include "config.hpp" #include "mykdtree.hpp" @@ -60,37 +60,54 @@ namespace CosmoTool typedef void (*runParticleValue)(ValType& t); public: + typedef SPHCell *P_SPHCell; + struct SPHState + { + boost::shared_ptr ngb; + boost::shared_ptr distances; + typename SPHTree::coords currentCenter; + int currentNgb; + ComputePrecision smoothRadius; + }; + + SPHSmooth(SPHTree *tree, uint32_t Nsph); virtual ~SPHSmooth(); - void fetchNeighbours(const typename SPHTree::coords& c); + void fetchNeighbours(const typename SPHTree::coords& c, SPHState *state = 0); + void fetchNeighbours(const typename SPHTree::coords& c, uint32_t newNsph); void fetchNeighboursOnVolume(const typename SPHTree::coords& c, ComputePrecision radius); const typename SPHTree::coords& getCurrentCenter() const { - return currentCenter; + return internal.currentCenter; } + template ComputePrecision computeSmoothedValue(const typename SPHTree::coords& c, - computeParticleValue fun); + FuncT fun, SPHState *state = 0); + + template ComputePrecision computeInterpolatedValue(const typename SPHTree::coords& c, - computeParticleValue fun); + FuncT fun, SPHState *state = 0); + ComputePrecision getMaxDistance(const typename SPHTree::coords& c, SPHNode *node) const; ComputePrecision getSmoothingLen() const { - return smoothRadius; + return internal.smoothRadius; } // TO USE WITH EXTREME CARE ! void setSmoothingLen(ComputePrecision len) { - smoothRadius = len; + internal.smoothRadius = len; } // END - void runForEachNeighbour(runParticleValue fun); + template + void runForEachNeighbour(FuncT fun, SPHState *state = 0); void addGridSite(const typename SPHTree::coords& c); bool hasNeighbours() const; @@ -100,34 +117,31 @@ namespace CosmoTool SPHTree *getTree() { return tree; } void changeNgb(uint32_t newMax) { - delete[] ngb; - delete[] distances; - ngb = new SPHCell *[newMax]; - distances = new CoordType[newMax]; + internal.ngb = boost::shared_ptr(new SPHCell *[newMax]); + internal.distances = boost::shared_ptr(new CoordType[newMax]); maxNgb = newMax; } - uint32_t getCurrent() const { return currentNgb; } + uint32_t getCurrent() const { return internal.currentNgb; } uint32_t getNgb() const { return maxNgb; } protected: - SPHCell **ngb; - CoordType *distances; + SPHState internal; uint32_t Nsph; uint32_t deltaNsph; uint32_t maxNgb; - uint32_t currentNgb; SPHTree *tree; - ComputePrecision smoothRadius; - typename SPHTree::coords currentCenter; + template ComputePrecision computeWValue(const typename SPHTree::coords & c, SPHCell& cell, CoordType d, - computeParticleValue fun); + FuncT fun, SPHState *state); + + template void runUnrollNode(SPHNode *node, - runParticleValue fun); + FuncT fun); }; template diff --git a/external/cosmotool/src/sphSmooth.tcc b/external/cosmotool/src/sphSmooth.tcc index 0cf7de8..45a3c29 100644 --- a/external/cosmotool/src/sphSmooth.tcc +++ b/external/cosmotool/src/sphSmooth.tcc @@ -1,4 +1,5 @@ #include +#include "algo.hpp" namespace CosmoTool { @@ -7,29 +8,28 @@ SPHSmooth::SPHSmooth(SPHTree *tree, uint32_t Nsph) { this->Nsph = Nsph; this->tree = tree; - this->currentNgb = 0; + internal.currentNgb = 0; this->maxNgb = Nsph; - ngb = new SPHCell *[maxNgb]; - distances = new CoordType[maxNgb]; + internal.ngb = boost::shared_ptr(new SPHCell *[maxNgb]); + internal.distances = boost::shared_ptr(new CoordType[maxNgb]); } template SPHSmooth::~SPHSmooth() { - delete[] ngb; - delete[] distances; } template +template ComputePrecision SPHSmooth::computeWValue(const typename SPHTree::coords& c, SPHCell& cell, CoordType d, - computeParticleValue fun) + FuncT fun, SPHState *state) { CoordType weight; - d /= smoothRadius; + d /= state->smoothRadius; weight = getKernel(d); if (cell.val.weight != 0) @@ -47,86 +47,92 @@ SPHSmooth::fetchNeighbours(const typename SPHTree::coords& c, uin if (requested > maxNgb) { - delete[] ngb; - delete[] distances; - maxNgb = requested; - ngb = new SPHCell *[maxNgb]; - distances = new CoordType[maxNgb]; + internal.ngb = boost::shared_ptr(new P_SPHCell[maxNgb]); + internal.distances = boost::shared_ptr(new CoordType[maxNgb]); } - memcpy(currentCenter, c, sizeof(c)); - tree->getNearestNeighbours(c, requested, ngb, distances); + memcpy(internal.currentCenter, c, sizeof(c)); + tree->getNearestNeighbours(c, requested, (SPHCell **)internal.ngb.get(), (CoordType*)internal.distances.get()); - currentNgb = 0; - for (uint32_t i = 0; i < requested && ngb[i] != 0; i++,currentNgb++) + internal.currentNgb = 0; + for (uint32_t i = 0; i < requested && (internal.ngb)[i] != 0; i++,internal.currentNgb++) { - distances[i] = sqrt(distances[i]); - d2 = distances[i]; + internal.distances[i] = sqrt(internal.distances[i]); + d2 = internal.distances[i]; if (d2 > max_dist) max_dist = d2; } - smoothRadius = max_dist / 2; + internal.smoothRadius = max_dist / 2; } template -void -SPHSmooth::fetchNeighbours(const typename SPHTree::coords& c) +void SPHSmooth::fetchNeighbours(const typename SPHTree::coords& c, SPHState *state) { ComputePrecision d2, max_dist = 0; uint32_t requested = Nsph; - memcpy(currentCenter, c, sizeof(c)); - tree->getNearestNeighbours(c, requested, ngb, distances); + if (state != 0) { + state->distances = boost::shared_ptr(new CoordType[Nsph]); + state->ngb = boost::shared_ptr(new SPHCell *[Nsph]); + } else + state = &internal; + + memcpy(state->currentCenter, c, sizeof(c)); + + tree->getNearestNeighbours(c, requested, state->ngb.get(), state->distances.get()); - currentNgb = 0; - for (uint32_t i = 0; i < requested && ngb[i] != 0; i++,currentNgb++) + state->currentNgb = 0; + for (uint32_t i = 0; i < requested && state->ngb[i] != 0; i++,state->currentNgb++) { - distances[i] = sqrt(distances[i]); - d2 = distances[i]; + d2 = internal.distances[i] = sqrt(internal.distances[i]); if (d2 > max_dist) - max_dist = d2; + max_dist = d2; } - smoothRadius = max_dist / 2; -} + state->smoothRadius = max_dist / 2; +} + template void SPHSmooth::fetchNeighboursOnVolume(const typename SPHTree::coords& c, - ComputePrecision radius) + ComputePrecision radius) { uint32_t numPart; ComputePrecision d2, max_dist = 0; - memcpy(currentCenter, c, sizeof(c)); + memcpy(internal.currentCenter, c, sizeof(c)); - currentNgb = tree->getIntersection(c, radius, ngb, distances, + internal.currentNgb = tree->getIntersection(c, radius, internal.ngb, internal.distances, maxNgb); - for (uint32_t i = 0; i < currentNgb; i++) + for (uint32_t i = 0; i < internal.currentNgb; i++) { - distances[i] = sqrt(distances[i]); - d2 = distances[i]; + d2 = internal.distances[i] = sqrt(internal.distances[i]); if (d2 > max_dist) - max_dist = d2; + max_dist = d2; } - smoothRadius = max_dist / 2; + internal.smoothRadius = max_dist / 2; } template +template ComputePrecision SPHSmooth::computeSmoothedValue(const typename SPHTree::coords& c, - computeParticleValue fun) + FuncT fun, SPHState *state) { + if (state == 0) + state = &internal; + ComputePrecision outputValue = 0; ComputePrecision max_dist = 0; - ComputePrecision r3 = smoothRadius * smoothRadius * smoothRadius; + ComputePrecision r3 = cube(state->smoothRadius); - for (uint32_t i = 0; i < currentNgb; i++) + for (uint32_t i = 0; i < state->currentNgb; i++) { - outputValue += computeWValue(c, *ngb[i], distances[i], fun); + outputValue += computeWValue(c, *state->ngb[i], state->distances[i], fun, state); } return outputValue / r3; @@ -140,28 +146,36 @@ ComputePrecision interpolateOne(const ValType& t) // WARNING ! Cell's weight must be 1 !!! template +template ComputePrecision SPHSmooth::computeInterpolatedValue(const typename SPHTree::coords& c, - computeParticleValue fun) + FuncT fun, SPHState *state) { + if (state == 0) + state = &internal; + ComputePrecision outputValue = 0; ComputePrecision max_dist = 0; ComputePrecision weight = 0; - for (uint32_t i = 0; i < currentNgb; i++) + for (uint32_t i = 0; i < state->currentNgb; i++) { - outputValue += computeWValue(c, *ngb[i], distances[i], fun); - weight += computeWValue(c, *ngb[i], distances[i], interpolateOne); + outputValue += computeWValue(c, *state->ngb[i], state->distances[i], fun); + weight += computeWValue(c, *state->ngb[i], state->distances[i], interpolateOne); } return (outputValue == 0) ? 0 : (outputValue / weight); } template -void SPHSmooth::runForEachNeighbour(runParticleValue fun) +template +void SPHSmooth::runForEachNeighbour(FuncT fun, SPHState *state) { - for (uint32_t i = 0; i < currentNgb; i++) + if (state == 0) + state = &internal; + + for (uint32_t i = 0; i < state->currentNgb; i++) { - fun(ngb[i]); + fun(state->ngb[i]); } } @@ -172,14 +186,13 @@ void SPHSmooth::addGridSite(const typename SPHTree::coords& c) ComputePrecision outputValue = 0; ComputePrecision max_dist = 0; - ComputePrecision r3 = smoothRadius * smoothRadius * smoothRadius; + ComputePrecision r3 = cube(internal.smoothRadius); - for (uint32_t i = 0; i < currentNgb; i++) + for (uint32_t i = 0; i < internal.currentNgb; i++) { - ComputePrecision d = distances[i]; - SPHCell& cell = *ngb[i]; - cell.val.weight += getKernel(d/smoothRadius) / r3; - + ComputePrecision d = internal.distances[i]; + SPHCell& cell = *(internal.ngb[i]); + cell.val.weight += getKernel(d/internal.smoothRadius) / r3; } } @@ -202,7 +215,7 @@ SPHSmooth::getKernel(ComputePrecision x) const template bool SPHSmooth::hasNeighbours() const { - return (currentNgb != 0); + return (internal.currentNgb != 0); } template diff --git a/external/cosmotool/src/yorick.hpp b/external/cosmotool/src/yorick.hpp index 39fd20d..f38200e 100644 --- a/external/cosmotool/src/yorick.hpp +++ b/external/cosmotool/src/yorick.hpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/yorick.hpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/yorick.hpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com @@ -218,7 +218,7 @@ namespace CosmoTool template void saveArray(const std::string& fname, - T *array, uint32_t *dimList, uint32_t rank); + const T *array, uint32_t *dimList, uint32_t rank); template void loadArray(const std::string& fname, diff --git a/external/cosmotool/src/yorick_nc3.cpp b/external/cosmotool/src/yorick_nc3.cpp index d80781e..b1f09e9 100644 --- a/external/cosmotool/src/yorick_nc3.cpp +++ b/external/cosmotool/src/yorick_nc3.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/yorick_nc3.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/yorick_nc3.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com @@ -37,7 +37,7 @@ knowledge of the CeCILL license and that you accept its terms. #include "config.hpp" #ifdef NETCDFCPP4 #include -using namespace netCDF +using namespace netCDF; #else #include #endif @@ -235,7 +235,7 @@ namespace CosmoTool { template void saveArray(const std::string& fname, - T *array, uint32_t *dimList, uint32_t rank) + const T *array, uint32_t *dimList, uint32_t rank) { NcFile f(fname.c_str(), NcFile::Replace, 0, 0, NcFile::Netcdf4); @@ -300,10 +300,10 @@ namespace CosmoTool { double*& array, uint32_t *&dimList, uint32_t& rank); template void saveArray(const std::string& fname, - int *array, uint32_t *dimList, uint32_t rank); + const int *array, uint32_t *dimList, uint32_t rank); template void saveArray(const std::string& fname, - float *array, uint32_t *dimList, uint32_t rank); + const float *array, uint32_t *dimList, uint32_t rank); template void saveArray(const std::string& fname, - double *array, uint32_t *dimList, uint32_t rank); + const double *array, uint32_t *dimList, uint32_t rank); } diff --git a/external/cosmotool/src/yorick_nc4.cpp b/external/cosmotool/src/yorick_nc4.cpp index 9a6f501..a0234df 100644 --- a/external/cosmotool/src/yorick_nc4.cpp +++ b/external/cosmotool/src/yorick_nc4.cpp @@ -1,5 +1,5 @@ /*+ -This is CosmoTool (./src/yorick_nc4.cpp) -- Copyright (C) Guilhem Lavaux (2007-2013) +This is CosmoTool (./src/yorick_nc4.cpp) -- Copyright (C) Guilhem Lavaux (2007-2014) guilhem.lavaux@gmail.com @@ -131,9 +131,9 @@ public: { if (curPos[i] == dimList[i].getSize()) { - curPos[i-1]++; - curPos[i] = 0; - } + curPos[i-1]++; + curPos[i] = 0; + } } } }; @@ -174,7 +174,7 @@ namespace CosmoTool { vector ldimList; for (uint32_t i = 0; i < rank; i++) - ldimList.push_back(dimArray[rank-1-i]); + ldimList.push_back(dimArray[i]); OutputGenCDF *impl = new OutputGenCDF(f, v, ldimList, rank); return ProgressiveOutput(impl); @@ -203,7 +203,7 @@ namespace CosmoTool { template void saveArray(const std::string& fname, - T *array, uint32_t *dimList, uint32_t rank) + const T *array, uint32_t *dimList, uint32_t rank) { NcFile f(fname.c_str(), NcFile::replace); @@ -263,10 +263,10 @@ namespace CosmoTool { double*& array, uint32_t *&dimList, uint32_t& rank); template void saveArray(const std::string& fname, - int *array, uint32_t *dimList, uint32_t rank); + const int *array, uint32_t *dimList, uint32_t rank); template void saveArray(const std::string& fname, - float *array, uint32_t *dimList, uint32_t rank); + const float *array, uint32_t *dimList, uint32_t rank); template void saveArray(const std::string& fname, - double *array, uint32_t *dimList, uint32_t rank); + const double *array, uint32_t *dimList, uint32_t rank); }