revamp include mechanism; update copyright; fix for OSX
This commit is contained in:
parent
e5d8adf15b
commit
db08a08f77
29 changed files with 135 additions and 171 deletions
|
@ -38,7 +38,7 @@ libsharp_la_LIBADD = libavx.la libavx2.la libfma.la libfma4.la libavx512f.la
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include_HEADERS = \
|
nobase_include_HEADERS = \
|
||||||
libsharp/sharp.h \
|
libsharp/sharp.h \
|
||||||
libsharp/sharp_geomhelpers.h \
|
libsharp/sharp_geomhelpers.h \
|
||||||
libsharp/sharp_almhelpers.h \
|
libsharp/sharp_almhelpers.h \
|
||||||
|
@ -53,7 +53,7 @@ sharp_testsuite_LDADD = libsharp.la
|
||||||
|
|
||||||
TESTS = runtest.sh
|
TESTS = runtest.sh
|
||||||
|
|
||||||
AM_CFLAGS = -I$(top_srcdir)/c_utils -I$(top_srcdir)/libsharp @AM_CFLAGS@
|
AM_CFLAGS = @AM_CFLAGS@
|
||||||
|
|
||||||
pkgconfigdir = $(libdir)/pkgconfig
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
nodist_pkgconfig_DATA = @PACKAGE_NAME@.pc
|
nodist_pkgconfig_DATA = @PACKAGE_NAME@.pc
|
||||||
|
|
|
@ -16,21 +16,17 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/* libc_utils is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
* 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
|
* Convenience functions
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2017 Max-Planck-Society
|
* Copyright (C) 2008-2019 Max-Planck-Society
|
||||||
* Author: Martin Reinecke
|
* Author: Martin Reinecke
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "c_utils.h"
|
#include "c_utils/c_utils.h"
|
||||||
|
|
||||||
void util_fail_ (const char *file, int line, const char *func, const char *msg)
|
void util_fail_ (const char *file, int line, const char *func, const char *msg)
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,16 +16,12 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/* libc_utils is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
* 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
|
/*! \file c_utils.h
|
||||||
* Convenience functions
|
* Convenience functions
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2017 Max-Planck-Society
|
* Copyright (C) 2008-2019 Max-Planck-Society
|
||||||
* \author Martin Reinecke
|
* \author Martin Reinecke
|
||||||
* \note This file should only be included from .c files, NOT from .h files.
|
* \note This file should only be included from .c files, NOT from .h files.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -16,22 +16,18 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/* libc_utils is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
* 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
|
* Functionality for measuring memory consumption
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012 Max-Planck-Society
|
* Copyright (C) 2012-2019 Max-Planck-Society
|
||||||
* Author: Martin Reinecke
|
* Author: Martin Reinecke
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "memusage.h"
|
#include "c_utils/memusage.h"
|
||||||
|
|
||||||
double residentSetSize(void)
|
double residentSetSize(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,16 +16,12 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/* libc_utils is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
* 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
|
/*! \file memusage.h
|
||||||
* Functionality for measuring memory consumption
|
* Functionality for measuring memory consumption
|
||||||
*
|
*
|
||||||
* Copyright (C) 2012 Max-Planck-Society
|
* Copyright (C) 2012-2019 Max-Planck-Society
|
||||||
* \author Martin Reinecke
|
* \author Martin Reinecke
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -16,16 +16,12 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/* libc_utils is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
* 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
|
* Functionality for reading wall clock time
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010-2016 Max-Planck-Society
|
* Copyright (C) 2010-2019 Max-Planck-Society
|
||||||
* Author: Martin Reinecke
|
* Author: Martin Reinecke
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -40,7 +36,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "walltime_c.h"
|
#include "c_utils/walltime_c.h"
|
||||||
|
|
||||||
double wallTime(void)
|
double wallTime(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,16 +16,12 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/* libc_utils is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
* 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
|
/*! \file walltime_c.h
|
||||||
* Functionality for reading wall clock time
|
* Functionality for reading wall clock time
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010 Max-Planck-Society
|
* Copyright (C) 2010-2019 Max-Planck-Society
|
||||||
* \author Martin Reinecke
|
* \author Martin Reinecke
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -14,12 +14,6 @@ m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
|
||||||
LT_INIT
|
LT_INIT
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
|
|
||||||
dnl
|
|
||||||
dnl By default, install the headers into a subdirectory of
|
|
||||||
dnl ${prefix}/include to avoid possible header filename collisions.
|
|
||||||
dnl
|
|
||||||
includedir="${includedir}/${PACKAGE_NAME}"
|
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl Enable silent build rules if this version of Automake supports them
|
dnl Enable silent build rules if this version of Automake supports them
|
||||||
dnl
|
dnl
|
||||||
|
|
|
@ -16,28 +16,24 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
* 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
|
/*! \file sharp.c
|
||||||
* Spherical transform library
|
* Spherical transform library
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2016 Max-Planck-Society
|
* Copyright (C) 2006-2019 Max-Planck-Society
|
||||||
* \author Martin Reinecke \author Dag Sverre Seljebotn
|
* \author Martin Reinecke \author Dag Sverre Seljebotn
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "pocketfft/pocketfft.h"
|
#include "pocketfft/pocketfft.h"
|
||||||
#include "sharp_ylmgen_c.h"
|
#include "libsharp/sharp_ylmgen_c.h"
|
||||||
#include "sharp_internal.h"
|
#include "libsharp/sharp_internal.h"
|
||||||
#include "c_utils.h"
|
#include "c_utils/c_utils.h"
|
||||||
#include "walltime_c.h"
|
#include "c_utils/walltime_c.h"
|
||||||
#include "sharp_almhelpers.h"
|
#include "libsharp/sharp_almhelpers.h"
|
||||||
#include "sharp_geomhelpers.h"
|
#include "libsharp/sharp_geomhelpers.h"
|
||||||
|
|
||||||
typedef complex double dcmplx;
|
typedef complex double dcmplx;
|
||||||
typedef complex float fcmplx;
|
typedef complex float fcmplx;
|
||||||
|
|
|
@ -16,11 +16,7 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
* 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
|
/*! \file sharp.h
|
||||||
* Portable interface for the spherical transform library.
|
* Portable interface for the spherical transform library.
|
||||||
|
|
|
@ -16,21 +16,17 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
* 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.c
|
/*! \file sharp_almhelpers.c
|
||||||
* Spherical transform library
|
* Spherical transform library
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2016 Max-Planck-Society
|
* Copyright (C) 2008-2019 Max-Planck-Society
|
||||||
* \author Martin Reinecke
|
* \author Martin Reinecke
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "sharp_almhelpers.h"
|
#include "libsharp/sharp_almhelpers.h"
|
||||||
#include "c_utils.h"
|
#include "c_utils/c_utils.h"
|
||||||
|
|
||||||
void sharp_make_triangular_alm_info (int lmax, int mmax, int stride,
|
void sharp_make_triangular_alm_info (int lmax, int mmax, int stride,
|
||||||
sharp_alm_info **alm_info)
|
sharp_alm_info **alm_info)
|
||||||
|
|
|
@ -16,11 +16,7 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
* 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
|
/*! \file sharp_almhelpers.h
|
||||||
* SHARP helper function for the creation of a_lm data structures
|
* SHARP helper function for the creation of a_lm data structures
|
||||||
|
@ -32,7 +28,7 @@
|
||||||
#ifndef PLANCK_SHARP_ALMHELPERS_H
|
#ifndef PLANCK_SHARP_ALMHELPERS_H
|
||||||
#define PLANCK_SHARP_ALMHELPERS_H
|
#define PLANCK_SHARP_ALMHELPERS_H
|
||||||
|
|
||||||
#include "sharp.h"
|
#include "libsharp/sharp.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
|
@ -1,6 +1,33 @@
|
||||||
|
/*
|
||||||
|
* 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 */
|
||||||
|
|
||||||
|
/*! \file sharp_core.c
|
||||||
|
* Spherical transform library
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 Max-Planck-Society
|
||||||
|
* \author Martin Reinecke
|
||||||
|
*/
|
||||||
|
|
||||||
#define ARCH default
|
#define ARCH default
|
||||||
#define GENERIC_ARCH
|
#define GENERIC_ARCH
|
||||||
#include "sharp_core_inc.c"
|
#include "libsharp/sharp_core_inc.c"
|
||||||
#undef GENERIC_ARCH
|
#undef GENERIC_ARCH
|
||||||
#undef ARCH
|
#undef ARCH
|
||||||
|
|
||||||
|
@ -42,7 +69,9 @@ int XCONCATX2(sharp_veclen,arch) (void); \
|
||||||
int XCONCATX2(sharp_max_nvec,arch) (int spin); \
|
int XCONCATX2(sharp_max_nvec,arch) (int spin); \
|
||||||
const char *XCONCATX2(sharp_architecture,arch) (void);
|
const char *XCONCATX2(sharp_architecture,arch) (void);
|
||||||
|
|
||||||
|
#if (!defined(__APPLE__))
|
||||||
DECL(avx512f)
|
DECL(avx512f)
|
||||||
|
#endif
|
||||||
DECL(fma4)
|
DECL(fma4)
|
||||||
DECL(fma)
|
DECL(fma)
|
||||||
DECL(avx2)
|
DECL(avx2)
|
||||||
|
@ -62,7 +91,9 @@ static void assign_funcs(void)
|
||||||
architecture_ = XCONCATX2(sharp_architecture,arch); \
|
architecture_ = XCONCATX2(sharp_architecture,arch); \
|
||||||
return; \
|
return; \
|
||||||
}
|
}
|
||||||
|
#if (!defined(__APPLE__))
|
||||||
DECL2(avx512f)
|
DECL2(avx512f)
|
||||||
|
#endif
|
||||||
DECL2(fma4)
|
DECL2(fma4)
|
||||||
DECL2(fma)
|
DECL2(fma)
|
||||||
DECL2(avx2)
|
DECL2(avx2)
|
||||||
|
|
|
@ -16,11 +16,7 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
* 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
|
/*! \file sharp_core_inc.c
|
||||||
* Computational core
|
* Computational core
|
||||||
|
@ -29,6 +25,9 @@
|
||||||
* \author Martin Reinecke
|
* \author Martin Reinecke
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// FIXME: special ugly workaround for problems on OSX
|
||||||
|
#if (!defined(__APPLE__)) || (!defined(__AVX512F__))
|
||||||
|
|
||||||
#if (defined(MULTIARCH) || defined(GENERIC_ARCH))
|
#if (defined(MULTIARCH) || defined(GENERIC_ARCH))
|
||||||
|
|
||||||
#define XCONCATX(a,b) a##_##b
|
#define XCONCATX(a,b) a##_##b
|
||||||
|
@ -38,10 +37,10 @@
|
||||||
#include <complex.h>
|
#include <complex.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "sharp_vecsupport.h"
|
#include "libsharp/sharp_vecsupport.h"
|
||||||
#include "sharp.h"
|
#include "libsharp/sharp.h"
|
||||||
#include "sharp_internal.h"
|
#include "libsharp/sharp_internal.h"
|
||||||
#include "c_utils.h"
|
#include "c_utils/c_utils.h"
|
||||||
|
|
||||||
typedef complex double dcmplx;
|
typedef complex double dcmplx;
|
||||||
|
|
||||||
|
@ -1205,3 +1204,5 @@ const char *XARCH(sharp_architecture)(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -16,11 +16,7 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
* 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
|
/*! \file sharp_cxx.h
|
||||||
* Spherical transform library
|
* Spherical transform library
|
||||||
|
@ -33,9 +29,9 @@
|
||||||
#define PLANCK_SHARP_CXX_H
|
#define PLANCK_SHARP_CXX_H
|
||||||
|
|
||||||
#include <complex>
|
#include <complex>
|
||||||
#include "sharp.h"
|
#include "libsharp/sharp.h"
|
||||||
#include "sharp_geomhelpers.h"
|
#include "libsharp/sharp_geomhelpers.h"
|
||||||
#include "sharp_almhelpers.h"
|
#include "libsharp/sharp_almhelpers.h"
|
||||||
|
|
||||||
class sharp_base
|
class sharp_base
|
||||||
{
|
{
|
||||||
|
@ -89,9 +85,6 @@ class sharp_base
|
||||||
if (ainfo) sharp_destroy_alm_info(ainfo);
|
if (ainfo) sharp_destroy_alm_info(ainfo);
|
||||||
sharp_make_triangular_alm_info (lmax, mmax, 1, &ainfo);
|
sharp_make_triangular_alm_info (lmax, mmax, 1, &ainfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
const sharp_geom_info* get_geom_info() const { return ginfo; }
|
|
||||||
const sharp_alm_info* get_alm_info() const { return ainfo; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T> struct cxxjobhelper__ {};
|
template<typename T> struct cxxjobhelper__ {};
|
||||||
|
|
|
@ -16,23 +16,19 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
* 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
|
/*! \file sharp_geomhelpers.c
|
||||||
* Spherical transform library
|
* Spherical transform library
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2018 Max-Planck-Society
|
* Copyright (C) 2006-2019 Max-Planck-Society
|
||||||
* \author Martin Reinecke
|
* \author Martin Reinecke
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "sharp_geomhelpers.h"
|
#include "libsharp/sharp_geomhelpers.h"
|
||||||
#include "sharp_legendre_roots.h"
|
#include "libsharp/sharp_legendre_roots.h"
|
||||||
#include "c_utils.h"
|
#include "c_utils/c_utils.h"
|
||||||
#include "pocketfft/pocketfft.h"
|
#include "pocketfft/pocketfft.h"
|
||||||
|
|
||||||
void sharp_make_subset_healpix_geom_info (int nside, int stride, int nrings,
|
void sharp_make_subset_healpix_geom_info (int nside, int stride, int nrings,
|
||||||
|
|
|
@ -16,11 +16,7 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
* 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.h
|
/*! \file sharp_geomhelpers.h
|
||||||
* SHARP helper function for the creation of grid geometries
|
* SHARP helper function for the creation of grid geometries
|
||||||
|
@ -32,7 +28,7 @@
|
||||||
#ifndef PLANCK_SHARP_GEOMHELPERS_H
|
#ifndef PLANCK_SHARP_GEOMHELPERS_H
|
||||||
#define PLANCK_SHARP_GEOMHELPERS_H
|
#define PLANCK_SHARP_GEOMHELPERS_H
|
||||||
|
|
||||||
#include "sharp.h"
|
#include "libsharp/sharp.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
|
@ -16,11 +16,7 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
* 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
|
/*! \file sharp_internal.h
|
||||||
* Internally used functionality for the spherical transform library.
|
* Internally used functionality for the spherical transform library.
|
||||||
|
@ -37,8 +33,8 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <complex.h>
|
#include <complex.h>
|
||||||
#include "sharp.h"
|
#include "libsharp/sharp.h"
|
||||||
#include "sharp_ylmgen_c.h"
|
#include "libsharp/sharp_ylmgen_c.h"
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
- tweaked Newton iteration to obtain higher accuracy */
|
- tweaked Newton iteration to obtain higher accuracy */
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "sharp_legendre_roots.h"
|
#include "libsharp/sharp_legendre_roots.h"
|
||||||
#include "c_utils.h"
|
#include "c_utils/c_utils.h"
|
||||||
|
|
||||||
static inline double one_minus_x2 (double x)
|
static inline double one_minus_x2 (double x)
|
||||||
{ return (fabs(x)>0.1) ? (1.+x)*(1.-x) : 1.-x*x; }
|
{ return (fabs(x)>0.1) ? (1.+x)*(1.-x) : 1.-x*x; }
|
||||||
|
|
|
@ -16,11 +16,7 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
* 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_legendre_roots.h
|
/*! \file sharp_legendre_roots.h
|
||||||
*
|
*
|
||||||
|
|
|
@ -16,11 +16,7 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
* 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
|
/*! \file sharp_mpi.c
|
||||||
* Functionality only needed for MPI-parallel transforms
|
* Functionality only needed for MPI-parallel transforms
|
||||||
|
@ -31,7 +27,7 @@
|
||||||
|
|
||||||
#ifdef USE_MPI
|
#ifdef USE_MPI
|
||||||
|
|
||||||
#include "sharp_mpi.h"
|
#include "libsharp/sharp_mpi.h"
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,11 +16,7 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
* 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
|
/*! \file sharp_mpi.h
|
||||||
* Interface for the spherical transform library with MPI support.
|
* Interface for the spherical transform library with MPI support.
|
||||||
|
@ -33,7 +29,7 @@
|
||||||
#define PLANCK_SHARP_MPI_H
|
#define PLANCK_SHARP_MPI_H
|
||||||
|
|
||||||
#include <mpi.h>
|
#include <mpi.h>
|
||||||
#include "sharp.h"
|
#include "libsharp/sharp.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
|
@ -16,11 +16,7 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
* 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_testsuite.c
|
/* \file sharp_testsuite.c
|
||||||
*
|
*
|
||||||
|
@ -32,17 +28,17 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#ifdef USE_MPI
|
#ifdef USE_MPI
|
||||||
#include "mpi.h"
|
#include "mpi.h"
|
||||||
#include "sharp_mpi.h"
|
#include "libsharp/sharp_mpi.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
#include <omp.h>
|
#include <omp.h>
|
||||||
#endif
|
#endif
|
||||||
#include "sharp.h"
|
#include "libsharp/sharp.h"
|
||||||
#include "sharp_internal.h"
|
#include "libsharp/sharp_internal.h"
|
||||||
#include "sharp_geomhelpers.h"
|
#include "libsharp/sharp_geomhelpers.h"
|
||||||
#include "sharp_almhelpers.h"
|
#include "libsharp/sharp_almhelpers.h"
|
||||||
#include "c_utils.h"
|
#include "c_utils/c_utils.h"
|
||||||
#include "memusage.h"
|
#include "c_utils/memusage.h"
|
||||||
|
|
||||||
static void OpenMP_status(void)
|
static void OpenMP_status(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,11 +16,7 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
* 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
|
/* \file sharp_vecsupport.h
|
||||||
* Convenience functions for vector arithmetics
|
* Convenience functions for vector arithmetics
|
||||||
|
|
|
@ -16,11 +16,7 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
* 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)
|
* Helper code for efficient calculation of Y_lm(theta,phi=0)
|
||||||
|
@ -31,8 +27,8 @@
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "sharp_ylmgen_c.h"
|
#include "libsharp/sharp_ylmgen_c.h"
|
||||||
#include "c_utils.h"
|
#include "c_utils/c_utils.h"
|
||||||
|
|
||||||
static inline void normalize (double *val, int *scale, double xfmax)
|
static inline void normalize (double *val, int *scale, double xfmax)
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,11 +16,7 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
* 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_ylmgen_c.h
|
/*! \file sharp_ylmgen_c.h
|
||||||
* Code for efficient calculation of Y_lm(phi=0,theta)
|
* Code for efficient calculation of Y_lm(phi=0,theta)
|
||||||
|
|
25
pocketfft/LICENSE.md
Normal file
25
pocketfft/LICENSE.md
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
Copyright (C) 2010-2019 Max-Planck-Society
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice, this
|
||||||
|
list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above copyright notice, this
|
||||||
|
list of conditions and the following disclaimer in the documentation and/or
|
||||||
|
other materials provided with the distribution.
|
||||||
|
* Neither the name of the Astropy Team nor the names of its contributors may be
|
||||||
|
used to endorse or promote products derived from this software without
|
||||||
|
specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@ -6,7 +6,7 @@
|
||||||
/*
|
/*
|
||||||
* Main implementation file.
|
* Main implementation file.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2004-2018 Max-Planck-Society
|
* Copyright (C) 2004-2019 Max-Planck-Society
|
||||||
* \author Martin Reinecke
|
* \author Martin Reinecke
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
/*! \file pocketfft.h
|
/*! \file pocketfft.h
|
||||||
* Public interface of the pocketfft library
|
* Public interface of the pocketfft library
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2018 Max-Planck-Society
|
* Copyright (C) 2008-2019 Max-Planck-Society
|
||||||
* \author Martin Reinecke
|
* \author Martin Reinecke
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue