소스 검색

doc/tutorial: rename implementation function names for vector_scal example

Nathalie Furmento 12 년 전
부모
커밋
efee41f68e
4개의 변경된 파일13개의 추가작업 그리고 13개의 파일을 삭제
  1. 7 7
      doc/tutorial/vector_scal.c
  2. 2 2
      doc/tutorial/vector_scal_cpu.c
  3. 2 2
      doc/tutorial/vector_scal_cuda.cu
  4. 2 2
      doc/tutorial/vector_scal_opencl.c

+ 7 - 7
doc/tutorial/vector_scal.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  * Copyright (C) 2010-2012  Université de Bordeaux 1
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -26,20 +26,20 @@
 
 #define    NX    2048
 
-extern void scal_cpu_func(void *buffers[], void *_args);
-extern void scal_cuda_func(void *buffers[], void *_args);
-extern void scal_opencl_func(void *buffers[], void *_args);
+extern void vector_scal_cpu(void *buffers[], void *_args);
+extern void vector_scal_cuda(void *buffers[], void *_args);
+extern void vector_scal_opencl(void *buffers[], void *_args);
 
 static struct starpu_codelet cl = {
     /* CPU implementation of the codelet */
-    .cpu_funcs = {scal_cpu_func, NULL},
+    .cpu_funcs = {vector_scal_cpu, NULL},
 #ifdef STARPU_USE_CUDA
     /* CUDA implementation of the codelet */
-    .cuda_funcs = {scal_cuda_func, NULL},
+    .cuda_funcs = {vector_scal_cuda, NULL},
 #endif
 #ifdef STARPU_USE_OPENCL
     /* OpenCL implementation of the codelet */
-    .opencl_funcs = {scal_opencl_func, NULL},
+    .opencl_funcs = {vector_scal_opencl, NULL},
 #endif
     .nbuffers = 1,
     .modes = {STARPU_RW}

+ 2 - 2
doc/tutorial/vector_scal_cpu.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010, 2011  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -18,7 +18,7 @@
 #include <starpu.h>
 
 /* This kernel takes a buffer and scales it by a constant factor */
-void scal_cpu_func(void *buffers[], void *cl_arg)
+void vector_scal_cpu(void *buffers[], void *cl_arg)
 {
     unsigned i;
     float *factor = cl_arg;

+ 2 - 2
doc/tutorial/vector_scal_cuda.cu

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010, 2011  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -24,7 +24,7 @@ static __global__ void vector_mult_cuda(float *val, unsigned n, float factor)
                val[i] *= factor;
 }
 
-extern "C" void scal_cuda_func(void *buffers[], void *_args)
+extern "C" void vector_scal_cuda(void *buffers[], void *_args)
 {
         float *factor = (float *)_args;
 

+ 2 - 2
doc/tutorial/vector_scal_opencl.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2010, 2011  Université de Bordeaux 1
- * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -19,7 +19,7 @@
 
 extern struct starpu_opencl_program programs;
 
-void scal_opencl_func(void *buffers[], void *_args)
+void vector_scal_opencl(void *buffers[], void *_args)
 {
     float *factor = _args;
     int id, devid, err;