Browse Source

doc/doxygen: include copyright in source code but do not display it in doxygen

Nathalie Furmento 12 years ago
parent
commit
3e23307b4d

+ 3 - 3
doc/doxygen/chapters/advanced_examples.doxy

@@ -746,7 +746,7 @@ the CPU binding mask that StarPU chose.
 For instance, using OpenMP (full source is available in
 <c>examples/openmp/vector_scal.c</c>):
 
-\include forkmode.c
+\snippet forkmode.c To be included
 
 Other examples include for instance calling a BLAS parallel CPU implementation
 (see <c>examples/mult/xgemm.c</c>).
@@ -863,7 +863,7 @@ will be able to convert data from one data structure to the other when needed.
 Note that the dmda scheduler is the only one optimized for this interface. The
 user must provide StarPU with conversion codelets:
 
-\include multiformat.c
+\snippet multiformat.c To be included
 
 Kernels can be written almost as for any other interface. Note that
 ::STARPU_MULTIFORMAT_GET_CPU_PTR shall only be used for CPU kernels. CUDA kernels
@@ -1086,7 +1086,7 @@ Similar functions need to be defined to access the different fields of the
 complex interface from a <c>void *</c> pointer to be used within codelet
 implemetations.
 
-\include complex.c
+\snippet complex.c To be included
 
 Complex data interfaces can then be registered to StarPU.
 

+ 3 - 3
doc/doxygen/chapters/basic_examples.doxy

@@ -22,7 +22,7 @@ implementations (for CPU, OpenCL, and/or CUDA), and invoke the task like
 a regular C function.  The example below defines <c>my_task</c> which
 has a single implementation for CPU:
 
-\include hello_pragma.c
+\snippet hello_pragma.c To be included
 
 The code can then be compiled and linked with GCC and the <c>-fplugin</c> flag:
 
@@ -264,7 +264,7 @@ vector_scal (unsigned size, float vector[size], float factor)
 Next, the body of the program, which uses the task defined above, can be
 implemented:
 
-\include hello_pragma2.c
+\snippet hello_pragma2.c To be included
 
 The <c>main</c> function above does several things:
 
@@ -675,7 +675,7 @@ Here is the source of the main application. You can notice that the fields
 define the pointers to the CUDA and OpenCL implementations of the
 task.
 
-\include vector_scal_c.c
+\snippet vector_scal_c.c To be included
 
 \subsection Execution_of_Hybrid_Vector_Scaling Execution of Hybrid Vector Scaling
 

+ 3 - 3
doc/doxygen/chapters/c_extensions.doxy

@@ -322,7 +322,7 @@ automatic variables.
 The following example illustrates use of the <c>heap_allocated</c>
 attribute:
 
-\include cholesky_pragma.c
+\snippet cholesky_pragma.c To be included
 
 \section Conditional_Extensions Using C Extensions Conditionally
 
@@ -344,7 +344,7 @@ supported C extensions.
 The code below illustrates how to define a task and its implementations
 in a way that allows it to be compiled without the GCC plug-in:
 
-\include matmul_pragma.c
+\snippet matmul_pragma.c To be included
 
 The above program is a valid StarPU program when StarPU's GCC plug-in is
 used; it is also a valid sequential program when the plug-in is not
@@ -358,7 +358,7 @@ unable to parse the attribute syntax (In practice, Clang and
 several proprietary compilers implement attributes.), so you may want to
 wrap attributes in macros like this:
 
-\include matmul_pragma2.c
+\snippet matmul_pragma2.c To be included
 
 */
 

+ 19 - 0
doc/doxygen/chapters/code/cholesky_pragma.c

@@ -1,3 +1,21 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2010-2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010-2013  Université de Bordeaux 1
+ *
+ * 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
+ * the Free Software Foundation; either version 2.1 of the License, or (at
+ * your option) any later version.
+ *
+ * StarPU is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * See the GNU Lesser General Public License in COPYING.LGPL for more details.
+ */
+
+//! [To be included]
 extern void cholesky(unsigned nblocks, unsigned size,
                     float mat[nblocks][nblocks][size])
   __attribute__ ((task));
@@ -29,3 +47,4 @@ main (int argc, char *argv[])
 
   return EXIT_SUCCESS;
 }
+//! [To be included]

+ 19 - 0
doc/doxygen/chapters/code/complex.c

