浏览代码

perfmodel: only define variable when needed i.e when OpenCL is enabled

Nathalie Furmento 14 年之前
父节点
当前提交
6ca5c57658
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/core/perfmodel/perfmodel_bus.c

+ 1 - 1
src/core/perfmodel/perfmodel_bus.c

@@ -52,7 +52,6 @@ static unsigned was_benchmarked = 0;
 static unsigned ncpus = 0;
 static int ncuda = 0;
 static int nopencl = 0;
-static size_t opencl_size = SIZE;
 
 /* Benchmarking the performance of the bus */
 
@@ -67,6 +66,7 @@ static int opencl_affinity_matrix[STARPU_MAXOPENCLDEVS][MAXCPUS];
 static double opencldev_timing_htod[STARPU_MAXNODES] = {0.0};
 static double opencldev_timing_dtoh[STARPU_MAXNODES] = {0.0};
 static struct dev_timing opencldev_timing_per_cpu[STARPU_MAXNODES*MAXCPUS];
+static size_t opencl_size = SIZE;
 #endif
 
 #if defined(STARPU_USE_CUDA) || defined(STARPU_USE_OPENCL)