00001 #ifndef PARTITION_H
00002 #define PARTITION_H
00003
00004 #include <stdio.h>
00005 #include "mm_col_distr.h"
00006
00007
00008 #ifdef __cplusplus
00009 extern "C" {
00010 #endif
00011
00015 typedef struct mm_col_i_group{
00017 mm_col_i_zone d;
00019 int hostname;
00021 int core_id;
00023 int group_id;
00025 double time;
00026 } mm_col_i_group;
00027
00030
00031 int factorial( int n );
00032
00033
00034 void re_arrange_i_y(int col, int total_proc, mm_col_i_group *);
00035
00036
00037 unsigned concatenate(unsigned x, unsigned y);
00038
00039
00040 void print(int total_proc, mm_col_i_group *col_group);
00041
00042
00043 int smallest_index(int itr, int *measure_result);
00044
00045
00046 int* smallest_indexes_array(int itr,int *measure_result,int *size);
00047
00048
00049 void group_based_partition(mm_col_i_group *col_group,const int total_proc);
00050
00051
00052 void re_arrange_proc(int q,int i,int *join,int ptr,int *perm_array,mm_col_i_group *col_group,mm_col_i_group *tmp,int col_elem);
00053
00054
00055 int mm_col_i_group_write(FILE* stream, mm_col_i_distrib* idist,mm_col_i_group *col_group);
00056
00057 #ifdef __cplusplus
00058 }
00059 #endif
00060
00061 #endif