@@ -1,6 +1,25 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2010-2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010-2013  Université de Bordeaux 1
+ *
+ * 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
+ * the Free Software Foundation; either version 2.1 of the License, or (at
+ * your option) any later version.
+ *
+ * StarPU is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * See the GNU Lesser General Public License in COPYING.LGPL for more details.
+ */
+
+//! [To be included]
 #define STARPU_COMPLEX_GET_REAL(interface)	\
         (((struct starpu_complex_interface *)(interface))->real)
 #define STARPU_COMPLEX_GET_IMAGINARY(interface)	\
         (((struct starpu_complex_interface *)(interface))->imaginary)
 #define STARPU_COMPLEX_GET_NX(interface)	\
         (((struct starpu_complex_interface *)(interface))->nx)
+//! [To be included]

+ 19 - 0
doc/doxygen/chapters/code/forkmode.c

@@ -1,3 +1,21 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2010-2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010-2013  Université de Bordeaux 1
+ *
+ * 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
+ * the Free Software Foundation; either version 2.1 of the License, or (at
+ * your option) any later version.
+ *
+ * StarPU is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * See the GNU Lesser General Public License in COPYING.LGPL for more details.
+ */
+
+//! [To be included]
 void scal_cpu_func(void *buffers[], void *_args)
 {
     unsigned i;
@@ -20,3 +38,4 @@ static struct starpu_codelet cl =
     .cpu_funcs = {scal_cpu_func, NULL},
     .nbuffers = 1,
 };
+//! [To be included]

+ 19 - 0
doc/doxygen/chapters/code/hello_pragma.c

@@ -1,3 +1,21 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2010-2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010-2013  Université de Bordeaux 1
+ *
+ * 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
+ * the Free Software Foundation; either version 2.1 of the License, or (at
+ * your option) any later version.
+ *
+ * StarPU is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * See the GNU Lesser General Public License in COPYING.LGPL for more details.
+ */
+
+//! [To be included]
 #include <stdio.h>
 
 /* Task declaration.  */
@@ -25,3 +43,4 @@ int main ()
 
   return 0;
 }
+//! [To be included]

+ 20 - 2
doc/doxygen/chapters/code/hello_pragma2.c

@@ -1,5 +1,22 @@
-int
-main (void)
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2010-2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010-2013  Université de Bordeaux 1
+ *
+ * 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
+ * the Free Software Foundation; either version 2.1 of the License, or (at
+ * your option) any later version.
+ *
+ * StarPU is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * See the GNU Lesser General Public License in COPYING.LGPL for more details.
+ */
+
+//! [To be included]
+int main (void)
 {
 #pragma starpu initialize
 
@@ -23,3 +40,4 @@ main (void)
 
   return valid ? EXIT_SUCCESS : EXIT_FAILURE;
 }
+//! [To be included]

+ 19 - 0
doc/doxygen/chapters/code/matmul_pragma.c

@@ -1,3 +1,21 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2010-2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010-2013  Université de Bordeaux 1
+ *
+ * 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
+ * the Free Software Foundation; either version 2.1 of the License, or (at
+ * your option) any later version.
+ *
+ * StarPU is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * See the GNU Lesser General Public License in COPYING.LGPL for more details.
+ */
+
+//! [To be included]
 /* This program is valid, whether or not StarPU's GCC plug-in
    is being used.  */
 
@@ -52,3 +70,4 @@ main (int argc, char *argv[])
 
   return EXIT_SUCCESS;
 }
+//! [To be included]

+ 19 - 0
doc/doxygen/chapters/code/matmul_pragma2.c

@@ -1,3 +1,21 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2010-2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010-2013  Université de Bordeaux 1
+ *
+ * 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
+ * the Free Software Foundation; either version 2.1 of the License, or (at
+ * your option) any later version.
+ *
+ * StarPU is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * See the GNU Lesser General Public License in COPYING.LGPL for more details.
+ */
+
+//! [To be included]
 /* Use the `task' attribute only when StarPU's GCC plug-in
    is available.   */
 #ifdef STARPU_GCC_PLUGIN
@@ -8,3 +26,4 @@
 
 static void matmul (const float *A, const float *B, float *C,
                     unsigned nx, unsigned ny, unsigned nz) __task;
+//! [To be included]

+ 19 - 0
doc/doxygen/chapters/code/multiformat.c

@@ -1,3 +1,21 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2010-2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010-2013  Université de Bordeaux 1
+ *
+ * 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
+ * the Free Software Foundation; either version 2.1 of the License, or (at
+ * your option) any later version.
+ *
+ * StarPU is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * See the GNU Lesser General Public License in COPYING.LGPL for more details.
+ */
+
+//! [To be included]
 #define NX 1024
 struct point array_of_structs[NX];
 starpu_data_handle_t handle;
@@ -39,3 +57,4 @@ struct starpu_multiformat_data_interface_ops format_ops = {
 };
 
 starpu_multiformat_data_register(handle, 0, &array_of_structs, NX, &format_ops);
