README.dev 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2009-2021 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  4. #
  5. # StarPU is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU Lesser General Public License as published by
  7. # the Free Software Foundation; either version 2.1 of the License, or (at
  8. # your option) any later version.
  9. #
  10. # StarPU is distributed in the hope that it will be useful, but
  11. # WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. #
  14. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  15. #
  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. - tools : tools for StarPU
  32. StarPU extensions have their own directory (src/include/tests/examples) structure:
  33. - mpi : The MPI support
  34. - socl : the StarPU OpenCL-compatible interface
  35. - sc_hypervisor : The Scheduling Context Hypervisor
  36. - starpufft : The FFT support
  37. Some directories contain only build system details:
  38. - build-aux
  39. - m4
  40. - autom4te.cache
  41. Developer Warnings
  42. ------------------
  43. They are enabled only if the STARPU_DEVEL environment variable is
  44. defined to a non-empty value, when calling configure.
  45. Naming Conventions
  46. ------------------
  47. * Prefix names of public objects (types, functions, etc.) with "starpu"
  48. * Prefix names of internal objects (types, functions, etc.) with "_starpu"
  49. * Names for qualified types (struct, union, enum) do not end with _t, _s or similar.
  50. Use _t only for typedef types, such as opaque public types, e.g
  51. typedef struct _starpu_data_state* starpu_data_handle_t;
  52. or
  53. typedef uint64_t starpu_tag_t;
  54. * When a variable can only take a finite set of values, use an enum
  55. type instead of defining macros for each of the values.
  56. Coding Style
  57. ------------
  58. * Curly braces always go on a new line
  59. Error handling
  60. --------------
  61. * Use STARPU_ABORT() for catastrophic errors, from which StarPU will never
  62. recover.
  63. switch (node_kind)
  64. {
  65. case STARPU_CPU_RAM:
  66. do_stg();
  67. break;
  68. ...
  69. default:
  70. /* We cannot be here */
  71. STARPU_ABORT();
  72. }
  73. * Use STARPU_ASSERT() to run checks that are very likely to succeed, but still
  74. are useful for debugging purposes. It should be OK to disable them with
  75. --enable-fast.
  76. STARPU_ASSERT(j->terminated != 0)
  77. Makefile.am
  78. -----------
  79. Dependency libraries are appended to LIBS.
  80. Only real LDFLAGS such as -no-undefined go to LDFLAGS.
  81. If a program foo needs more libraries, it can put then in foo_LDADD.
  82. (No, AM_LDADD does not exist)
  83. All install rules must use $(DESTDIR) so that
  84. ./configure --prefix=/usr && make && make install DESTDIR=/tmp/foobar
  85. can properly work, as it is used by distributions. That can easily checked by
  86. *not* running it as root.