simplify the interface as much as possible; nicer interfaces

can be added again later
This commit is contained in:
Martin Reinecke 2012-09-17 15:35:38 +02:00
parent 6beb0e027d
commit c459e08b48
12 changed files with 189 additions and 196 deletions

View file

@ -40,68 +40,4 @@
#include "sharp_lowlevel.h"
typedef enum { FLOAT, DOUBLE } sharp_fde;
/*! \internal
Type holding all required information about an SHT job. */
typedef struct
{
sharp_jobtype type;
int spin;
int add_output;
int nmaps, nalm;
sharp_fde fde;
void **map;
void **alm;
complex double *phase;
double *norm_l;
complex double *almtmp;
const sharp_geom_info *ginfo;
const sharp_alm_info *ainfo;
int nv;
double time;
int ntrans;
unsigned long long opcnt;
} sharp_job;
/*! \defgroup jobgroup Functionality for defining and executing SHTs */
/*! \{ */
/*! Initializes \a job with the appropriate parameters to perform the required
SHT.
\param type the type of SHT
\param spin the spin of the quantities to be transformed
\param add_output if 0, the output arrays will be overwritten,
else the result will be added to the output arrays.
\param ntrans the number of simultaneous SHTs
\param alm contains pointers to the a_lm coefficients. If \a spin==0,
alm[0] points to the a_lm of the first SHT, alm[1] to those of the second
etc. If \a spin>0, alm[0] and alm[1] point to the a_lm of the first SHT,
alm[2] and alm[3] to those of the second, etc.
\param map contains pointers to the maps. If \a spin==0,
map[0] points to the map of the first SHT, map[1] to that of the second
etc. If \a spin>0, map[0] and map[1] point to the maps of the first SHT,
map[2] and map[3] to those of the second, etc.
\note \a map and \a a_lm must not be de-allocated until after the last call of
sharp_execute_job()! This is because the library does not copy the input
data, but only stores the pointers to the supplied maps and a_lm. */
void sharpd_build_job (sharp_job *job, sharp_jobtype type, int spin,
int add_output, complex double **alm, double **map,
const sharp_geom_info *geom_info, const sharp_alm_info *alm_info, int ntrans);
void sharps_build_job (sharp_job *job, sharp_jobtype type, int spin,
int add_output, complex float **alm, float **map,
const sharp_geom_info *geom_info, const sharp_alm_info *alm_info, int ntrans);
/*! Execute the SHT job previously constructed by sharpd_build_job() or
sharps_build_job(). */
void sharp_execute_job (sharp_job *job);
/*! \} */
/*! Internal */
int sharp_get_nv_max (void);
/*! Internal */
int sharp_nv_oracle (sharp_jobtype type, int spin, int ntrans);
#endif