00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef INC_PASO_PATTERN
00026 #define INC_PASO_PATTERN
00027
00028 #include "Common.h"
00029
00030
00031
00032 #define PATTERN_FORMAT_DEFAULT 0
00033 #define PATTERN_FORMAT_SYM 1
00034 #define PATTERN_FORMAT_OFFSET1 2
00035
00036 typedef struct Paso_Pattern {
00037 int type;
00038 dim_t numOutput;
00039 dim_t numInput;
00040 dim_t len;
00041 index_t* ptr;
00042 index_t* index;
00043 dim_t reference_counter;
00044 } Paso_Pattern;
00045
00046 #define INDEXLIST_LENGTH 85
00047
00048 typedef struct Paso_IndexList {
00049 index_t index[INDEXLIST_LENGTH];
00050 dim_t n;
00051 struct Paso_IndexList *extension;
00052 } Paso_IndexList;
00053
00054
00055
00056 PASO_DLL_API
00057 Paso_Pattern* Paso_Pattern_alloc(int type, dim_t numOutput, dim_t numInput, index_t* ptr, index_t* index);
00058
00059 PASO_DLL_API
00060
00061 PASO_DLL_API
00062 Paso_Pattern* Paso_Pattern_getReference(Paso_Pattern*);
00063
00064 PASO_DLL_API
00065 void Paso_Pattern_free(Paso_Pattern*);
00066
00067 PASO_DLL_API
00068 int Paso_comparIndex(const void *,const void *);
00069
00070 PASO_DLL_API
00071 Paso_Pattern* Paso_Pattern_unrollBlocks(Paso_Pattern*,int, dim_t,dim_t);
00072
00073 PASO_DLL_API
00074 Paso_Pattern* Paso_Pattern_getSubpattern(Paso_Pattern*,dim_t,dim_t,index_t*,index_t*);
00075
00076 PASO_DLL_API
00077 bool_t Paso_Pattern_isEmpty(Paso_Pattern* in);
00078
00079 PASO_DLL_API
00080 void Paso_Pattern_mis(Paso_Pattern* pattern_p, index_t* mis_marker);
00081
00082 PASO_DLL_API
00083 void Paso_Pattern_reduceBandwidth(Paso_Pattern* self,index_t* oldToNew);
00084
00085 PASO_DLL_API
00086 void Paso_Pattern_color(Paso_Pattern* patter, index_t* num_colors, index_t* colorOf);
00087 Paso_Pattern* Paso_Pattern_multiply(int type, Paso_Pattern* A, Paso_Pattern* B);
00088
00089 PASO_DLL_API
00090 Paso_Pattern* Paso_Pattern_binop(int type, Paso_Pattern* A, Paso_Pattern* B);
00091
00092
00093 PASO_DLL_API
00094 void Paso_IndexList_insertIndex(Paso_IndexList*, index_t);
00095
00096 PASO_DLL_API
00097 void Paso_IndexList_toArray(Paso_IndexList*, index_t*, index_t, index_t, index_t);
00098
00099 PASO_DLL_API
00100 dim_t Paso_IndexList_count(Paso_IndexList*, index_t, index_t);
00101
00102 PASO_DLL_API
00103 void Paso_IndexList_free(Paso_IndexList*);
00104
00105 PASO_DLL_API
00106 Paso_Pattern* Paso_IndexList_createPattern(dim_t n0, dim_t n,Paso_IndexList* index_list,index_t range_min,index_t range_max, index_t index_offset);
00107
00108 #endif