README.dev 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2009, 2010, 2011 Université de Bordeaux
  4. # Copyright (C) 2010, 2011, 2016 CNRS
  5. #
  6. # StarPU is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU Lesser General Public License as published by
  8. # the Free Software Foundation; either version 2.1 of the License, or (at
  9. # your option) any later version.
  10. #
  11. # StarPU is distributed in the hope that it will be useful, but
  12. # WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. #
  15. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  16. Contents
  17. ========
  18. - Directory structure
  19. - Developer Warnings
  20. - Naming Conventions
  21. - Coding Style
  22. - Error handling
  23. Directory structure
  24. -------------------
  25. The directory structure is as follows:
  26. - src : internal source for StarPU
  27. - include : public API
  28. - tests : unitary tests
  29. - examples : examples using StarPU
  30. - doc : documentation for StarPU
  31. StarPU extensions have their own directory (src/include/tests/examples) structure:
  32. - mpi : The MPI support
  33. - socl : the StarPU OpenCL-compatible interface
  34. - gcc-plugin : the GCC plug-in that extends the C programming language with pragmas and attributes
  35. - sc_hypervisor : The Scheduling Context Hypervisor
  36. - starpufft : The FFT support
  37. - starpu-top : StarPU-Top Interface
  38. Developer Warnings
  39. ------------------
  40. They are enabled only if the STARPU_DEVEL environment variable is
  41. defined to a non-empty value, when calling configure.
  42. Naming Conventions
  43. ------------------
  44. * Prefix names of public objects (types, functions, etc.) with "starpu"
  45. * Prefix names of internal objects (types, functions, etc.) with "_starpu"
  46. * Names for qualified types (struct, union, enum) do not end with _t, _s or similar.
  47. Use _t only for typedef types, such as opaque public types, e.g
  48. typedef struct _starpu_data_state* starpu_data_handle_t;
  49. or
  50. typedef uint64_t starpu_tag_t;
  51. * When a variable can only take a finite set of values, use an enum
  52. type instead of defining macros for each of the values.
  53. Coding Style
  54. ------------
  55. * Curly braces always go on a new line
  56. Error handling
  57. --------------
  58. * Use STARPU_ABORT() for catastrophic errors, from which StarPU will never
  59. recover.
  60. switch (node_kind)
  61. {
  62. case STARPU_CPU_RAM:
  63. do_stg();
  64. break;
  65. ...
  66. default:
  67. /* We cannot be here */
  68. STARPU_ABORT();
  69. }
  70. * Use STARPU_ASSERT() to run checks that are very likely to succeed, but still
  71. are useful for debugging purposes. It should be OK to disable them with
  72. --enable-fast.
  73. STARPU_ASSERT(j->terminated != 0)