+//! [To be included]

+ 19 - 0
doc/doxygen/chapters/code/simgrid.c

@@ -1,3 +1,21 @@
+/* StarPU --- Runtime system for heterogeneous multicore architectures.
+ *
+ * Copyright (C) 2010-2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010-2013  Université de Bordeaux 1
+ *
+ * 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
+ * the Free Software Foundation; either version 2.1 of the License, or (at
+ * your option) any later version.
+ *
+ * StarPU is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * See the GNU Lesser General Public License in COPYING.LGPL for more details.
+ */
+
+//! [To be included]
 static struct starpu_codelet cl11 =
 {
 	.cpu_funcs = {chol_cpu_codelet_update_u11, NULL},
@@ -10,3 +28,4 @@ static struct starpu_codelet cl11 =
 	.modes = {STARPU_RW},
 	.model = &chol_model_11
 };
+//! [To be included]

+ 3 - 2
doc/doxygen/chapters/code/vector_scal_c.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010, 2011, 2012, 2013  Centre National de la Recherche Scientifique
+ * Copyright (C) 2010-2013  Centre National de la Recherche Scientifique
  * Copyright (C) 2010-2013  Université de Bordeaux 1
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -15,6 +15,7 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
+//! [To be included]
 /*
  * This example demonstrates how to use StarPU to scale an array by a factor.
  * It shows how to manipulate data with StarPU's data management library.
@@ -124,4 +125,4 @@ int main(int argc, char **argv)
 
     return 0;
 }
-
+//! [To be included]

+ 3 - 0
doc/doxygen/chapters/code/vector_scal_cpu.c

@@ -14,6 +14,8 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
+//! [To be included]
+
 #include <starpu.h>
 #include <xmmintrin.h>
 
@@ -73,3 +75,4 @@ void scal_sse_func(void *buffers[], void *cl_arg)
         }
     }
 }
+//! [To be included]

+ 2 - 1
doc/doxygen/chapters/code/vector_scal_cuda.cu

@@ -14,7 +14,7 @@
  *
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
-
+//! [To be included]
 #include <starpu.h>
 
 static __global__ void vector_mult_cuda(unsigned n, float *val,
@@ -41,4 +41,5 @@ extern "C" void scal_cuda_func(void *buffers[], void *_args)
 
         cudaStreamSynchronize(starpu_cuda_get_local_stream());
 }
+//! [To be included]
 

+ 2 - 0
doc/doxygen/chapters/code/vector_scal_opencl.c

@@ -16,6 +16,7 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
+//! [To be included]
 #include <starpu.h>
 
 extern struct starpu_opencl_program programs;
@@ -68,3 +69,4 @@ void scal_opencl_func(void *buffers[], void *_args)
 
     starpu_opencl_release_kernel(kernel);
 }
+//! [To be included]

+ 2 - 0
doc/doxygen/chapters/code/vector_scal_opencl_codelet.cl

@@ -14,6 +14,7 @@
  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  */
 
+//! [To be included]
 __kernel void vector_mult_opencl(int nx, __global float* val, float factor)
 {
         const int i = get_global_id(0);
@@ -21,3 +22,4 @@ __kernel void vector_mult_opencl(int nx, __global float* val, float factor)
                 val[i] *= factor;
         }
 }
+//! [To be included]

+ 1 - 1
doc/doxygen/chapters/optimize_performance.doxy

@@ -516,6 +516,6 @@ case. Since during simgrid execution, the functions of the codelet are actually
 not called, one can use dummy functions such as the following to still permit
 CUDA or OpenCL execution:
 
-\include simgrid.c
+\snippet simgrid.c To be included
 
 */

+ 5 - 5
doc/doxygen/chapters/scaling-vector-example.doxy

@@ -10,25 +10,25 @@
 
 \section MainApplication Main Application
 
-\include vector_scal_c.c
+\snippet vector_scal_c.c To be included
 
 \section CPUKernel CPU Kernel
 
-\include vector_scal_cpu.c
+\snippet vector_scal_cpu.c To be included
 
 \section CUDAKernel CUDA Kernel
 
-\include vector_scal_cuda.cu
+\snippet vector_scal_cuda.cu To be included
 
 \section OpenCLKernel OpenCL Kernel
 
 \subsection InvokingtheKernel Invoking the Kernel
 
-\include vector_scal_opencl.c
+\snippet vector_scal_opencl.c To be included
 
 \subsection SourceoftheKernel Source of the Kernel
 
-\include vector_scal_opencl_codelet.cl
+\snippet vector_scal_opencl_codelet.cl To be included
 
 */