Main Page | Data Structures | File List | Globals

intercomm.h File Reference

Go to the source code of this file.

Data Structures

struct  decomp_TREE
struct  IC_Desc
struct  IC_Program
struct  IC_Region
struct  IC_Sched

Typedefs

typedef decomp_TREE IC_Tree

Functions

IC_ProgramIC_Init (char *name, int tasks, int rank)
IC_ProgramIC_Wait (char *name, int tasks)
int IC_Sync (IC_Program *myprog, IC_Program *prog)
IC_DescIC_Create_bdecomp_desc (int ndims, int *blocks, int *tasks, int count)
IC_DescIC_Create_ttable_desc (int *globals, int *locals, int *tasks, int count)
IC_TreeIC_Create_bdecomp_tree ()
void IC_Section (IC_Tree *root, int dim, int count, int *indices)
void IC_Partition (IC_Tree *root, int dim, int *block, int count, int *indices)
IC_DescIC_Verify_bdecomp_tree (IC_Tree *root, int ndims, int *size, int *tasks, int count)
IC_RegionIC_Create_block_region (int ndims, int *lower, int *upper, int *stride)
IC_RegionIC_Create_enum_region (int *indices, int count)
IC_SchedIC_Compute_schedule (IC_Program *myprog, IC_Program *prog, IC_Desc *desc, IC_Region **region_set, int set_size)
int IC_Send_TYPE (IC_Program *to, IC_Sched *sched, TYPE *data, int tag)
int IC_Recv_TYPE (IC_Program *from, IC_Sched *sched, TYPE *data, int tag)
void IC_Free_sched (IC_Sched *sched)
void IC_Free_region (IC_Region *region)
void IC_Free_desc (IC_Desc *desc)
void IC_Free_program (IC_Program *prog)
void IC_Quit (IC_Program *myprog)
void IC_Print_error (char *msg)


Detailed Description

This is the public interface of InterComm.

Author:
Christian Hansen (chansen@cs.umd.edu) University of Maryland, College Park

Typedef Documentation

typedef struct decomp_TREE IC_Tree
 

A partial decomposition descriptor


Function Documentation

IC_Sched* IC_Compute_schedule IC_Program myprog,
IC_Program prog,
IC_Desc desc,
IC_Region **  region_set,
int  set_size
 

Compute a schedule for the given regions

Parameters:
myprog a handle to this program
prog a handle to the other program
desc a decomposition descriptor
region_set a list of regions
set_size the number of regions
Returns:
the communication schedule

IC_Desc* IC_Create_bdecomp_desc int  ndims,
int *  blocks,
int *  tasks,
int  count
 

Create a block decomposition

Parameters:
ndims the number of dimensions
blocks an array of block bound specifications
tasks the task assignments for each block
count the number of blocks
Returns:
the decomposition descriptor

IC_Tree* IC_Create_bdecomp_tree  ) 
 

Allocate a partial decomposition

Returns:
the partial descriptor

IC_Region* IC_Create_block_region int  ndims,
int *  lower,
int *  upper,
int *  stride
 

Allocate a block region structure

Parameters:
ndims the number of dimensions
lower the lower bounds
upper the upper bounds
stride the stride
Returns:
the array region

IC_Region* IC_Create_enum_region int *  indices,
int  count
 

Allocate an enumeration region structure

Parameters:
indices a list of global indices
count the number of indices
Returns:
the array region

IC_Desc* IC_Create_ttable_desc int *  globals,
int *  locals,
int *  tasks,
int  count
 

Create a translation table

Parameters:
globals a list of global indices
locals the local index for each global index
tasks the task assignment for each global index
count the number of global indices
Returns:
the decomposition descriptor

void IC_Free_desc IC_Desc desc  ) 
 

Frees a descriptor

Parameters:
desc an array partitioning descriptor

void IC_Free_program IC_Program prog  ) 
 

Fress a program handle

Parameters:
prog a program handle

