name change to libsharp2
This commit is contained in:
parent
eef25f6845
commit
90f63915c2
31 changed files with 221 additions and 208 deletions
8
.gitignore
vendored
8
.gitignore
vendored
|
@ -9,10 +9,10 @@
|
||||||
.libs
|
.libs
|
||||||
**/.deps
|
**/.deps
|
||||||
**/.dirstamp
|
**/.dirstamp
|
||||||
libsharp-uninstalled.pc
|
libsharp2-uninstalled.pc
|
||||||
libsharp-uninstalled.sh
|
libsharp2-uninstalled.sh
|
||||||
libsharp.pc
|
libsharp2.pc
|
||||||
libsharp.pc.in
|
libsharp2.pc.in
|
||||||
perf.data*
|
perf.data*
|
||||||
/auto
|
/auto
|
||||||
/autom4te.cache
|
/autom4te.cache
|
||||||
|
|
10
COMPILE
10
COMPILE
|
@ -1,6 +1,6 @@
|
||||||
Libsharp is configured, compiled and installed using GNU autotools.
|
Libsharp2 is configured, compiled and installed using GNU autotools.
|
||||||
|
|
||||||
If you have cloned the libsharp repository, you have to run
|
If you have cloned the libsharp2 repository, you have to run
|
||||||
"autoreconf -i" before starting the configuration, which requires several
|
"autoreconf -i" before starting the configuration, which requires several
|
||||||
GNU developer tools to be available on your system.
|
GNU developer tools to be available on your system.
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@ since it allows the compiler to fuse multiplications and additions into FMA
|
||||||
instructions, which is forbidden by the C99 standard. Since FMAs are a central
|
instructions, which is forbidden by the C99 standard. Since FMAs are a central
|
||||||
aspect of the algorithm, they are needed for optimum performance.
|
aspect of the algorithm, they are needed for optimum performance.
|
||||||
|
|
||||||
If you are calling libsharp from other code which requires strict adherence
|
If you are calling libsharp2 from other code which requires strict adherence
|
||||||
to the C99 standard, you should still be able to compile libsharp with
|
to the C99 standard, you should still be able to compile libsharp2 with
|
||||||
"-ffast-math" without any problems.
|
"-ffast-math" without any problems.
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ at runtime.
|
||||||
This is enabled by passing "-DMULTIARCH" as part of the CFLAGS.
|
This is enabled by passing "-DMULTIARCH" as part of the CFLAGS.
|
||||||
If this is enabled, please do _not_ specify "-march=native" or
|
If this is enabled, please do _not_ specify "-march=native" or
|
||||||
"-mtarget=avx" or similar!
|
"-mtarget=avx" or similar!
|
||||||
If you are compiling libsharp for a particular target CPU only, or if you are
|
If you are compiling libsharp2 for a particular target CPU only, or if you are
|
||||||
using a different compiler, however, "-march-native" should be used. The
|
using a different compiler, however, "-march-native" should be used. The
|
||||||
resulting binary will most likely not run on other computers, though.
|
resulting binary will most likely not run on other computers, though.
|
||||||
|
|
||||||
|
|
64
Makefile.am
64
Makefile.am
|
@ -1,22 +1,22 @@
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
lib_LTLIBRARIES = libsharp.la
|
lib_LTLIBRARIES = libsharp2.la
|
||||||
|
|
||||||
libsharp_la_SOURCES = \
|
libsharp2_la_SOURCES = \
|
||||||
pocketfft/pocketfft.c \
|
libsharp2/pocketfft.c \
|
||||||
pocketfft/pocketfft.h \
|
libsharp2/pocketfft.h \
|
||||||
libsharp/sharp_utils.c \
|
libsharp2/sharp_utils.c \
|
||||||
libsharp/sharp_utils.h \
|
libsharp2/sharp_utils.h \
|
||||||
libsharp/sharp.c \
|
libsharp2/sharp.c \
|
||||||
libsharp/sharp_almhelpers.c \
|
libsharp2/sharp_almhelpers.c \
|
||||||
libsharp/sharp_core.c \
|
libsharp2/sharp_core.c \
|
||||||
libsharp/sharp_geomhelpers.c \
|
libsharp2/sharp_geomhelpers.c \
|
||||||
libsharp/sharp_legendre_roots.c \
|
libsharp2/sharp_legendre_roots.c \
|
||||||
libsharp/sharp_ylmgen_c.c \
|
libsharp2/sharp_ylmgen_c.c \
|
||||||
libsharp/sharp_internal.h \
|
libsharp2/sharp_internal.h \
|
||||||
libsharp/sharp_legendre_roots.h \
|
libsharp2/sharp_legendre_roots.h \
|
||||||
libsharp/sharp_vecsupport.h \
|
libsharp2/sharp_vecsupport.h \
|
||||||
libsharp/sharp_ylmgen_c.h
|
libsharp2/sharp_ylmgen_c.h
|
||||||
|
|
||||||
# format is "current:revision:age"
|
# format is "current:revision:age"
|
||||||
# any change: increase revision
|
# any change: increase revision
|
||||||
|
@ -24,17 +24,17 @@ libsharp_la_SOURCES = \
|
||||||
# any backward-compatible change: increase age
|
# any backward-compatible change: increase age
|
||||||
# any backward-incompatible change: age=0
|
# any backward-incompatible change: age=0
|
||||||
# ==> age <= current
|
# ==> age <= current
|
||||||
libsharp_la_LDFLAGS = -version-info 0:0:0
|
libsharp2_la_LDFLAGS = -version-info 0:0:0
|
||||||
|
|
||||||
AM_CFLAGS = @AM_CFLAGS@
|
AM_CFLAGS = @AM_CFLAGS@
|
||||||
|
|
||||||
if HAVE_MULTIARCH
|
if HAVE_MULTIARCH
|
||||||
|
|
||||||
libavx_la_SOURCES = libsharp/sharp_core_inc.c
|
libavx_la_SOURCES = libsharp2/sharp_core_inc.c
|
||||||
libavx2_la_SOURCES = libsharp/sharp_core_inc.c
|
libavx2_la_SOURCES = libsharp2/sharp_core_inc.c
|
||||||
libfma_la_SOURCES = libsharp/sharp_core_inc.c
|
libfma_la_SOURCES = libsharp2/sharp_core_inc.c
|
||||||
libfma4_la_SOURCES = libsharp/sharp_core_inc.c
|
libfma4_la_SOURCES = libsharp2/sharp_core_inc.c
|
||||||
libavx512f_la_SOURCES = libsharp/sharp_core_inc.c
|
libavx512f_la_SOURCES = libsharp2/sharp_core_inc.c
|
||||||
|
|
||||||
noinst_LTLIBRARIES = libavx.la libavx2.la libfma.la libfma4.la libavx512f.la
|
noinst_LTLIBRARIES = libavx.la libavx2.la libfma.la libfma4.la libavx512f.la
|
||||||
|
|
||||||
|
@ -44,23 +44,23 @@ libfma_la_CFLAGS = ${AM_CFLAGS} -mfma -DARCH=fma
|
||||||
libfma4_la_CFLAGS = ${AM_CFLAGS} -mfma4 -DARCH=fma4
|
libfma4_la_CFLAGS = ${AM_CFLAGS} -mfma4 -DARCH=fma4
|
||||||
libavx512f_la_CFLAGS = ${AM_CFLAGS} -mavx512f -DARCH=avx512f
|
libavx512f_la_CFLAGS = ${AM_CFLAGS} -mavx512f -DARCH=avx512f
|
||||||
|
|
||||||
libsharp_la_LIBADD = libavx.la libavx2.la libfma.la libfma4.la libavx512f.la
|
libsharp2_la_LIBADD = libavx.la libavx2.la libfma.la libfma4.la libavx512f.la
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
nobase_include_HEADERS = \
|
nobase_include_HEADERS = \
|
||||||
libsharp/sharp.h \
|
libsharp2/sharp.h \
|
||||||
libsharp/sharp_mpi.h \
|
libsharp2/sharp_mpi.h \
|
||||||
libsharp/sharp_geomhelpers.h \
|
libsharp2/sharp_geomhelpers.h \
|
||||||
libsharp/sharp_almhelpers.h \
|
libsharp2/sharp_almhelpers.h \
|
||||||
libsharp/sharp_cxx.h
|
libsharp2/sharp_cxx.h
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
runtest.sh fortran/sharp.f90 fortran/test_sharp.f90 libsharp/sharp_mpi.c
|
runtest.sh fortran/sharp.f90 fortran/test_sharp.f90 libsharp2/sharp_mpi.c
|
||||||
|
|
||||||
check_PROGRAMS = sharp_testsuite
|
check_PROGRAMS = sharp2_testsuite
|
||||||
sharp_testsuite_SOURCES = test/sharp_testsuite.c test/memusage.c test/memusage.h
|
sharp2_testsuite_SOURCES = test/sharp2_testsuite.c test/memusage.c test/memusage.h
|
||||||
sharp_testsuite_LDADD = libsharp.la -lm
|
sharp2_testsuite_LDADD = libsharp2.la -lm
|
||||||
|
|
||||||
TESTS = runtest.sh
|
TESTS = runtest.sh
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Libsharp
|
# Libsharp2
|
||||||
|
|
||||||
Library for efficient spherical harmonic transforms at arbitrary spins,
|
Library for efficient spherical harmonic transforms at arbitrary spins,
|
||||||
supporting CPU vectorization, OpenMP and MPI.
|
supporting CPU vectorization, OpenMP and MPI.
|
||||||
|
@ -20,10 +20,10 @@ These improvements reduce the fraction of CPU time spent on evaluating the
|
||||||
recurrences for Y_lm coefficients, which means that computing multiple
|
recurrences for Y_lm coefficients, which means that computing multiple
|
||||||
simultaneous SHTs no longer has a big performance advantage compared to SHTs
|
simultaneous SHTs no longer has a big performance advantage compared to SHTs
|
||||||
done one after the other.
|
done one after the other.
|
||||||
As a consequence, libsharp support for simultaneous SHTs was dropped, making
|
As a consequence, libsharp's support for simultaneous SHTs was dropped, making
|
||||||
its interface much simpler.
|
its interface much simpler.
|
||||||
|
|
||||||
With the proper compilers and flags (see the file COMPILE for details) libsharp
|
With the proper compilers and flags (see the file COMPILE for details) libsharp2
|
||||||
is now built with support for SSE2, AVX, AVX2, FMA3, FMA4 and AVX512f and the
|
is now built with support for SSE2, AVX, AVX2, FMA3, FMA4 and AVX512f and the
|
||||||
appropriate implementation is selected dynamically at runtime. This should
|
appropriate implementation is selected dynamically at runtime. This should
|
||||||
provide a very significant performance boost for everyone using pre-compiled
|
provide a very significant performance boost for everyone using pre-compiled
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
AC_INIT([libsharp], [1.0.0])
|
AC_INIT([libsharp2], [1.0.0])
|
||||||
AM_INIT_AUTOMAKE([foreign subdir-objects -Wall -Werror])
|
AM_INIT_AUTOMAKE([foreign subdir-objects -Wall -Werror])
|
||||||
AM_MAINTAINER_MODE([enable])
|
AM_MAINTAINER_MODE([enable])
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ AM_CONDITIONAL([HAVE_MULTIARCH], [test $tmpval -gt 0])
|
||||||
|
|
||||||
AM_CFLAGS="$AM_CFLAGS $OPENMP_CFLAGS"
|
AM_CFLAGS="$AM_CFLAGS $OPENMP_CFLAGS"
|
||||||
|
|
||||||
PACKAGE_LIBS="-lsharp"
|
PACKAGE_LIBS="-lsharp2"
|
||||||
PACKAGE_CFLAGS="$PACKAGE_CFLAGS $OPENMP_CFLAGS"
|
PACKAGE_CFLAGS="$PACKAGE_CFLAGS $OPENMP_CFLAGS"
|
||||||
PACKAGE_LDFLAGS="$PACKAGE_LDFLAGS $OPENMP_CFLAGS"
|
PACKAGE_LDFLAGS="$PACKAGE_LDFLAGS $OPENMP_CFLAGS"
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
/*! \mainpage libsharp documentation
|
/*! \mainpage libsharp2 documentation
|
||||||
<ul>
|
<ul>
|
||||||
<li>\ref introduction "Introduction"
|
<li>\ref introduction "Introduction"
|
||||||
<li><a href="modules.html">Programming interface</a>
|
<li><a href="modules.html">Programming interface</a>
|
||||||
</ul>
|
</ul>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \page introduction Introduction to libsharp
|
/*! \page introduction Introduction to libsharp2
|
||||||
|
|
||||||
"SHARP" is an acronym for <i>Spherical HARmonic Package</i>.
|
"SHARP" is an acronym for <i>Spherical HARmonic Package</i>.
|
||||||
All user-visible data types and functions in this library start with
|
All user-visible data types and functions in this library start with
|
||||||
the prefix "sharp_" to avoid pollution of the global C namespace.
|
the prefix "sharp_" to avoid pollution of the global C namespace.
|
||||||
|
|
||||||
<i>libsharp</i>'s main functionality is the conversion between <i>maps</i>
|
<i>libsharp2</i>'s main functionality is the conversion between <i>maps</i>
|
||||||
on the sphere and <i>spherical harmonic coefficients</i> (or <i>a_lm</i>).
|
on the sphere and <i>spherical harmonic coefficients</i> (or <i>a_lm</i>).
|
||||||
A map is defined as a set of <i>rings</i>, which in turn consist of
|
A map is defined as a set of <i>rings</i>, which in turn consist of
|
||||||
individual pixels that
|
individual pixels that
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
for generating often-used pixelisations like ECP grids, Gaussian grids,
|
for generating often-used pixelisations like ECP grids, Gaussian grids,
|
||||||
and Healpix grids.
|
and Healpix grids.
|
||||||
|
|
||||||
Currently, libsharp supports the following kinds of transforms:
|
Currently, libsharp2 supports the following kinds of transforms:
|
||||||
<ul>
|
<ul>
|
||||||
<li>scalar a_lm to map</li>
|
<li>scalar a_lm to map</li>
|
||||||
<li>scalar map to a_lm</li>
|
<li>scalar map to a_lm</li>
|
||||||
|
@ -67,10 +67,10 @@
|
||||||
<li>scalar a_lm to maps of first derivatives</li>
|
<li>scalar a_lm to maps of first derivatives</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
libsharp supports shared-memory parallelisation via OpenMP; this feature will
|
libsharp2 supports shared-memory parallelisation via OpenMP; this feature will
|
||||||
be automatically enabled if the compiler supports it.
|
be automatically enabled if the compiler supports it.
|
||||||
|
|
||||||
Libsharp will also make use of SSE2/AVX/AVX512 instructions when compiled
|
Libsharp2 will also make use of SSE2/AVX/AVX512 instructions when compiled
|
||||||
for a platform known to support them.
|
for a platform known to support them.
|
||||||
|
|
||||||
Support for MPI-parallel transforms is also available; in this mode,
|
Support for MPI-parallel transforms is also available; in this mode,
|
|
@ -13,7 +13,7 @@
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "pocketfft/pocketfft.h"
|
#include "libsharp2/pocketfft.h"
|
||||||
|
|
||||||
#define RALLOC(type,num) \
|
#define RALLOC(type,num) \
|
||||||
((type *)malloc((num)*sizeof(type)))
|
((type *)malloc((num)*sizeof(type)))
|
||||||
|
@ -31,6 +31,8 @@
|
||||||
#define WARN_UNUSED_RESULT
|
#define WARN_UNUSED_RESULT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#pragma GCC visibility push(hidden)
|
||||||
|
|
||||||
// adapted from https://stackoverflow.com/questions/42792939/
|
// adapted from https://stackoverflow.com/questions/42792939/
|
||||||
// CAUTION: this function only works for arguments in the range [-0.25; 0.25]!
|
// CAUTION: this function only works for arguments in the range [-0.25; 0.25]!
|
||||||
static void my_sincosm1pi (double a, double *restrict res)
|
static void my_sincosm1pi (double a, double *restrict res)
|
||||||
|
@ -2192,3 +2194,5 @@ int pocketfft_forward_r(pocketfft_plan_r plan, double c[], double fct)
|
||||||
else // if (plan->blueplan)
|
else // if (plan->blueplan)
|
||||||
return rfftblue_forward(plan->blueplan,c,fct);
|
return rfftblue_forward(plan->blueplan,c,fct);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma GCC visibility pop
|
|
@ -1,22 +1,22 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of libsharp.
|
* This file is part of libsharp2.
|
||||||
*
|
*
|
||||||
* libsharp is free software; you can redistribute it and/or modify
|
* libsharp2 is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* libsharp is distributed in the hope that it will be useful,
|
* libsharp2 is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with libsharp; if not, write to the Free Software
|
* along with libsharp2; if not, write to the Free Software
|
||||||
* 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 */
|
/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
|
|
||||||
/*! \file sharp.c
|
/*! \file sharp.c
|
||||||
* Spherical transform library
|
* Spherical transform library
|
||||||
|
@ -27,12 +27,12 @@
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "pocketfft/pocketfft.h"
|
#include "libsharp2/pocketfft.h"
|
||||||
#include "libsharp/sharp_ylmgen_c.h"
|
#include "libsharp2/sharp_ylmgen_c.h"
|
||||||
#include "libsharp/sharp_internal.h"
|
#include "libsharp2/sharp_internal.h"
|
||||||
#include "libsharp/sharp_utils.h"
|
#include "libsharp2/sharp_utils.h"
|
||||||
#include "libsharp/sharp_almhelpers.h"
|
#include "libsharp2/sharp_almhelpers.h"
|
||||||
#include "libsharp/sharp_geomhelpers.h"
|
#include "libsharp2/sharp_geomhelpers.h"
|
||||||
|
|
||||||
typedef complex double dcmplx;
|
typedef complex double dcmplx;
|
||||||
typedef complex float fcmplx;
|
typedef complex float fcmplx;
|
|
@ -1,22 +1,22 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of libsharp.
|
* This file is part of libsharp2.
|
||||||
*
|
*
|
||||||
* libsharp is free software; you can redistribute it and/or modify
|
* libsharp2 is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* libsharp is distributed in the hope that it will be useful,
|
* libsharp2 is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with libsharp; if not, write to the Free Software
|
* along with libsharp2; if not, write to the Free Software
|
||||||
* 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 */
|
/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
|
|
||||||
/*! \file sharp.h
|
/*! \file sharp.h
|
||||||
* Portable interface for the spherical transform library.
|
* Portable interface for the spherical transform library.
|
||||||
|
@ -169,7 +169,7 @@ void sharp_destroy_geom_info (sharp_geom_info *info);
|
||||||
|
|
||||||
/*! \} */
|
/*! \} */
|
||||||
|
|
||||||
/*! \defgroup lowlevelgroup Low-level libsharp SHT interface */
|
/*! \defgroup lowlevelgroup Low-level libsharp2 SHT interface */
|
||||||
/*! \{ */
|
/*! \{ */
|
||||||
|
|
||||||
/*! Enumeration of SHARP job types. */
|
/*! Enumeration of SHARP job types. */
|
||||||
|
@ -197,7 +197,7 @@ typedef enum { SHARP_DP = 1<<4,
|
||||||
SHARP_USE_WEIGHTS = 1<<20, /* internal use only */
|
SHARP_USE_WEIGHTS = 1<<20, /* internal use only */
|
||||||
} sharp_jobflags;
|
} sharp_jobflags;
|
||||||
|
|
||||||
/*! Performs a libsharp SHT job. The interface deliberately does not use
|
/*! Performs a libsharp2 SHT job. The interface deliberately does not use
|
||||||
the C99 "complex" data type, in order to be callable from C89 and C++.
|
the C99 "complex" data type, in order to be callable from C89 and C++.
|
||||||
\param type the type of SHT
|
\param type the type of SHT
|
||||||
\param spin the spin of the quantities to be transformed
|
\param spin the spin of the quantities to be transformed
|
||||||
|
@ -231,10 +231,10 @@ void sharp_set_nchunks_max(int new_nchunks_max);
|
||||||
|
|
||||||
|
|
||||||
typedef enum { SHARP_ERROR_NO_MPI = 1,
|
typedef enum { SHARP_ERROR_NO_MPI = 1,
|
||||||
/*!< libsharp not compiled with MPI support */
|
/*!< libsharp2 not compiled with MPI support */
|
||||||
} sharp_errors;
|
} sharp_errors;
|
||||||
|
|
||||||
/*! Works like sharp_execute_mpi, but is always present whether or not libsharp
|
/*! Works like sharp_execute_mpi, but is always present whether or not libsharp2
|
||||||
is compiled with USE_MPI. This is primarily useful for wrapper code etc.
|
is compiled with USE_MPI. This is primarily useful for wrapper code etc.
|
||||||
|
|
||||||
Note that \a pcomm has the type MPI_Comm*, except we declare void* to avoid
|
Note that \a pcomm has the type MPI_Comm*, except we declare void* to avoid
|
|
@ -1,22 +1,22 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of libsharp.
|
* This file is part of libsharp2.
|
||||||
*
|
*
|
||||||
* libsharp is free software; you can redistribute it and/or modify
|
* libsharp2 is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* libsharp is distributed in the hope that it will be useful,
|
* libsharp2 is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with libsharp; if not, write to the Free Software
|
* along with libsharp2; if not, write to the Free Software
|
||||||
* 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 */
|
/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
|
|
||||||
/*! \file sharp_almhelpers.c
|
/*! \file sharp_almhelpers.c
|
||||||
* Spherical transform library
|
* Spherical transform library
|
||||||
|
@ -25,8 +25,8 @@
|
||||||
* \author Martin Reinecke
|
* \author Martin Reinecke
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "libsharp/sharp_almhelpers.h"
|
#include "libsharp2/sharp_almhelpers.h"
|
||||||
#include "libsharp/sharp_utils.h"
|
#include "libsharp2/sharp_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)
|
|
@ -1,22 +1,22 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of libsharp.
|
* This file is part of libsharp2.
|
||||||
*
|
*
|
||||||
* libsharp is free software; you can redistribute it and/or modify
|
* libsharp2 is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* libsharp is distributed in the hope that it will be useful,
|
* libsharp2 is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with libsharp; if not, write to the Free Software
|
* along with libsharp2; if not, write to the Free Software
|
||||||
* 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 */
|
/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
|
|
||||||
/*! \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
|
||||||
|
@ -25,10 +25,10 @@
|
||||||
* \author Martin Reinecke
|
* \author Martin Reinecke
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SHARP_ALMHELPERS_H
|
#ifndef SHARP2_ALMHELPERS_H
|
||||||
#define SHARP_ALMHELPERS_H
|
#define SHARP2_ALMHELPERS_H
|
||||||
|
|
||||||
#include "libsharp/sharp.h"
|
#include "libsharp2/sharp.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
|
@ -1,22 +1,22 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of libsharp.
|
* This file is part of libsharp2.
|
||||||
*
|
*
|
||||||
* libsharp is free software; you can redistribute it and/or modify
|
* libsharp2 is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* libsharp is distributed in the hope that it will be useful,
|
* libsharp2 is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with libsharp; if not, write to the Free Software
|
* along with libsharp2; if not, write to the Free Software
|
||||||
* 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 */
|
/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
|
|
||||||
/*! \file sharp_core.c
|
/*! \file sharp_core.c
|
||||||
* Spherical transform library
|
* Spherical transform library
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
#define ARCH default
|
#define ARCH default
|
||||||
#define GENERIC_ARCH
|
#define GENERIC_ARCH
|
||||||
#include "libsharp/sharp_core_inc.c"
|
#include "libsharp2/sharp_core_inc.c"
|
||||||
#undef GENERIC_ARCH
|
#undef GENERIC_ARCH
|
||||||
#undef ARCH
|
#undef ARCH
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of libsharp.
|
* This file is part of libsharp2.
|
||||||
*
|
*
|
||||||
* libsharp is free software; you can redistribute it and/or modify
|
* libsharp2 is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* libsharp is distributed in the hope that it will be useful,
|
* libsharp2 is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with libsharp; if not, write to the Free Software
|
* along with libsharp2; if not, write to the Free Software
|
||||||
* 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 */
|
/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
|
|
||||||
/*! \file sharp_core_inc.c
|
/*! \file sharp_core_inc.c
|
||||||
* Computational core
|
* Computational core
|
||||||
|
@ -37,10 +37,10 @@
|
||||||
#include <complex.h>
|
#include <complex.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "libsharp/sharp_vecsupport.h"
|
#include "libsharp2/sharp_vecsupport.h"
|
||||||
#include "libsharp/sharp.h"
|
#include "libsharp2/sharp.h"
|
||||||
#include "libsharp/sharp_internal.h"
|
#include "libsharp2/sharp_internal.h"
|
||||||
#include "libsharp/sharp_utils.h"
|
#include "libsharp2/sharp_utils.h"
|
||||||
|
|
||||||
#pragma GCC visibility push(hidden)
|
#pragma GCC visibility push(hidden)
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of libsharp.
|
* This file is part of libsharp2.
|
||||||
*
|
*
|
||||||
* libsharp is free software; you can redistribute it and/or modify
|
* libsharp2 is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* libsharp is distributed in the hope that it will be useful,
|
* libsharp2 is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with libsharp; if not, write to the Free Software
|
* along with libsharp2; if not, write to the Free Software
|
||||||
* 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 */
|
/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
|
|
||||||
/*! \file sharp_cxx.h
|
/*! \file sharp_cxx.h
|
||||||
* Spherical transform library
|
* Spherical transform library
|
||||||
|
@ -25,13 +25,13 @@
|
||||||
* \author Martin Reinecke
|
* \author Martin Reinecke
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SHARP_CXX_H
|
#ifndef SHARP2_CXX_H
|
||||||
#define SHARP_CXX_H
|
#define SHARP2_CXX_H
|
||||||
|
|
||||||
#include <complex>
|
#include <complex>
|
||||||
#include "libsharp/sharp.h"
|
#include "libsharp2/sharp.h"
|
||||||
#include "libsharp/sharp_geomhelpers.h"
|
#include "libsharp2/sharp_geomhelpers.h"
|
||||||
#include "libsharp/sharp_almhelpers.h"
|
#include "libsharp2/sharp_almhelpers.h"
|
||||||
|
|
||||||
class sharp_base
|
class sharp_base
|
||||||
{
|
{
|
|
@ -1,22 +1,22 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of libsharp.
|
* This file is part of libsharp2.
|
||||||
*
|
*
|
||||||
* libsharp is free software; you can redistribute it and/or modify
|
* libsharp2 is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* libsharp is distributed in the hope that it will be useful,
|
* libsharp2 is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with libsharp; if not, write to the Free Software
|
* along with libsharp2; if not, write to the Free Software
|
||||||
* 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 */
|
/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
|
|
||||||
/*! \file sharp_geomhelpers.c
|
/*! \file sharp_geomhelpers.c
|
||||||
* Spherical transform library
|
* Spherical transform library
|
||||||
|
@ -26,10 +26,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "libsharp/sharp_geomhelpers.h"
|
#include "libsharp2/sharp_geomhelpers.h"
|
||||||
#include "libsharp/sharp_legendre_roots.h"
|
#include "libsharp2/sharp_legendre_roots.h"
|
||||||
#include "libsharp/sharp_utils.h"
|
#include "libsharp2/sharp_utils.h"
|
||||||
#include "pocketfft/pocketfft.h"
|
#include "libsharp2/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,
|
||||||
const int *rings, const double *weight, sharp_geom_info **geom_info)
|
const int *rings, const double *weight, sharp_geom_info **geom_info)
|
|
@ -1,22 +1,22 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of libsharp.
|
* This file is part of libsharp2.
|
||||||
*
|
*
|
||||||
* libsharp is free software; you can redistribute it and/or modify
|
* libsharp2 is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* libsharp is distributed in the hope that it will be useful,
|
* libsharp2 is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with libsharp; if not, write to the Free Software
|
* along with libsharp2; if not, write to the Free Software
|
||||||
* 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 */
|
/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
|
|
||||||
/*! \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
|
||||||
|
@ -25,10 +25,10 @@
|
||||||
* \author Martin Reinecke
|
* \author Martin Reinecke
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SHARP_GEOMHELPERS_H
|
#ifndef SHARP2_GEOMHELPERS_H
|
||||||
#define SHARP_GEOMHELPERS_H
|
#define SHARP2_GEOMHELPERS_H
|
||||||
|
|
||||||
#include "libsharp/sharp.h"
|
#include "libsharp2/sharp.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
|
@ -1,22 +1,22 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of libsharp.
|
* This file is part of libsharp2.
|
||||||
*
|
*
|
||||||
* libsharp is free software; you can redistribute it and/or modify
|
* libsharp2 is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* libsharp is distributed in the hope that it will be useful,
|
* libsharp2 is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with libsharp; if not, write to the Free Software
|
* along with libsharp2; if not, write to the Free Software
|
||||||
* 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 */
|
/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
|
|
||||||
/*! \file sharp_internal.h
|
/*! \file sharp_internal.h
|
||||||
* Internally used functionality for the spherical transform library.
|
* Internally used functionality for the spherical transform library.
|
||||||
|
@ -25,16 +25,16 @@
|
||||||
* \author Martin Reinecke \author Dag Sverre Seljebotn
|
* \author Martin Reinecke \author Dag Sverre Seljebotn
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SHARP_INTERNAL_H
|
#ifndef SHARP2_INTERNAL_H
|
||||||
#define SHARP_INTERNAL_H
|
#define SHARP2_INTERNAL_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#error This header file cannot be included from C++, only from C
|
#error This header file cannot be included from C++, only from C
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <complex.h>
|
#include <complex.h>
|
||||||
#include "libsharp/sharp.h"
|
#include "libsharp2/sharp.h"
|
||||||
#include "libsharp/sharp_ylmgen_c.h"
|
#include "libsharp2/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 "libsharp/sharp_legendre_roots.h"
|
#include "libsharp2/sharp_legendre_roots.h"
|
||||||
#include "libsharp/sharp_utils.h"
|
#include "libsharp2/sharp_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; }
|
|
@ -1,22 +1,22 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of libsharp.
|
* This file is part of libsharp2.
|
||||||
*
|
*
|
||||||
* libsharp is free software; you can redistribute it and/or modify
|
* libsharp2 is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* libsharp is distributed in the hope that it will be useful,
|
* libsharp2 is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with libsharp; if not, write to the Free Software
|
* along with libsharp2; if not, write to the Free Software
|
||||||
* 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 */
|
/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
|
|
||||||
/*! \file sharp_legendre_roots.h
|
/*! \file sharp_legendre_roots.h
|
||||||
*
|
*
|
||||||
|
@ -24,8 +24,8 @@
|
||||||
* \author Martin Reinecke
|
* \author Martin Reinecke
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SHARP_LEGENDRE_ROOTS_H
|
#ifndef SHARP2_LEGENDRE_ROOTS_H
|
||||||
#define SHARP_LEGENDRE_ROOTS_H
|
#define SHARP2_LEGENDRE_ROOTS_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
|
@ -1,22 +1,22 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of libsharp.
|
* This file is part of libsharp2.
|
||||||
*
|
*
|
||||||
* libsharp is free software; you can redistribute it and/or modify
|
* libsharp2 is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* libsharp is distributed in the hope that it will be useful,
|
* libsharp2 is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with libsharp; if not, write to the Free Software
|
* along with libsharp2; if not, write to the Free Software
|
||||||
* 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 */
|
/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
|
|
||||||
/*! \file sharp_mpi.c
|
/*! \file sharp_mpi.c
|
||||||
* Functionality only needed for MPI-parallel transforms
|
* Functionality only needed for MPI-parallel transforms
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
#ifdef USE_MPI
|
#ifdef USE_MPI
|
||||||
|
|
||||||
#include "libsharp/sharp_mpi.h"
|
#include "libsharp2/sharp_mpi.h"
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
|
@ -1,22 +1,22 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of libsharp.
|
* This file is part of libsharp2.
|
||||||
*
|
*
|
||||||
* libsharp is free software; you can redistribute it and/or modify
|
* libsharp2 is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* libsharp is distributed in the hope that it will be useful,
|
* libsharp2 is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with libsharp; if not, write to the Free Software
|
* along with libsharp2; if not, write to the Free Software
|
||||||
* 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 */
|
/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
|
|
||||||
/*! \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.
|
||||||
|
@ -29,13 +29,13 @@
|
||||||
#define SHARP_MPI_H
|
#define SHARP_MPI_H
|
||||||
|
|
||||||
#include <mpi.h>
|
#include <mpi.h>
|
||||||
#include "libsharp/sharp.h"
|
#include "libsharp2/sharp.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*! Performs an MPI parallel libsharp SHT job. The interface deliberately does
|
/*! Performs an MPI parallel libsharp2 SHT job. The interface deliberately does
|
||||||
not use the C99 "complex" data type, in order to be callable from C89 and C++.
|
not use the C99 "complex" data type, in order to be callable from C89 and C++.
|
||||||
\param comm the MPI communicator to be used for this SHT
|
\param comm the MPI communicator to be used for this SHT
|
||||||
\param type the type of SHT
|
\param type the type of SHT
|
|
@ -1,22 +1,22 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of libsharp.
|
* This file is part of libsharp2.
|
||||||
*
|
*
|
||||||
* libsharp is free software; you can redistribute it and/or modify
|
* libsharp2 is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* libsharp is distributed in the hope that it will be useful,
|
* libsharp2 is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with libsharp; if not, write to the Free Software
|
* along with libsharp2; if not, write to the Free Software
|
||||||
* 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 */
|
/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Convenience functions
|
* Convenience functions
|
||||||
|
@ -26,8 +26,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "libsharp/sharp_utils.h"
|
#include "libsharp2/sharp_utils.h"
|
||||||
|
|
||||||
|
#pragma GCC visibility push(hidden)
|
||||||
void sharp_fail_ (const char *file, int line, const char *func, const char *msg)
|
void sharp_fail_ (const char *file, int line, const char *func, const char *msg)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"%s, %i (%s):\n%s\n",file,line,func,msg);
|
fprintf(stderr,"%s, %i (%s):\n%s\n",file,line,func,msg);
|
||||||
|
@ -46,9 +47,11 @@ static size_t manipsize(size_t sz)
|
||||||
if (((sz+overhead)%critical_stride)>(2*cacheline)) return sz;
|
if (((sz+overhead)%critical_stride)>(2*cacheline)) return sz;
|
||||||
return sz+2*cacheline;
|
return sz+2*cacheline;
|
||||||
}
|
}
|
||||||
|
#pragma GCC visibility pop
|
||||||
|
|
||||||
#ifdef __SSE__
|
#ifdef __SSE__
|
||||||
#include <xmmintrin.h>
|
#include <xmmintrin.h>
|
||||||
|
#pragma GCC visibility push(hidden)
|
||||||
void *sharp_malloc_ (size_t sz)
|
void *sharp_malloc_ (size_t sz)
|
||||||
{
|
{
|
||||||
void *res;
|
void *res;
|
||||||
|
@ -59,7 +62,9 @@ void *sharp_malloc_ (size_t sz)
|
||||||
}
|
}
|
||||||
void sharp_free_ (void *ptr)
|
void sharp_free_ (void *ptr)
|
||||||
{ if ((ptr)!=NULL) _mm_free(ptr); }
|
{ if ((ptr)!=NULL) _mm_free(ptr); }
|
||||||
|
#pragma GCC visibility pop
|
||||||
#else
|
#else
|
||||||
|
#pragma GCC visibility push(hidden)
|
||||||
void *sharp_malloc_ (size_t sz)
|
void *sharp_malloc_ (size_t sz)
|
||||||
{
|
{
|
||||||
void *res;
|
void *res;
|
||||||
|
@ -70,6 +75,7 @@ void *sharp_malloc_ (size_t sz)
|
||||||
}
|
}
|
||||||
void sharp_free_ (void *ptr)
|
void sharp_free_ (void *ptr)
|
||||||
{ if ((ptr)!=NULL) free(ptr); }
|
{ if ((ptr)!=NULL) free(ptr); }
|
||||||
|
#pragma GCC visibility pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined (_OPENMP)
|
#if defined (_OPENMP)
|
||||||
|
@ -83,6 +89,7 @@ void sharp_free_ (void *ptr)
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#pragma GCC visibility push(hidden)
|
||||||
double sharp_wallTime(void)
|
double sharp_wallTime(void)
|
||||||
{
|
{
|
||||||
#if defined (_OPENMP)
|
#if defined (_OPENMP)
|
||||||
|
@ -106,3 +113,4 @@ double sharp_wallTime(void)
|
||||||
return t.tv_sec + 1e-6*t.tv_usec;
|
return t.tv_sec + 1e-6*t.tv_usec;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#pragma GCC visibility pop
|
|
@ -1,22 +1,22 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of libsharp.
|
* This file is part of libsharp2.
|
||||||
*
|
*
|
||||||
* libsharp is free software; you can redistribute it and/or modify
|
* libsharp2 is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* libsharp is distributed in the hope that it will be useful,
|
* libsharp2 is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with libsharp; if not, write to the Free Software
|
* along with libsharp2; if not, write to the Free Software
|
||||||
* 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 */
|
/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
|
|
||||||
/* \file sharp_vecsupport.h
|
/* \file sharp_vecsupport.h
|
||||||
* Convenience functions for vector arithmetics
|
* Convenience functions for vector arithmetics
|
||||||
|
@ -25,8 +25,8 @@
|
||||||
* Author: Martin Reinecke
|
* Author: Martin Reinecke
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SHARP_VECSUPPORT_H
|
#ifndef SHARP2_VECSUPPORT_H
|
||||||
#define SHARP_VECSUPPORT_H
|
#define SHARP2_VECSUPPORT_H
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of libsharp.
|
* This file is part of libsharp2.
|
||||||
*
|
*
|
||||||
* libsharp is free software; you can redistribute it and/or modify
|
* libsharp2 is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* libsharp is distributed in the hope that it will be useful,
|
* libsharp2 is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with libsharp; if not, write to the Free Software
|
* along with libsharp2; if not, write to the Free Software
|
||||||
* 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 */
|
/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Helper code for efficient calculation of Y_lm(theta,phi=0)
|
* Helper code for efficient calculation of Y_lm(theta,phi=0)
|
||||||
|
@ -27,8 +27,8 @@
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "libsharp/sharp_ylmgen_c.h"
|
#include "libsharp2/sharp_ylmgen_c.h"
|
||||||
#include "libsharp/sharp_utils.h"
|
#include "libsharp2/sharp_utils.h"
|
||||||
|
|
||||||
#pragma GCC visibility push(hidden)
|
#pragma GCC visibility push(hidden)
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of libsharp.
|
* This file is part of libsharp2.
|
||||||
*
|
*
|
||||||
* libsharp is free software; you can redistribute it and/or modify
|
* libsharp2 is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* libsharp is distributed in the hope that it will be useful,
|
* libsharp2 is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with libsharp; if not, write to the Free Software
|
* along with libsharp2; if not, write to the Free Software
|
||||||
* 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 */
|
/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
|
|
||||||
/*! \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,8 +25,8 @@
|
||||||
* \author Martin Reinecke
|
* \author Martin Reinecke
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SHARP_YLMGEN_C_H
|
#ifndef SHARP2_YLMGEN_C_H
|
||||||
#define SHARP_YLMGEN_C_H
|
#define SHARP2_YLMGEN_C_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
|
@ -1,25 +1,25 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of libsharp.
|
* This file is part of libsharp2.
|
||||||
*
|
*
|
||||||
* libsharp is free software; you can redistribute it and/or modify
|
* libsharp2 is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* libsharp is distributed in the hope that it will be useful,
|
* libsharp2 is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with libsharp; if not, write to the Free Software
|
* along with libsharp2; if not, write to the Free Software
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*
|
*
|
||||||
* For more information about HEALPix, see http://healpix.sourceforge.net
|
* For more information about HEALPix, see http://healpix.sourceforge.net
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* libsharp is being developed at the Max-Planck-Institut fuer Astrophysik
|
* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -34,8 +34,8 @@
|
||||||
#include <complex>
|
#include <complex>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "libsharp/sharp_cxx.h"
|
#include "libsharp2/sharp_cxx.h"
|
||||||
#include "libsharp/sharp_legendre_roots.h"
|
#include "libsharp2/sharp_legendre_roots.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@ a_d_c GL_thetas(int64_t nlat)
|
||||||
|
|
||||||
|
|
||||||
const char *pysharp_DS = R"""(
|
const char *pysharp_DS = R"""(
|
||||||
Python interface for libsharp
|
Python interface for libsharp2
|
||||||
|
|
||||||
All angles are interpreted as radians.
|
All angles are interpreted as radians.
|
||||||
The theta coordinate is measured as co-latitude, ranging from 0 (North Pole)
|
The theta coordinate is measured as co-latitude, ranging from 0 (North Pole)
|
||||||
|
|
|
@ -59,7 +59,7 @@ def get_extension_modules():
|
||||||
|
|
||||||
setup(name='pysharp',
|
setup(name='pysharp',
|
||||||
version='0.0.1',
|
version='0.0.1',
|
||||||
description='Python bindings for libsharp',
|
description='Python bindings for libsharp2',
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
author='Martin Reinecke',
|
author='Martin Reinecke',
|
||||||
author_email='martin@mpa-garching.mpg.de',
|
author_email='martin@mpa-garching.mpg.de',
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
./sharp_testsuite acctest
|
./sharp2_testsuite acctest
|
||||||
|
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
/*
|
/*
|
||||||
* This file is part of libsharp.
|
* This file is part of libsharp2.
|
||||||
*
|
*
|
||||||
* libsharp is free software; you can redistribute it and/or modify
|
* libsharp2 is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* libsharp is distributed in the hope that it will be useful,
|
* libsharp2 is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with libsharp; if not, write to the Free Software
|
* along with libsharp2; if not, write to the Free Software
|
||||||
* 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 */
|
/* libsharp2 is being developed at the Max-Planck-Institut fuer Astrophysik */
|
||||||
|
|
||||||
/* \file sharp_testsuite.c
|
/* \file sharp_testsuite.c
|
||||||
*
|
*
|
||||||
|
@ -29,15 +29,16 @@
|
||||||
#include <complex.h>
|
#include <complex.h>
|
||||||
#ifdef USE_MPI
|
#ifdef USE_MPI
|
||||||
#include "mpi.h"
|
#include "mpi.h"
|
||||||
#include "libsharp/sharp_mpi.h"
|
#include "libsharp2/sharp_mpi.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
#include <omp.h>
|
#include <omp.h>
|
||||||
#endif
|
#endif
|
||||||
#include "libsharp/sharp.h"
|
#include "libsharp2/sharp.h"
|
||||||
#include "libsharp/sharp_geomhelpers.h"
|
#include "libsharp2/sharp_geomhelpers.h"
|
||||||
#include "libsharp/sharp_almhelpers.h"
|
#include "libsharp2/sharp_almhelpers.h"
|
||||||
#include "libsharp/sharp_utils.h"
|
#include "libsharp2/sharp_utils.h"
|
||||||
|
#include "libsharp2/sharp_utils.c"
|
||||||
#include "test/memusage.h"
|
#include "test/memusage.h"
|
||||||
|
|
||||||
static void OpenMP_status(void)
|
static void OpenMP_status(void)
|
Loading…
Add table
Add a link
Reference in a new issue