README.dev 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2009, 2010, 2011 Université de Bordeaux 1
  4. # Copyright (C) 2010, 2011 Centre National de la Recherche Scientifique
  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. - Developer Warnings
  19. - Naming Conventions
  20. - Coding Style
  21. - Error handling
  22. Developer Warnings
  23. ------------------
  24. They are enabled only if the STARPU_DEVEL environment variable is
  25. defined to a non-empty value, when calling configure.
  26. Naming Conventions
  27. ------------------
  28. * Prefix names of public objects (types, functions, etc.) with "starpu"
  29. * Prefix names of internal objects (types, functions, etc.) with "_starpu"
  30. * Names for qualified types (struct, union, enum) do not end with _t, _s or similar.
  31. Use _t only for typedef types, such as opaque public types, e.g
  32. typedef struct _starpu_data_state* starpu_data_handle_t;
  33. or
  34. typedef uint64_t starpu_tag_t;
  35. * When a variable can only take a finite set of values, use an enum
  36. type instead of defining macros for each of the values.
  37. Coding Style
  38. ------------
  39. * Curly braces always go on a new line
  40. Error handling
  41. --------------
  42. * Use STARPU_ABORT() for catastrophic errors, from which StarPU will never
  43. recover.
  44. switch (node_kind)
  45. {
  46. case STARPU_CPU_RAM:
  47. do_stg();
  48. break;
  49. ...
  50. default:
  51. /* We cannot be here */
  52. STARPU_ABORT();
  53. }
  54. * Use STARPU_ASSERT() to run checks that are very likely to succeed, but still
  55. are useful for debugging purposes. It should be OK to disable them with
  56. --enable-fast.
  57. STARPU_ASSERT(j->terminated != 0)