ソースを参照

- Add missing prototypes
- Add missing arguments for the starpu_bound_compute function
- Remove some unused variables

Cédric Augonnet 14 年 前
コミット
447e86b623
共有4 個のファイルを変更した10 個の追加9 個の削除を含む
  1. 3 3
      examples/lu/lu_example.c
  2. 6 0
      examples/lu/xlu.h
  3. 0 2
      examples/lu/xlu_implicit_pivot.c
  4. 1 4
      examples/lu/xlu_kernels.c

+ 3 - 3
examples/lu/lu_example.c

@@ -21,7 +21,7 @@
 #include <math.h>
 #include <starpu.h>
 #include <starpu_profiling.h>
-
+#include <starpu_bound.h>
 #include "xlu.h"
 #include "xlu_kernels.h"
 
@@ -191,7 +191,7 @@ static double frobenius_norm(TYPE *v, unsigned n)
 	return sqrt(sum2);
 }
 
-static pivot_saved_matrix(unsigned *ipiv)
+static void pivot_saved_matrix(unsigned *ipiv)
 {
 	unsigned k;
 	for (k = 0; k < size; k++)
@@ -336,7 +336,7 @@ int main(int argc, char **argv)
 			starpu_bound_print_lp(f);
 			fprintf(stderr,"system printed to lu.pl\n");
 		} else {
-			starpu_bound_compute(&min);
+			starpu_bound_compute(&min, NULL, 0);
 			if (min != 0.)
 				fprintf(stderr, "theoretical min: %lf ms\n", min);
 		}

+ 6 - 0
examples/lu/xlu.h

@@ -17,6 +17,8 @@
 #ifndef __XLU_H__
 #define __XLU_H__
 
+#include <sys/time.h>
+
 /* for STARPU_USE_CUDA */
 #include <starpu_config.h>
 #include <starpu.h>
@@ -107,4 +109,8 @@ struct piv_s {
 	unsigned last; /* last element */
 };
 
+void STARPU_LU(lu_decomposition)(TYPE *matA, unsigned size, unsigned ld, unsigned nblocks);
+void STARPU_LU(lu_decomposition_pivot_no_stride)(TYPE **matA, unsigned *ipiv, unsigned size, unsigned ld, unsigned nblocks);
+void STARPU_LU(lu_decomposition_pivot)(TYPE *matA, unsigned *ipiv, unsigned size, unsigned ld, unsigned nblocks);
+
 #endif // __XLU_H__

+ 0 - 2
examples/lu/xlu_implicit_pivot.c

@@ -137,8 +137,6 @@ static double dw_codelet_facto_pivot(starpu_data_handle *dataAp,
 	struct timeval start;
 	struct timeval end;
 
-	struct starpu_task *entry_task = NULL;
-
 	gettimeofday(&start, NULL);
 
 	/* create all the DAG nodes */

+ 1 - 4
examples/lu/xlu_kernels.c

@@ -383,8 +383,6 @@ static inline void STARPU_LU(common_u11_pivot)(void *descr[],
 	unsigned *ipiv = piv->piv;
 	unsigned first = piv->first;
 
-	int i,j;
-
 	switch (s) {
 		case 0:
 			for (z = 0; z < nx; z++)
@@ -512,12 +510,11 @@ static inline void STARPU_LU(common_pivot)(void *descr[],
 	unsigned long nx = STARPU_MATRIX_GET_NX(descr[0]);
 	unsigned long ld = STARPU_MATRIX_GET_LD(descr[0]);
 
-	unsigned row, rowaux;
+	unsigned row;
 
 	struct piv_s *piv = _args;
 	unsigned *ipiv = piv->piv;
 	unsigned first = piv->first;
-	unsigned last = piv->last;
 
 	switch (s) {
 		case 0: