README.dev 2.8 KB

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