heat.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. */
  17. #ifndef __HEAT_H__
  18. #define __HEAT_H__
  19. #include <stdio.h>
  20. #include <stdlib.h>
  21. #include <string.h>
  22. #include <assert.h>
  23. #include <math.h>
  24. /* needed for STARPU_OPENGL_RENDER */
  25. #include <starpu_config.h>
  26. #include <starpu.h>
  27. #include <common/blas.h>
  28. #ifdef STARPU_OPENGL_RENDER
  29. #include <GL/gl.h>
  30. #include <GL/glu.h>
  31. #include <GL/glut.h>
  32. #endif
  33. #define FPRINTF(ofile, fmt, args ...) do { if (!getenv("STARPU_SSILENT")) {fprintf(ofile, fmt, ##args); }} while(0)
  34. #define X 0
  35. #define Y 1
  36. #define DIM ntheta*nthick
  37. #define RMIN (150.0f)
  38. #define RMAX (200.0f)
  39. #define Pi (3.141592f)
  40. #define NODE_NUMBER(theta, thick) ((unsigned long)((thick)+(theta)*nthick))
  41. #define NODE_TO_THICK(n) ((n) % nthick)
  42. #define NODE_TO_THETA(n) ((n) / nthick)
  43. typedef struct point_t {
  44. float x;
  45. float y;
  46. } point;
  47. extern void dw_factoLU(float *matA, unsigned size, unsigned ld, unsigned nblocks, unsigned version, unsigned no_prio);
  48. extern void dw_factoLU_tag(float *matA, unsigned size, unsigned ld, unsigned nblocks, unsigned no_prio);
  49. extern void dw_factoLU_grain(float *matA, unsigned size, unsigned ld, unsigned nblocks, unsigned nbigblocks);
  50. extern void initialize_system(float **A, float **B, unsigned dim, unsigned pinned);
  51. void display_stat_heat(void);
  52. #ifdef STARPU_OPENGL_RENDER
  53. extern void opengl_render(unsigned _ntheta, unsigned _nthick, float *_result, point *_pmesh, int argc_, char **argv_);
  54. #endif
  55. #endif /* __HEAT_H__ */