MIDAPACK - MIcrowave Data Analysis PACKage  1.1b
Parallel software tools for high performance CMB DA analysis
butterfly_new.c File Reference

Go to the source code of this file.

Functions

int butterfly_reduce (int **R, int *nR, int nRmax, int **S, int *nS, int nSmax, double *val, int steps, MPI_Comm comm)
 
int butterfly_reshuffle (int **R, int *nR, int nRmax, int **S, int *nS, int nSmax, double *val, int steps, MPI_Comm comm)
 
int butterfly_reduce_init (int *indices, int count, int **R, int *nR, int **S, int *nS, int **com_indices, int *com_count, int steps, MPI_Comm comm)
 
int butterfly_reshuffle_init (int *indices_in, int count_in, int *indices_out, int count_out, int **R, int *nR, int **S, int *nS, int **com_indices, int *com_count, int steps, MPI_Comm comm)
 
int set_or (int *A1, int n1, int *A2, int n2, int *A1orA2)
 
int set_and (int *A1, int n1, int *A2, int n2, int *A1andA2)
 
int card_or (int *A1, int n1, int *A2, int n2)
 
void m2s (double *mapval, double *submapval, int *subset, int count)
 
void subset2map (int *A, int nA, int *subA, int nsubA)
 
void s2m_sum (double *mapval, double *submapval, int *subset, int count)
 
void s2m_copy (double *mapval, double *submapval, int *subset, int count)
 

Function Documentation

◆ butterfly_reduce()

int butterfly_reduce ( int **  R,
int *  nR,
int  nRmax,
int **  S,
int *  nS,
int  nSmax,
double *  val,
int  steps,
MPI_Comm  comm 
)

Definition at line 426 of file butterfly_new.c.

◆ butterfly_reshuffle()

int butterfly_reshuffle ( int **  R,
int *  nR,
int  nRmax,
int **  S,
int *  nS,
int  nSmax,
double *  val,
int  steps,
MPI_Comm  comm 
)

Definition at line 478 of file butterfly_new.c.

◆ butterfly_reduce_init()

int butterfly_reduce_init ( int *  indices,
int  count,
int **  R,
int *  nR,
int **  S,
int *  nS,
int **  com_indices,
int *  com_count,
int  steps,
MPI_Comm  comm 
)

Definition at line 30 of file butterfly_new.c.

◆ butterfly_reshuffle_init()

int butterfly_reshuffle_init ( int *  indices_in,
int  count_in,
int *  indices_out,
int  count_out,
int **  R,
int *  nR,
int **  S,
int *  nS,
int **  com_indices,
int *  com_count,
int  steps,
MPI_Comm  comm 
)

Definition at line 211 of file butterfly_new.c.

◆ set_or()

int set_or ( int *  A1,
int  n1,
int *  A2,
int  n2,
int *  A1orA2 
)

Compute $ A1 \cup A_2 $ A1 and A2 should be two ascending ordered sets. It requires the sizes of these two sets, n1 and n2. A1andA2 has to be previouly allocated.

Parameters
n1number of elemnets in A1
A1set of indices
n2number of elemnets in A2
A2set of indices
addressto the set A1orA2
Returns
number of elements in A1orA2

Definition at line 138 of file als.c.

◆ set_and()

int set_and ( int *  A1,
int  n1,
int *  A2,
int  n2,
int *  A1andA2 
)

Compute $ A_1 \cap A_2 $ A1 and A2 should be two monotony sets in ascending order. It requires the sizes of these two sets, n1 and n2. A1andA2 has to be previously allocated.

Parameters
n1number of elemnets in A1
A1set of indices
n2number of elemnets in A2
A2set of indices
addressto the set A1andA2
Returns
number of elements in A1andA2

Definition at line 186 of file als.c.

◆ card_or()

int card_or ( int *  A1,
int  n1,
int *  A2,
int  n2 
)

Compute $ card(A_1 \cup A_2) $ A1 and A2 should be two ascending ordered monotmony sets. of size n1 and n2.

Parameters
n1number of elemnets in A1
A1set of indices
n2number of elemnets in A2
A2set of indices
Returns
size of the union

Definition at line 72 of file als.c.

◆ m2s()

void m2s ( double *  mapval,
double *  submapval,
int *  subset,
int  count 
)

Definition at line 533 of file butterfly_new.c.

◆ subset2map()

void subset2map ( int *  A,
int  nA,
int *  subA,
int  nsubA 
)

Transform a subset into a mapper array Parse a subset and replace element by his index in the larger set. A and subA should be two monotony sets in ascending ordered. subA has to belong to A.

Parameters
Aa set of indices(monotony)
nAnumber of elemnets in A
subAa subset of A(monotony)
nsubAnumber of elemnets in A
Returns
void

Definition at line 237 of file als.c.

◆ s2m_sum()

void s2m_sum ( double *  mapval,
double *  submapval,
int *  subset,
int  count 
)

Definition at line 540 of file butterfly_new.c.

◆ s2m_copy()

void s2m_copy ( double *  mapval,
double *  submapval,
int *  subset,
int  count 
)

Definition at line 546 of file butterfly_new.c.