• Main Page
  • Classes
  • Files
  • File List
  • File Members

ddv.h

Go to the documentation of this file.
00001 
00042 #ifndef CANDL_DDV_H
00043 # define CANDL_DDV_H
00044 
00045 
00046 # include <stdio.h>
00047 # include <candl/statement.h>
00048 # include <candl/matrix.h>
00049 # include <candl/program.h>
00050 # include <candl/options.h>
00051 # include <candl/dependence.h>
00052 
00053 
00054 
00055 # if defined(__cplusplus)
00056 extern "C"
00057   {
00058 # endif
00059 
00060 
00061 
00062 /******************************************************************************
00063  *                        Dependence Distance structures                      *
00064  ******************************************************************************/
00065 
00085     enum dv_type {
00086       candl_dv_scalar, candl_dv_plus, candl_dv_minus, candl_dv_star, candl_dv_eq
00087     };
00088     typedef enum dv_type e_dv_type;
00089 
00095     struct dv_descriptor {
00096       e_dv_type type;
00097       int value;
00098     };
00099     typedef struct dv_descriptor s_dv_descriptor;
00100 
00105     struct candl_ddv {
00106       int loop_id;
00107       int length;
00108       int deptype;
00109       s_dv_descriptor* data;
00110       struct candl_ddv* next;
00111     };
00112 
00113     typedef struct candl_ddv CandlDDV;
00114 
00115 
00116 
00117 
00118 /******************************************************************************
00119  *                         Memory deallocation function                       *
00120  ******************************************************************************/
00121 
00127 CandlDDV*
00128 candl_ddv_malloc();
00129 
00130 
00136 CandlDDV*
00137 candl_ddv_alloc(int);
00138 
00139 
00145 void
00146 candl_ddv_free(CandlDDV*);
00147 
00148 
00155 void
00156 candl_ddv_set_type_at(CandlDDV*, e_dv_type, int);
00157 
00165 void
00166 candl_ddv_set_value_at(CandlDDV*, int, int);
00167 
00173 void
00174 candl_ddv_set_deptype(CandlDDV*, int);
00175 
00176 
00177 /******************************************************************************
00178  *                          Structure display function                        *
00179  ******************************************************************************/
00180 
00181 
00186 void
00187 candl_ddv_print(FILE*, CandlDDV*);
00188 
00189 
00190 /******************************************************************************
00191  *                            Processing functions                            *
00192  ******************************************************************************/
00193 
00201 CandlDDV*
00202 candl_ddv_extract_in_loop(CandlProgram*, CandlDependence*, int);
00203     
00209 int
00210 candl_loops_are_permutable(CandlProgram* program, CandlDependence* deps,
00211                            int loop_id1, int loop_id2);
00212     
00213 
00214 
00215 # if defined(__cplusplus)
00216   }
00217 # endif
00218 #endif /* define CANDL_DDV_H */
00219 

Generated on Thu Jul 7 2011 11:26:26 for Candl by  doxygen 1.7.1