void IC_Free_region IC_Region region  ) 
 

Frees a region

Parameters:
region an array region

void IC_Free_sched IC_Sched sched  ) 
 

Frees a schedule

Parameters:
sched a communication schedule

IC_Program* IC_Init char *  name,
int  tasks,
int  rank
 

Initialize the communication library

Parameters:
name a unique program name
tasks the number of tasks in this program
rank the rank of this task
Returns:
a handle for this program

void IC_Partition IC_Tree root,
int  dim,
int *  block,
int  count,
int *  indices
 

Create a partition for a partial descriptor

Parameters:
the partial descriptor
the dimension to partition
the block to partition
the number of partitions
the upper bounding index for each partition
Returns:
an array of partial descriptors which can then be partitioned further

void IC_Print_error char *  msg  ) 
 

Prints an error message for the last call that failed

Parameters:
msg a message that will be prepended to the internal error message

void IC_Quit IC_Program myprog  ) 
 

Frees up internal data structures and free the program handle for this program

Parameters:
myprog the handle for this program

int IC_Recv_TYPE IC_Program from,
IC_Sched sched,
TYPE *  data,
int  tag
 

Receive a region from a program. There is a receive call for each C TYPE (char, short, int, long, float, double).

  • int IC_Recv_char(IC_Program* from, IC_Sched* sched, char* data, int tag)
  • int IC_Recv_short(IC_Program* from, IC_Sched* sched, short* data, int tag)
  • int IC_Recv_int(IC_Program* from, IC_Sched* sched, int* data, int tag)
  • int IC_Recv_long(IC_Program* from, IC_Sched* sched, long* data, int tag)
  • int IC_Recv_float(IC_Program* from, IC_Sched* sched, float* data, int tag)
  • int IC_Recv_double(IC_Program* from, IC_Sched* sched, double* data, int tag)
    Parameters:
    from the sending program
    sched the communication schedule
    data the local portion of the global array
    tag a message tag
    Returns:
    status

void IC_Section IC_Tree root,
int  dim,
int  count,
int *  indices
 

Create a partition for a partial descriptor

Parameters:
the partial descriptor
the dimension to partition
the number of partitions
the upper bounding index for each partition

int IC_Send_TYPE IC_Program to,
IC_Sched sched,
TYPE *  data,
int  tag
 

Send a region to another program. There is a send call for each C TYPE (char, short, int, long, float, double).

  • int IC_Send_char(IC_Program* to, IC_Sched* sched, char* data, int tag)
  • int IC_Send_short(IC_Program* to, IC_Sched* sched, short* data, int tag)
  • int IC_Send_int(IC_Program* to, IC_Sched* sched, int* data, int tag)
  • int IC_Send_long(IC_Program* to, IC_Sched* sched, long* data, int tag)
  • int IC_Send_float(IC_Program* to, IC_Sched* sched, float* data, int tag)
  • int IC_Send_double(IC_Program* to, IC_Sched* sched, double* data, int tag)
    Parameters:
    to the receiving program
    sched the communication schedule
    data the local portion of the global array
    tag a message tag
    Returns:
    status

int IC_Sync IC_Program myprog,
IC_Program prog
 

Synchronizes two programs

Parameters:
myprog a handle to this program
prog a handle to the other program
Returns:
status

IC_Desc* IC_Verify_bdecomp_tree IC_Tree root,
int  ndims,
int *  size,
int *  tasks,
int  count
 

Verify a partial descriptor and generate a complete descriptor

Parameters:
the partial descriptor
the number of dimensions
the size of the global array
the task assignments for each block
the number of blocks
Returns:
the decomposition descriptor

IC_Program* IC_Wait char *  name,
int  tasks
 

Contact another program

Parameters:
name the name of the other program (as given in its IC_Init call)
tasks the number of tasks in the other program
Returns:
a handle for the other program


Generated on Mon Jan 24 01:20:04 2005 for InterComm by doxygen 1.3.5