Browse Source

doc/tutorial: rename implementation function names for vector_scal example

Nathalie Furmento 12 years ago
parent
commit
efee41f68e

+ 7 - 7
doc/tutorial/vector_scal.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* 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
  * Copyright (C) 2010-2012  Université de Bordeaux 1
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify
@@ -26,20 +26,20 @@
 
 
 #define    NX    2048
 #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 = {
 static struct starpu_codelet cl = {
     /* CPU implementation of the codelet */
     /* CPU implementation of the codelet */
-    .cpu_funcs = {scal_cpu_func, NULL},
+    .cpu_funcs = {vector_scal_cpu, NULL},
 #ifdef STARPU_USE_CUDA
 #ifdef STARPU_USE_CUDA
     /* CUDA implementation of the codelet */
     /* CUDA implementation of the codelet */
-    .cuda_funcs = {scal_cuda_func, NULL},
+    .cuda_funcs = {vector_scal_cuda, NULL},
 #endif
 #endif
 #ifdef STARPU_USE_OPENCL
 #ifdef STARPU_USE_OPENCL
     /* OpenCL implementation of the codelet */
     /* OpenCL implementation of the codelet */
-    .opencl_funcs = {scal_opencl_func, NULL},
+    .opencl_funcs = {vector_scal_opencl, NULL},
 #endif
 #endif
     .nbuffers = 1,
     .nbuffers = 1,
     .modes = {STARPU_RW}
     .modes = {STARPU_RW}

+ 2 - 2
doc/tutorial/vector_scal_cpu.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
  * Copyright (C) 2010, 2011  Université de Bordeaux 1
  * 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
  * 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
  * it under the terms of the GNU Lesser General Public License as published by
@@ -18,7 +18,7 @@
 #include <starpu.h>
 #include <starpu.h>
 
 
 /* This kernel takes a buffer and scales it by a constant factor */
 /* 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;
     unsigned i;
     float *factor = cl_arg;
     float *factor = cl_arg;

+ 2 - 2
doc/tutorial/vector_scal_cuda.cu

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
  * Copyright (C) 2010, 2011  Université de Bordeaux 1
  * 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
  * 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
  * 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;
                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;
         float *factor = (float *)_args;
 
 

+ 2 - 2
doc/tutorial/vector_scal_opencl.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
  * Copyright (C) 2010, 2011  Université de Bordeaux 1
  * 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
  * 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
  * it under the terms of the GNU Lesser General Public License as published by
@@ -19,7 +19,7 @@
 
 
 extern struct starpu_opencl_program programs;
 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;
     float *factor = _args;
     int id, devid, err;
     int id, devid, err;